Introduction to Types of Registers
The computer register is defined as the small subset of the data that has fast accessible memory in the central processing unit. For the execution of different computer instructions and programs type of registers are used. There are numerous categories of computer registers that are available for the execution of instructions. The registers can be categorized by their size, functions, or names. These registers are used to store the data temporarily and perform the execution of computer instructions and can be also used to store results in it. The processing speed of registers is the fastest to another data set.
Different Types of Registers
There is numerous types of computer register that are available for executing the computer instructions. Some of them are discussed below:
1. MAR Register
The full form of MAR is the memory address register. The memory address register issued to fetch the instructions and data from the memory and helps to execute the instructions. The central processing unit widely used the memory address register to read any type of data or store any type of data in this type of register. The memory address register stores the address so that data can be easily fetched from the register. The memory address register is mainly used for reading and writing operation of data from memory. At the time of reading operation, the address is fetched from register to access the data, and then this data is fed into other types of registers known as memory data register (MDR). In the writing operation, the data is fetched from the memory data register and stored at the address located by the memory address register. The memory address register always stores the address of the next location where data related operation will be executed.
The full form of MDR register is a memory data register. The memory data register is used to store the data that will be stored or will be fetched from the computer memory I.e. Random-access Memory (RAM). The main use of the memory data register is to act as a buffer as it can store anything that can be copied from the computer memory and can be used by the processor for further operations. The memory data register stores the data before the data is transferred to the decoder. There are two types of registering in the memory data register. When the data is fetched from the memory and copied to the MDR the information is stored in one single direction and the data is written by other CPU registers that store data in computer memory. The other use of the memory data register is to store the data and information that can be shifted to other memory components of the system or vice versa.
The full form of MBR is the memory buffer register. The memory buffer register is used to store information and data that can be read or written in the computer memory. The main function of the memory buffer register is to store various types of computer instructions and data that can be transferred between computer memory. The memory buffer register is the main memory-related register for the processor present in the processing unit as this register is capable to perform memory-related operations very fast.
The full form of PC is the program counter register. The other name for the program counter register is instruction address register (IAR) or IC (instruction counter). The program counter is used to indicate the current position of program sequence in a computer system. When any instructions are fetched from the memory the value of the program counter is incremented by one and point to next instruction that need to be executed by the processor of the central processing unit (CPU). The program counter is used to store the address of immediate instructions that need to be executed next. The processors in the CPU fetch the instructions sequentially but the sequence can be changed by other types of instructions like control transfer.
The accumulator is another type of central processing unit register that is widely used for storing the logic or intermediate results. The accumulator register has a very important role as if it is not there then all the intermediate results need to be stored in the main memory that can increase the overhead on the memory. It is because then unnecessary read and writes operations will be increased. The accumulator register can easily store the intermediate results. The accessing speed of the accumulator register is much faster compared to the main memory. In many modern systems, there are various types of accumulators that can be used to store the intermediate results. However, more the use of accumulators more complex will be the design.
6. Index Register
The index registers a type of processor register in the central processing unit (CPU) that is widely used for altering the address of operand at the time of program execution. The index register is widely used for doing array or vector operations. The content is fetched from the index register and added or subtracted to some immediate address to obtain an effective address of data. The index register working can be tested by special instruction and mainly used for testing the loop instructions. The index register can be used in the indirect addressing in which the modification is required for the address of the instruction.
7. Instruction Register
The instruction register is another type of central processing unit register that is used to store the instruction that is currently executed or that will be decoded. In processors, the instruction register holds each instruction in it, and then it can be executed by the processors. The instructions can be executed in one single step or can be executed in multiple steps.
For the central processing unit, there are various type of computer registers defined that has some specific role during the execution of the instruction. All these registers have some particular role like data-related operations, fetching or storing of data, and many more operations. And the instructions stored in the register are executed by the processor of the central processing unit.
This is a guide to Types of Registers. Here we also discuss the Introduction and Different Types of Registers along with different examples. You may also have a look at the following articles to learn more –