CPU and its Various Units with Diagram | Registers | BCA | SparkEasy

 Central Processing Unit 

👉CPU is the brain of a computer system. It performs all major calculations and comparisons and activates and controls the operations of other units of the computer system.

To evaluate a computer’s capabilities quickly, it is important to know how CPUs are internally structured, how different CPUs differ from each other, and how to evaluate CPU speed. These and other related concepts are described below.

CPU and its Various Units with Diagram


 Various Units of CPU 

 

➥Control Unit

The control unit of a CPU selects and interprets program instructions and then coordinates their execution. It has some special purpose registers and a decoder to perform these activities.

The special-purpose registers named instruction register and program control register, respectively, hold the current instruction and the next instruction for execution, and in this way help the control unit in instruction selection.

On the other hand, the decoder has the necessary circuitry to decode and interpret the meaning of every instruction supported by the CPU.

Although the control unit does not perform any actual processing of data, it acts as the central nervous system for all other components of a computer.

It manages and coordinates the entire computer system including its input and output units. It obtains instructions from a program stored in the main memory, interprets the instructions, and issues signals that cause other units of the system to execute them.

 

➥Arithmetic Logic Unit

ALU of a CPU is the place where the actual execution of instructions takes place during data processing. When the control unit encounters an instruction that involves an arithmetic operation or a logic operation, it passes control to the ALU.

The ALU has some special purpose registers and necessary circuitry to carry out all arithmetic and logic operations included in the set of instructions supported by the CPU.

For example, the control unit might load two numbers into ALU registers and then tell the ALU to add them (an arithmetic operation) or to check if they are equal (a logical operation).

When the entire CPU (both CU and ALU) is contained on a single tiny silicon chip, it is called a microprocessor.

 

Also Read : – Generation of Computers with their characteristics

 

➥Instruction Set

Every CPU has a built-in ability to execute a set of machine instructions called its instruction set. Most CPUs have 200 or more instructions in their instruction set.

The list of instructions supported by a CPU in its instruction set forms the basis for designing the machine language for the CPU.

Since each processor has a unique instruction set, machine language programs written for one computer will generally not run on another computer with a different CPU.

When manufacturers develop a new CPU, they ensure that its instruction set includes all instructions in the instruction set of its predecessor CPU plus some new ones.

This manufacturing strategy is known as backward compatibility and the new CPU is said to be backward compatible with its predecessor.

This feature allows software written for a computer with a particular CPU to work on computers with newer processors of the same family. In turn, it allows users of these computer systems to upgrade their systems easily without worrying about converting all their existing software.

 

➥Registers

As a computer’s CPU interprets and executes instructions, there is a movement of information between various units of the computer.

To handle this process satisfactorily and to speed up the rate of information transfer, the CPU uses several special memory units called registers. These registers hold information temporarily and are part of the CPU, not the main memory.

The length of a register is equal to the number of bits it can store. Hence, we refer to a register that can store 8 bits as an 8-bit register.

Most CPUs sold today have 32-bit or 64-bit registers. The length of registers of a computer is sometimes called its word size. The bigger the word size, the faster a computer can process a set of data.

Although the number of registers varies from computer to computer, there are some registers common to all computers. Each of these registers possesses the ability to receive information, hold it temporarily, and pass it on as directed by the control unit.

📍Memory Address Register (MAR): – It holds the address of the active memory location. It is loaded from the program control register when the system reads an instruction from memory.

📍Memory Buffer Register (MBR): – It holds the contents of the accessed (read/written) memory word. The system transfers an instruction word placed in this register to the instruction register. A data word placed in this register is accessible for operation with the accumulator register or for transfer to the I/O register.

To store a word in a memory location, the system first transfers it to MBR and then writes it in memory from MBR.

📍Program Control Register (PC): – It holds the address of the next instruction for execution. Normally, a system stores instructions of a program in consecutive memory locations and executes them in sequence unless it encounters a branch instruction.

A branch instruction is an operation that causes a transfer to a non-consecutive instruction. The system transfers the address part of a branch instruction to the PC register so that it becomes the address of the next instruction.

📍Accumulator Register (A): – It holds the data on which the system must operate, intermediate results, and results of operations performed.

The system uses it during the execution of most instructions. The system returns the result of an arithmetic operation to the accumulator register for transfer to the main memory through the memory buffer register. In many computers, there is more than one accumulator register.

📍Instruction Register (I): – It holds the current instruction under execution. As soon as the instruction is stored in this register, its operation and address parts are separated. The system sends the address part of the instruction to MAR, while it sends the operation part to the control unit, where it is decoded and interpreted.

Finally, the control unit generates and sends command signals to the appropriate unit for carrying out the task specified in the instruction.

📍Input/Output Register (I/O): – The system uses it to communicate with input/output devices. An input device transfers all input information to this register. Similarly, the system transfers all output information to this register and an output device picks up data for output from here.

 

➥Main Memory

Instructions and data of a program reside in a temporary storage area mainly when the CPU is executing the program. This storage space is known as primary storage, main memory, or simply memory.

The main memory of a computer system consists of several small storage areas called locations or cells. Each location can store a fixed number of bits, called the word length of the memory.

The main memory capacity of a computer is the number of bytes that its main memory can store. Normally, we measure main memory capacity in terms of kilobytes which is equal to 1024 bytes of storage, Megabytes, which is equal to 1,048,576 bytes of storage, or gigabyte, which is equal to 1,073,741,824 bytes of storage.

A computer’s main memory uses volatile RAM chips. A special type of RAM called read-only memory (ROM) is a non-volatile memory chip in which data is stored permanently.

 

➥Cache Memory

Cache Memory is an extremely fast, small memory between the CPU and main memory whose access time is closer to the processing speed of the CPU.

It acts as a high-speed buffer between CPU and main memory and computer systems use it to store temporarily very active data and instructions during processing.

Since cache memory is faster than main memory, the system’s performance improves considerably when the system makes those data and instructions available in the cache that processes need during their present processing.

 

Leave a Comment