CENTRAL PROCESSING UNIT I (ss2 first term)
CENTRAL PROCESSING UNIT
CPU is the hardware part of a computer that carries out the instruction of a computer program by performing the basic arithmetic, logical and input/output operations of the system. CPU is the brain of the computer where most operations,
calculations and processes take place.Two main components of a CPU
1. The control unit (CU) – it extracts instruction from the computer memory, decodes and executes them and also transferring them to the ALU when necessary. The CU controls the fetching of instructions from the main memory and the subsequent execution of these instructions.
2. The arithmetic logic unit (ALU) – it performs arithmetic and logical operation. ALU carries out arithmetic operations on integer (whole number) and real (with a decimal point) operands.
WORKING OF ALU
(i) ALU executes both
arithmetic and logical operations.
(ii) Arithmetic operations
include addition, subtraction, multiplication and division.
(iii) Logical operation
compares numbers, letters and special characters which could be equal – to,
less than, greater than.
Control unit Functions
1. The control unit directs the entire computer system to carry out stored program instructions.
2. The control unit must communicate with both the arithmetic logic unit and main memory.
3. The control unit uses the instruction contained in the Instruction Register to decide which circuits need to be activated.
4. The control unit co-ordinates the activities of the other two units as well as all peripheral and auxiliary storage devices linked to the computer.
5. The control unit instructs the arithmetic logic unit which arithmetic operations or logical operation is to be performed.
6. The control unit is literally in control.
Functions of Arithmetic Logic Unit
1. The arithmetic logic unit executes arithmetic and logical operations.
2. Arithmetic operations include addition, subtraction, multiplication and division.
3. Relational operations (=, <, >) are used to describe the comparison operations used by the arithmetic logic unit.
4. The arithmetic logic unit performs logic functions such as AND, OR and NOT
REGISTERS
Registers are temporary
storage areas for instructions or data. They are not part of memory rather they
are special additional storage locations that offers the advantage of speed. It
works under the direction of the control unit to accept, hold, and transfer
instructions or data and perform arithmetic or logical comparison at high
speed.
Computers usually assign
special roles to certain register which could be:
(i) An
accumulator, which collects the result of computations.
(ii) An address register, which keeps track of where a given instruction or piece of data is stored in the memory.
(iii) A storage register, which temporarily holds data taken from or about to be sent to the memory.
(iv) A general – purpose register, which is used for several functions.
Comments
Post a Comment