4. Define CPU and describe the three components that make up a CPU. (7 marks)

CPU stands for Central Processing Unit. It is the primary component of a computer system responsible for executing instructions and performing calculations. The three components that make up a CPU are:

1. Control Unit: The control unit is responsible for managing and coordinating the activities of the CPU. It fetches instructions from memory, decodes them, and controls the flow of data between different components of the CPU. It also oversees the execution of instructions by coordinating with the arithmetic logic unit (ALU), registers, and other components.

2. Arithmetic Logic Unit (ALU): The ALU performs mathematical and logical operations, such as addition, subtraction, multiplication, division, and comparisons. It handles the actual calculations and logical comparisons required by the instructions. The ALU uses the data stored in registers for its operations and produces results that are stored back in registers or memory.

3. Registers: Registers are high-speed memory units located within the CPU. They store small amounts of data that the CPU needs for immediate access during computation. Registers are used by the control unit and the ALU to temporarily store instructions, data, and intermediate results. They provide faster access to data compared to main memory and play a crucial role in improving the overall speed and performance of the CPU.

In summary, the control unit manages the execution of instructions, the ALU performs arithmetic and logic operations, and the registers store and provide quick access to essential data within the CPU. Together, these components work in harmony to execute instructions and carry out all computational tasks performed by a computer.