Central Processing Unit


Central processing
unit controls all the operations that is being done inside the computer like temporarily storing data, executing program instructions, and perform arithmetic and logic operations.

The main function of CPU is to execute program instructions. All the arithmetic and logic operations, controlling the flow of signals are being controlled by CPU. It is also called the Processor. In a microcomputer, CPU is a single chip located inside the system unit. Except processor, the system unit also includes the circuit board (Mother Board), slots and other components.
The CPU is made up of three major parts.
a) Arithmetic and Logic Unit (ALU)
b) Control Unit and
c) Memory Unit


CPU

a) Arithmetic and Logic Unit (ALU)

Arithmetic and Logic Unit is the part of CPU where all the processing tasks are performed. ALU performed arithmetic operation and logical operation on data under the direction of the control unit. As required, data that need to be processed are transferred from the memory unit to ALU. During the processing, data may move many times from memory unit to ALU and back to memory unit till the processing is completed. After the completion of processing, the final outputs, that are stored in the memory unit are directed to an output device or secondary storage device.

The ALU does all the arithmetic computations and logical operations. The arithmetic operations involve performing addition, subtraction, multiplication and division operations while logical operations involve comparisons. The computer might make a comparison and then use the result of comparison operations include or another comparison.
Various possible comparison operations include EQUAL TO (==), NOT EQUAL TO (! =), GREATER THAN (>), LESS THAN (<), GREATER THAN EQUAL TO (>=), LESS THAN EQUAL TO (<=) etc. The data and instructions stored in primary memory (RAM) prior to processing are transferred when needed to the ALU where they are processed. Intermediate results are transferred back to the primary storage unit until needed at later times. Data may thus move back again to storage many times before the processing is over. After completion of processing, the final results, which are stored in storage unit, are released to the output device. The ALU performs the following tasks.

i. It performs arithmetic operation on data.
ii. It performs logical operations on data.



b) Control Unit (CU)

The control unit is the part of CPU that works with operating system to control and coordinate the entire computer system. The control unit receives instructions from the program, decodes them and generates signals to inform the ALU about the operation that has been requested. Control unit sends signals to input and output devices to perform tasks as instructions. Control unit also receives signals from the peripheral devices for further actions. The control unit coordinates the flow of data in and of the ALU, primary memory, secondary storage and various input/ output devices.

Control Unit acts like a Traffic Police which interprets program instructions received from memory and directs the sequence of events necessary to execute instructions. control unit controls the flow of data and information through CPU to and from other devices like input/output, memory and storage. It sends control signals i.e. electronic signals to various units like I/O, ALU, memory etc. until the required operations are carried out.

Program execution is the important function of CU. The CU gets program instructions from memory and executes them one after another. Before executing, each instruction is fetched, decoded and interpreted to carry out desired operation. After executing one instruction, the CU sends signal to memory to send the next instruction in sequence to CU. Then the similar process is repeated.

c) The Memory Unit

The memory unit or primary memory (RAM) is the part of the computer where instructions (program) and data to be used by the computer are stored temporarily. The data and instructions entered through the input device are transmitted to the computer memory. Data and program of the secondary storage are also transferred to the primary memory whenever they are needed to be used. From the primary memory data are forwarded to the ALU for the further processing and the processed data (information) is sent back to the memory unit. From the memory unit these processed data are passed to the output unit or secondary storage unit. So, the primary memory is the working space where unprocessed data, instructions or programs currently running and processed data are temporarily stored.

The functions of the primary memory unit are as follows.
i. Primary memory stores all the data to be processed and the instructions required for processing.
ii. Primary memory stores intermediate results of processing.
iii. Primary memory stores final result of processing before these results are transferred to an output unit or secondary storage.
iv. Primary memory stores currently running programs.

Memory Registers


These are high speed memory locations built into CPU. The memory registers temporarily hold the program instructions for the program to be executed, the input data to be processed and the intermediate results of any calculations when the processing is being done. They are capable of storing specified amount of data such as 1 word (=4 Bytes). There are different types of registers available within CPU like Accumulator, Program Counter, Shift Resisters, Instruction Registers, Status Registers, Stack Pointer etc.
An accumulator is a special kind of 8-bit or 16 bit register that is used to hold the intermediate results of arithmetic and logic operations. The program counter registers hold the address of the next executable instruction during program execution. Shift registers allows bits to be shifted to the left or right during multiplication or division.


0 comments:

Post a Comment