A register is the smallest & fastest memory unit which can be used by the CPU (Central Processing Unit) temporarily for quickly or immediately accept, store or transfer the data which can be used in computer systems for performing some actions. There are mainly three phases in which the CPU use registers for processing or data manipulation they are:
i) Fetching :
In fetching process, the CPU use the registers to fetch the data from main memory or taking the inputs by user to store it in register to further process it.
ii) Decoding :
In decoding process, the data is decoded in computer readable format which are being interpreted by CPU to perform some actions or operations on it.
iii) Executing :
In Executing process, the CPU finally executes the decoded data or instruction which are using in performing actions and giving the user or machine as an output on the screen or in any other output unit.
The registers are on the top of the memory hierarchy and are the fastest way for data manipulation, a register may hold instruction or instruction address or any kind of data such as bit sequence or an individual character. There are so many types of registers according to their capabilities, operation they perform, uses and functions. Some of the main and primarily use registers are given blow with their brief explanation.
1. Data Register (DR) :-
It is mostly the 16 – bit register used in microcomputers to temporary hold the data which can be obtained or transmitted from or to any peripheral device it is connected from.
2. Address Register (AR) or Memory Address Register (MAR) :-
It is mostly 12 – bit register used to store or holds the address of the memory it requires for read or write operations on data specially. It is used when CPU wants the data to store or to read from the memory then it place the location or address of that memory location on it.
3. Input Register (I\O R) :-
It is mostly 8 – bit register used to hold or store input data from any of peripheral or entered by user.
4. Output Register (O\P R) :-
It is mostly 8 – bit register used to hold or store output data to show output on one of the following peripherals after performing various operations by CPU on input data.
5. Buffer Register (BR) or Memory Buffer Register (MBR) :-
It is mostly 8 – bit register and is the type of data register which is situated in-between processer and peripherals which is used to hold the data temporarily which is coming from a processor or from a peripheral for exchanging data between these.
6. Program Counter (PC):-
It is mostly 12 – bit register also known as the Instruction Pointer Register (IPR) is used to hold or store the address of the next instruction to be executed.
7. Instruction Register (IR) :-
It is mostly the 16 – bit register use to hold instruction code of an instruction fetched from main memory for further decoding or for executing it by the help of control unit.
8. Temporary Register (TR) :-
It is mostly 16 – bit register used to hold address of memory for a short period of time or for temporally. This register is also used to hold immediate results from the CPU & is initialised itself must before use.
9. Accumulator Register (AC) :-
It is mostly 16 – bit register also known as processor register which is usually located inside ALU (Arithmetic and Logic Unit) is used to store result of Arithmetic and Logic operations & is mainly used for storing operant & use to hold data for these purpose for a short period of time or for short time.
10. Flag Register (FR) :-
It is mostly 8 – bit register or 1 byte register & is a type of special purpose register which check the condition and set the flag value 1 (SET) or 0 (RESET) in accordance to it.