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.|
Don’t stop now and take your learning to the next level. Learn all the important concepts of Data Structures and Algorithms with the help of the most trusted course: DSA Self Paced. Become industry ready at a student-friendly price.
- Difference between Memory based and Register based Addressing Modes
- Difference between Register Mode and Register Indirect Mode
- 8085 program to access and exchange the content of Flag register with register B
- Difference between Random Access Memory (RAM) and Content Addressable Memory (CAM)
- Difference between PC relative and Base register Addressing Modes
- Difference between Virtual memory and Cache memory
- 8085 program to exchange content of HL register pair with DE register pair
- Difference between Byte Addressable Memory and Word Addressable Memory
- Difference between Static variables and Register variables in C
- Difference between Memory and Storage
- Difference between Uniform Memory Access (UMA) and Non-uniform Memory Access (NUMA)
- Difference between Primary and Secondary Memory
- Difference between Volatile Memory and Non-Volatile Memory
- Difference between Contiguous and Noncontiguous Memory Allocation
- Difference between Simultaneous and Hierarchical Access Memory Organisations
- Difference between Random Access Memory (RAM) and Hard Disk Drive (HDD)
- Register Transfer Language (RTL)
- Random Access Memory (RAM) and Read Only Memory (ROM)
- Flag register of 8086 microprocessor
- Flag register in 8085 microprocessor
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.