Computer Science SS2 First Term
Week 5
Topic: 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
- 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.
- 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.
Control unit Functions
- The control unit directs the entire computer system to carry out stored program instructions.
- The control unit must communicate with both the arithmetic logic unit and main memory.
- The control unit uses the instruction contained in the Instruction Register to decide which circuits need to be activated.
- 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.
- The control unit instructs the arithmetic logic unit which arithmetic operations or logical operation is to be performed.
- The control unit is literally in control.
Functions of Arithmetic Logic Unit
- The arithmetic logic unit executes arithmetic and logical operations.
- Arithmetic operations include addition, subtraction, multiplication and division.
- Logical operations compare numbers, letters and special characters.
- Comparison operations test for three conditions:
- equal-to condition in which two values are the same
- less-than condition in which one value is smaller than the other
- greater-than condition in which one value is larger than the other
- Relational operations (=, <, >) are used to describe the comparison operations used by the arithmetic logic unit.
- The arithmetic logic unit performs logic functions such as AND, OR and NOT
For more class notes, visit: https://passnownow.com/classwork-support/