Open In App

Introduction of General Register based CPU Organization

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Share
Report issue
Report

When we are using multiple general-purpose registers, instead of a single accumulator register, in the CPU Organization then this type of organization is known as General register-based CPU Organization. In this type of organization, the computer uses two or three address fields in their instruction format. Each address field may specify a general register or a memory word. If many CPU registers are available for heavily used variables and intermediate results, we can avoid memory references much of the time, thus vastly increasing program execution speed, and reducing program size. 

For example: 

MULT R1, R2, R3 

This is an instruction of an arithmetic multiplication written in assembly language. It uses three address fields R1, R2, and R3. The meaning of this instruction is:

R1 <-- R2 * R3 

This instruction also can be written using only two address fields as: 

MULT R1, R2 

In this instruction, the destination register is the same as one of the source registers. This means the operation 

R1 <-- R1 * R2 

The use of a large number of registers results in a short program with limited instructions. 

Some examples of General register-based CPU Organizations are IBM 360 and PDP- 11

Features of a General Register based CPU organization:

Registers: In this organization, the CPU contains a set of registers, which are small, high-speed memory locations used to store data that is being processed by the CPU. The general-purpose registers can be used to store any type of data, including integers, floating-point numbers, addresses, and control information.

Operand access: The CPU accesses operands directly from the registers, rather than having to load them from memory each time they are needed. This can significantly improve performance, as register access is much faster than memory access.

Data processing: The CPU can perform arithmetic and logical operations directly on the data stored in the registers. This eliminates the need to transfer data between the registers and memory, which can further improve performance.

Instruction format: The instruction format used in a General Register based CPU typically includes fields for specifying the operands and operation to be performed. The operands are identified by register numbers, rather than memory addresses.

Context switching: Context switching in a General Register based CPU involves saving the contents of the registers to memory, and then restoring them when the process resumes. This is necessary to allow multiple processes to share the CPU.

The advantages of General register-based CPU organization – 

  • The efficiency of the CPU increases as large number of registers are used in this organization.
  • Less memory space is used to store the program since the instructions are written in a compact way.

The disadvantages of General register based CPU organization – 

  • Care should be taken to avoid unnecessary usage of registers. Thus, compilers need to be more intelligent in this aspect.
  • Since a large number of registers are used, thus extra cost is required in this organization.

General register CPU organization of two types:

  1. Register-memory reference architecture (CPU with less register) – 
    In this organization Source 1 is always required in the register, source 2 can be present either in the register or in memory. Here two address instruction formats are compatible instruction formats.
  2. Register-register reference architecture (CPU with more register) – 
    In this organization, ALU operations are performed only on registered data. So operands are required in the register. After manipulation, the result is also placed in a register. Here three address instruction formats are the compatible instruction format.

Last Updated : 05 Apr, 2023
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads