CPU Registers
What Are CPU Registers ?
Computer Organization And Architecture
The registers are an important component of the processor’s micro-architecture. The registers are the high speed memory built into the CPU chip for quick data access. It is also the fastest memory in the memory hierarchy.
The register effectively functions as high speed temporary memory used by the CPU ( a microprocessor chip ) during the program execution. Depending upon the CPU micro architecture, the processor can have many registers.
The CPU micro architecture consists of different types of registers. Each of these register performs a specific function during the various stages of the instruction cycle.
From computer hardware and digital electronics point of view, a Register is a group of flip-flops. with each flip-flop capable of storing one bit of information. An n-bit register has a group of n flip-flops that can store binary information of n-bits.
Register Symbol | Register Name | Bit Size | Register Function |
AC | Accumulator | 16 Bits | Stores Data For ALU Operations |
PC | Program Counter | 12 Bits | Points To Next Instruction |
IR | Instruction Register | 16 Bits | Stores Instruction |
DR | Data Register | 16 Bits | Stores Data |
AR | Address Register | 12 Bits | Stores Address |
TR | Temporary Register | 16 Bits | Stores Temporary Data |
INTR / OUTR | Input And Output Registers | Each 8 Bits | Stores Input And Output Data |
The instruction cycle is the basic function of the CPU repetitively performed to execute the program. The instruction cycle is a continuous CPU operation. It is also referred as Fetch Decode and Execute cycle.
The CPU needs access to high speed memory during the various stages of the instruction cycle. The registers are used by the CPUÂ as high speed temporary storage during the program execution.
In this article, you will learn what are cpu registers, different types of registers and their functions and other related important concepts.
The registers are an important component of the CPU. So , let us first start with a brief introduction to the central processing unit ( CPU ).
What Are CPU Registers ?
Table Of Contents
What Are CPU Registers ?
The registers are high speed memory placed inside the processor chip that provides quick data access to the CPU. The main function of the processor is to execute the program instructions.
The program instructions are stored into the main memory RAM ( Random Access Memory ) during the program execution.
The operating system loads the program instructions and the data into the memory. The processor retrieves the data and instructions from the main memory RAM one by one.
Here is an example of the different types of registers used in the Intel 8085 Architecture.Â
The processor micro architecture consist of different types of registers. Each register is used by the CPU at different stages of the instruction cycle.
The register is a internal high speed memory of the processor. It is the smallest in size but fastest in the memory hierarchy.
In digital electronics, a register is a group of flip-flops that can store one bit of data. A flip flop is a latch type circuit that has two stable states that can be used to store the binary data ( zero 0 or one 1 ).
The register consist of group of flip flops and the logic gates. In register the, the flip-flops holds the binary data and the logic gates controls the flow of data into the register.
What Are CPU Registers ?
What Is CPU ?
Central Processing Unit ( CPU )
The CPU stands for central processing unit. It is the main component placed on the motherboard that provides the necessary processing power to the computer system.
The CPU is also alternately referred to as processor, microprocessor or processing unit of the computer system.
The CPU internally consist of three important units. These units are arithmetic and logic unit ( ALU ) , Control Unit ( CU ) and the memory unit ( MU ).
The registers are part of the memory unit of the CPU. The ALU performs the arithmetic and logical operations.
The processor micro architecture consist of different types of registers. Each register is used by the CPU at different stages of the instruction cycle.
The register is a internal high speed memory of the processor. It is the smallest in size but fastest in the memory hierarchy.
What Are CPU Registers ?
Registers And Memory Hierarchy
The registers are the smallest but the fastest component of the memory hierarchy used in the computer architecture. The registers are part of the internal temporary storage used by the CPU.
The CPU’s execution speed is very high. Whereas, the main memory RAM cannot match the execution speed of the CPU.
And therefore, high speed memories are placed between the CPU and the main memory RAM to improve the system performance.
The memory hierarchy includes secondary disk memory , primary main memory RAM , cache memory ( L1, L2 And L3 Cache memory )Â and the registers.
The secondary memory ( disk memory ) is the largest in size but provides lowest data access speed. The registers are the smallest in size but provides the fastest data access speed.
What Are CPU Registers ?
Types Of CPU Registers
Depending upon the CPU’s micro architecture , the CPU can have different types of registers. The different types of CPU registers include :
The CPU registers can be broadly split into two types. The first type of CPU registers are general purpose registers and the second type is special purpose registers.
The CPU registers can either be programmer accessible and some registers are non-accessible registers to the programmer. Let us discuss each register types in detail.
Depending upon the CPU’s micro architecture , the CPU can have different types of registers. The different types of CPU registers include :
Register Symbol | Register Name | Bit Size | Register Function |
AC | Accumulator | 16 Bits | Stores Data For ALU Operations |
PC | Program Counter | 12 Bits | Points To Next Instruction |
IR | Instruction Register | 16 Bits | Stores Instruction |
DR | Data Register | 16 Bits | Stores Data |
AR | Address Register | 12 Bits | Stores Address |
TR | Temporary Register | 16 Bits | Stores Temporary Data |
INTR / OUTR | Input And Output Registers | Each 8 Bits | Stores Input And Output Data |
The CPU registers can be broadly split into two groups. The first group is general purpose registers ( GPR ) and the second group is special purpose registers ( SPR ).Â
What Are CPU Registers ?
CPU Register Sizes
The size of the register is measured by the number of bits. The most common register size include 8 bit register, 16 bit register, 32 bit register and 64 bit register.
The standard register naming convention to access the register depends upon the size of the register.
In computing , a byte addressable memory organization refers to the size of the memory address register. For example, In a 32-bit computer, the CPU can address 2 to the power 32 = 4,294,967,296 bytes of memory. That is equal to RAM memory size of 4 Gigabyte.
General Purpose Registers
The general purpose registers ( GPR )Â are used in CPU architecture for either storing the data , memory addresses or instructions. The processor contains number of general purpose registers.
The general purpose registers are named registers ( R1 , R2 , R3 , …. , Rn ). The memory locations are accessed by its address. Whereas, the registers are accessed by its name.
The register naming convention ( identifiers ) used to access the registers depends upon the size of the register. The register size is measured in bits.
The general purpose registers can be accessed in the program by using low level assembly level programming.
The implementation of the general purpose registers ( GPR )Â depends upon the processor architecture. Here is an example of GPR in Intel 8085 architecture.
What Are CPU Registers ?
Special Purpose Registers
As the name suggest, the special purpose registers have special designated purpose. The special purpose registers can be used by the CPU only for the specified operation.
For example, the program counter register is a special purpose register. The program counter register always contains the address of the next instruction to be fetched and that cannot be modified by programmer.
Similarly, the instruction register is another special purpose register. The instruction register always holds the instruction fetched from the memory.
The control units decodes the machine instruction stored into the instruction register as per the instruction format.
Program Counter Register
The program counter register ( PC ) is a special purpose register used by the CPU to store the address of the next instruction to be executed.
The program counter register is automatically incremented by one after the fetching the last instruction so that it always points to the address of the next instruction.
A program counter is also alternately referred to as an instruction counter, instruction pointer, instruction address register or sequence control register. The PC register keeps the track of the execution sequence of the CPU.
What Are CPU Registers ?
Instruction Register
In order to execute the program, the CPU repetitively performs the instruction cycle. The fetch operation is the first step of the instruction cycle.
The instructions are stored into the main memory RAM. The CPU fetches these instructions one by one. The program instruction is stored into the instruction register after it is fetched by the CPU.
It is the control unit that decodes the program machine instruction. The control unit decodes the instruction as per the instruction format.
The instruction format typically has three parts. The operand part indicates either data or the address of the data. The opcode stands for operation code that defines the operation to be performed and the addressing.
The addressing mode part of the instruction format defines the either direct referencing or indirect referencing.
For indirect referencing , the operand value contains the memory address or effective address of the operand.
What Are CPU Registers ?
Accumulator Register
The accumulator register is used by the ALU ( arithmetic and logic unit ) to perform the arithmetic and the logical operations performed by the CPU.
The ALU operates on the data stored into the accumulator register. After the ALU operation, the processed data is either sent to the main memory RAM or to the output device.
The main purpose of the accumulator is to provide high speed memory for various ALU operations.
A CPU organization is said to be a single accumulator type when it has only one single accumulator . However, modern CPU can have number of general purpose registers can be used by the CPU as accumulator.
Address Register
Memory Address Register ( MAR )
The memory address register ( MAR ) is also called as address register. The memory address register ( MAR ) essentially contains the memory address from where the CPU either needs to fetch the data or write the data.
During the program execution, the CPU performs the memory read and write operations at specific memory address. This address is stored in the MAR.
The memory address register is used by the CPU while performing the input and output operations. The  memory address register specifies the memory address either for memory read or memory write operation.
What Are CPU Registers ?
Data Register
Memory Buffer Register ( MBR )
The memory buffer register ( MBR ) is also called as data register. It essentially contains the data that CPU either has to fetch from the memory. The data register is also used when the CPU needs to write into the memory at the address specified in MAR.
During the program execution, the CPU performs the memory read and write operations at specific memory address. This data is stored in the MBR.
The memory buffer register is used by the CPU while performing the input and output operations. The memory buffer register stores the data fetched by the CPU during the memory read operation or the data for memory write operation.
Input Register
In some programs the user inputs the data that is processed by the computer. In computer architecture this data is temporarily stored into the input register.
The input register ( INPR )Â is a 8 bit register that stores the alphanumeric input data. The contents of the input register is transferred to the accumulator ( AC ) where ALU operates on the data.
Output Register
Similarly , the CPU operates on the program data as per the program instructions. The processed data is stored in the output register ( OUTR )
The contents of the accumulator ( AC ) are transferred to the output register after the ALU operation .
The data from the output register is then sent to the main memory RAM . The operating system then sends the data to the output device.
What Are CPU Registers ?
Temporary Register
The temporary registers are general purpose registers used by the CPU during the program execution to temporarily store the data.
The temporary register is a 16 bit register used by the CPU for the temporary storage of data.
Registers In Computer Hardware
Let us now discuss implementation registers at computer hardware level. From computer hardware and digital electronics point of view, a Register is a group of flip-flops. with each flip-flop capable of storing one bit of information. An n-bit register has a group of n flip-flops that can store binary information of n-bits.
A register consists of a group of flip-flops and gates. The flip-flops hold the binary information and logic gates control when and how new information is transferred into a register. Various types of registers are used in CPU microarchitecture. The simplest register is one that consists of only flip-flops with no external gates.
In digital electronics, a flip-flop is a sequential logic circuit element that is capable of storing one bit of information. It is commonly used for temporary storage, synchronization, and memory applications. Flip-flops are fundamental building blocks in digital circuits and are widely used in the design of registers, counters, and other sequential logic devices.
The basic concept of a flip-flop is that it can hold a binary value of either 0 or 1, and it can change its output based on certain triggering conditions. There are different types of flip-flops, but the most common ones are the D flip-flop, JK flip-flop, RS flip-flop, and T flip-flop.
Join The Best Seller
Computer Science Online Course
This is the most comprehensive and unique Computer Science And Programming Fundamentals course Online which will give you in depth understanding of most important fundamental concepts in computer science And Programming .