Register and memory, hold the data that can be directly accessed by the processor which also increases the processing speed of CPU. The processing speed of CPU can also be increased by increasing the number of bits of the register or increasing the number of the physical register in the CPU. Same is the case with memory, more the amount of memory faster is the CPU. Memory is genereally referred to the primary memory of the computer.
Despite these similarities, the register and memory share few differences with each other. The basic difference between the register and memory is that the register holds the data that CPU is currently processing whereas, the memory holds program instruction and data that the program requires for execution.
We will discuss some more differences between register and memory with the help of comparison chart shown below.
Content: Register Vs Memory
Comparison Chart
Basis for Comparison | Register | Memory |
---|---|---|
Basic | 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. |
Capacity | Register holds the small amount of data around 32-bits to 64-bits. | Memory of the computer can range from some GB to TB. |
Access | 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. |
Type | Accumulator register, Program counter, Instruction register, Address register, etc. | RAM. |
Definition of Register
Registers are the smallest data holding elements that are built into the processor itself. Registers are the memory locations that are directly accessible by the processor. The registers hold the instruction or operands that is currently being accessed by the CPU.
Registers are the high-speed accessible storage elements. The processor accesses the registers within one CPU clock cycle. In fact, the processor can decode the instructions and perform operations on the register contents at the rate of more than one operation per CPU clock cycle. So we can say that processor can access registers faster than the main memory.
The register is measured in bits like a processor may have 16-bit, 32-bit, or 64-bit registers. The number of register bits specifies the speed and power of CPU. For example, a CPU which has 32-bit register can access the 32-bit instructions at a time. The CPU which has 64-bit register can execute 64-bit instructions. Hence, more the number of bits of register more is the speed and power of CPU.
The computer registers are categorized as follow:
- DR: Data Register is a 16-bit register which holds the operands to be operated by the processor.
- AR: Address Register is a 12-bit register that holds the address of a memory location.
- AC: Accumulator is also a 16-bit register which holds the result computed by the processor.
- IR: Instruction Register is a 16-bit register that holds the instruction code that has to currently executed.
- PC: Program Counter is a 12-bit register that holds the address of instruction that is to be executed by the processor.
- TR: Temporary Register is a 16-bit register that holds the temporary intermediate result computed by the processor.
- INPR: Input Register is an 8-bit register that holds the input character received from an input device and delivered it to the Accumulator.
- OUTR: Output Register is an 8-bit register that holds the output character received from Accumulator and deliver it to the output device.
Definition of 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.
Basically, the computer memory refers to the primary memory of the computer whereas, the secondary memory is referred as storage of the computer. Primary memory is the memory that can be directly accessed by the processor due to which there is no delay in accessing data, and thus the processor computes faster.
Primary memory or RAM is a volatile memory which means the data in the primary memory exist when the systems power is on, and the data vanishes as the system is switched off. The primary memory contains the data that will be required by the currently executing program in CPU. If the data required by the processor is not in primary memory, then the data is transferred from secondary storage to primary memory, and then it is fetched by the processor.
Once you save the data on the computer, then it is transferred to secondary storage till then it remains in the primary memory. Today the primary memory or RAM can range from 1 GB to 16 GB. On the other hands, the secondary storage today ranges from some Giga Bytes (GB) to TeraBytes (TB).
Key Differences Between Register and Memory
- The primary difference between register and memory is that register holds the data that the CPU is currently processing whereas, the memory holds the data the that will be required for processing.
- The Register ranges from 32-bits register to 64-bits register whereas, the memory capacity ranges from some GB to some TB.
- The processor accesses register faster than the memory.
- Computers registers are accumulator register, program counter, instruction register, address register, etc. On the other hands, memory is referred as the main memory of the computer which is RAM.
Conclusion
Normally the register resides at the top of the memory hierarchy. It is the smallest and fastly accessible storage element. On the other hands, the memory generally referred to as the main memory which is larger than register and its CPU access is slower than register but it is accessed faster than the secondary storage.
Sunil says
very nice
james says
good info
Harshad says
Very nice thanks a lot.
Neelima P says
Thanks for appreciating 🙂
Christian says
Very helpful information. Thanks 🙂
karan says
Thank you.
P.Geethabai says
Nice comparison
Zedekiah Muzzha says
Good article.
Gerald says
Thanks!
Ankur Kaushik says
nice article simple and easy to understand
Tomzy says
Thanks so much for the great information!!!
jacqueline says
thank you. very helpful