1. Register :
Registers are the smallest data holding elements that are built into the processor itself. These are the memory locations that are directly accessible by the processor. It may hold an instruction, a storage address or any kind of data such as a bit sequence or individual characters. For example, an instruction may specify that the contents of two defined registers be multiplied together and then placed in a specific register.
Example: Accumulator register, Program counter, Instruction register, Address register, etc.
2. Memory :
Memory is a hardware device used to store computer programs, instructions and data. The memory that is internal to the processor is a primary memory (RAM), and the memory that is external to the processor is a secondary memory (Hard Drive). Memory can also be categorized on the basis of volatile and non-volatile memory. Volatile memory is memory that loses its contents when the computer or hardware device loses power. RAM (Random Access Memory) is an example of volatile memory. Non-volatile memory is the memory that keeps its contents even if power gets lost. EPROM is an example of non-volatile memory.
Example : RAM, EPROM etc.
Difference between Register and Memory :
|1.||Registers hold the operands or instruction that CPU is currently processing.||Memory holds the instructions and the data that the currently executing program in CPU requires.|
|2.||Register holds the small amount of data around 32-bits to 64-bits.||Memory of the computer can range from some GB to TB.|
|3.||CPU can operate on register contents at the rate of more than one operation in one clock cycle.||CPU accesses memory at the slower rate than register.|
|4.||Types are Accumulator register, Program counter, Instruction register, Address register, etc.||Type of memory are RAM,etc.|
|5.||Registers can be control i.e. you can store and retrieve information from them.||Memory is almost not controllable.|
|6.||Registers are faster than memory.||RAM is much slower than registers.|
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.
- Difference between Register Mode and Register Indirect Mode
- 8085 program to access and exchange the content of Flag register with register B
- 8085 program to exchange content of HL register pair with DE register pair
- Difference between Memory based and Register based Addressing Modes
- Difference between Cache Memory and Register
- Difference between Static variables and Register variables in C
- Difference between PC relative and Base register Addressing Modes
- Difference between Register and Buffer
- Difference between Volatile Memory and Non-Volatile Memory
- Difference between Byte Addressable Memory and Word Addressable Memory
- Difference between Random Access Memory (RAM) and Content Addressable Memory (CAM)
- Difference between Virtual memory and Cache memory
- Difference between Uniform Memory Access (UMA) and Non-uniform Memory Access (NUMA)
- Register content and Flag status after Instructions
- Flag register in 8085 microprocessor
- 8085 program to count the number of ones in contents of register B
- Flag register of 8086 microprocessor
- Introduction of General Register based CPU Organization
- Register Allocations in Code Generation
- Register Transfer Language (RTL)
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.