What is CPU Register
Definition – Register is a temporary storage memory that is built into processor (CPU). In the Computer Architecture, registers are special types of computer memory which are performed their tasks quickly such as (Fetching, transferring, and storing) data and instructions.
All computers required these registers to manipulate data, and store memory addresses. Main objective of using memory addresses is to identify the next instructions that to be executed, after completing execution of the currently instruction.
Types of CPU Registers and their Functions
Here, we will discuss about different types of CPU registers with their functions which are played vital role in the Computer Architecture. Below explain each one –
MAR stand for “Memory Address Register”, and its main objective is to store all memory addresses of entire data and instructions.MAR helps to make the communication with using of MDR (Memory Data Register) in between the CPU and Main Memory.
For example – If, CPU (Center Processing Unit) needs to hold few data in to Primary Memory otherwise to fetch some data from memory side, then it places those addresses which are needed into main memory in the MAR (Memory Address Register).
PC stands for “Program Counter” register, and it is also known as Instruction Pointer (IP) in the Microprocessors, but sometimes few people is known as named with “Instruction Address Register”.
Program Counter register’s function is to hold all records in sequence of entire execution of programs. PC has the memory address of further instruction that is fetched in next step. PC registers to keep track the address of next instruction which to be fetched from the primary memory, if recently instruction is completely executed. It helps to count all numbers of entire instructions.
MDR stands for “Memory Data Register“, and this register is needed after completing the execution in PC register. CPU fetches some mandatory instructions and data from main memory side then its temporary copy is saved into this data register before decoding this data. So, MDR register works as a middle buffer
AC register is also called of the “Accumulator Register“, because this register holds the integer values which are needed by the ALU (Arithmetically Logical Unit) while executing of any specific instruction.
Main function of Accumulator Register is to store the output which is generated by your system. When CPU (Center Processing Unit) will execute some instruction then it will produce the result, now AC register is needed to store those produced data.
Index register helps to update operand while running of the programs in the computer’s CPU.
MB register stands for “Memory Buffer Register“, and this register contains the information of data or instruction which are read or written in the main memory.
So, Memory Buffer Register’ function is to hold all data and instruction that are fetching or going to the primary memory side.
Mostly, these types of register are embedded into microcomputers for temporary storing data being transmitted or from other peripheral devices.
AR stands for “Address Register“, and its main function is to hold the memory location of instruction which is being executed. AR register contains the six registers with named (CS, DS, ES and SS, FG, GS).
IR stands for “Instruction Register“, and this register is used to store those data which are needed in currently execution period.
IPR stands for “Instruction Pointer Register“, and main function of this register is to hold memory location that is executed in the next level. So, IP register stores the sequence of all instructions that are to be performed.
SCR stands for “Stack Control Register“, and it is pre set memory location in which data is saved and retrieved in the specific order LIFO (Last-In-First-Out).
Main function of SCR Register is to handle the stack in the Computer System. To manage stack functionality, to use two special registers (SP and BP).
FR register stands for “Flag Register“, and this register helps to indicate the specific condition. Flag register contains the one or two bytes, and further every byte is splitted into 8 bits. And every bit delivers the flag means condition.
Few flags register are Carry flag, Parity flag, Sign flag, Zero flags, and Overflow flag.
GPR stands for “General Purpose Registers“, and these are unified types of registers. These registers are capable to store the memory addresses, data values as well as floating-point values. Mostly, GPR registers are used into modern CPU and GPUs due to their best flexibility.
SPR stands for “Special Purpose Registers“, and they are used to hold the program state. SPR registers are enabled with PC (Program Counter) and SR (Status Register).