1. The CPU and the Fetch-Decode-Execute Cycle
The Central Processing Unit (CPU), often called the 'brain' of the computer, is responsible for processing all data and instructions. It contains several key components: the Control Unit (CU) which directs the flow of data, the Arithmetic Logic Unit (ALU) which performs calculations and logical comparisons, and registers which are small, high-speed memory locations. To process instructions, the CPU continuously performs the Fetch-Decode-Execute cycle.
Key term
Examiner insight
Common pitfall
Fun fact
Worked example 16 marks
Describe the three stages of the Fetch-Decode-Execute cycle.
- 1
- Fetch: The CPU fetches the next instruction from its address in main memory (RAM). The address is held in the Program Counter (PC). This instruction is copied into the Instruction Register (IR). The PC is then incremented to point to the next instruction.
- 2
- Decode: The Control Unit (CU) decodes the instruction held in the IR. It interprets what needs to be done and what other parts of the CPU (like the ALU) are needed to carry it out.
- 3
- Execute: The decoded instruction is performed. This could involve a calculation by the ALU, a data transfer to or from memory, or a change to the Program Counter for a jump instruction.
Worked example 24 marks
Explain the role of the Arithmetic Logic Unit (ALU) and the Control Unit (CU).
- 1
ALU: The ALU performs all arithmetic operations (like addition, subtraction) and all logical operations (like AND, OR, NOT comparisons). For example, it would be used to check if one value is greater than another.
- 2
CU: The Control Unit coordinates all the activities within the CPU. It sends control signals to other components, manages the timing of operations, and directs the flow of data between the CPU and other parts of the computer.
Recap
- The CPU processes instructions using the Fetch-Decode-Execute cycle.
- The Control Unit (CU) directs operations, and the Arithmetic Logic Unit (ALU) performs calculations.
- Registers are small, fast storage locations within the CPU.
- The Program Counter (PC) holds the memory address of the next instruction to be fetched.
- The cycle repeats billions of times per second in a modern processor.
Quick check
- What are the three main components of a CPU?3 marks
- Which register holds the address of the next instruction?1 mark