Registers
A register can be thought of as a small area of the CPU which is used for storing data during operations. They are like variables built in to the CPU.
They are embedded within the CPU as opposed to being held within any of the cache areas, and are implemented because they are extremely fast.
Alongside the use of registers within calculations and general processing, there are some special-purpose registers, for example:
Register type | Example of use |
---|---|
Accumulator | Used to store data that is taken from memory. |
General Purpose | General purpose registers are used to store data and intermediate results during program execution. |
Special Purpose | Users do not access these registers. These are used by computer system at the time of program execution. Some types of special purpose registers are: MAR (Memory Address Register) – stores the address of data or instructions to be fetched from memory MBR (Memory Buffer Register) – stores instructions and data received from and to be sent to memory PC (Program Counter) – contains the address of the instruction being executed at the present time IR (Instruction Register) – used to fetch the next instruction from memory to be processed |