Difference between Register and Buffer

1. Register :
Registers are the smallest holding data elements that are built into processor itself. These are memory locations that can be directly accessible by processor. It holds small amount of data around 32-bits to 64-bits and may hold an instruction, a storage address or any kind of data such as a bit sequence or individual characters.

For example : Accumulator register, Program counter, Instruction register, Address register, etc.

2. Buffer :
Buffer is a temporary storage area, usually a block in memory, in which items are placed while waiting to be transferred from an input device or to an output device. It is mostly used for input/output processes. As an example, if you were to print a long document, you would not want your CPU waiting around asking your printer “Are you ready for another paragraph?” Instead, CPU will fill a memory buffer with document’s data, instruct printer to print buffer contents, and go back to its other business.



Difference Between Register and Buffer :

S.No. Register Buffer
1. Registers is a small amount of fast storage element into the processor. Buffer is used to compensate for difference in speed between two processes that exchange or use data.
2. It is located on the CPU. It is an area of RAM .
3. It is used to store and retrieve information from them. It is mostly used for input/output processes.
4. It holds operands or instruction that CPU is currently processing. It holds data for advance processing.
5. It is used to store data temporarily for processing and transfer. It is used to store data temporarily before using them.
6. It increase the accessing speed of CPU. It does not increase accessing time.
7. Loop counters is example of register. Streaming music or streaming video is example of buffer.

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.

My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.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.