CPU & Fetch-Execute Cycle
CPU Components
The Central Processing Unit (CPU) is the "brain" of the computer.
Key Components
- ALU (Arithmetic Logic Unit) - Performs arithmetic (+, -, *, /) and logic (AND, OR, NOT) operations
- CU (Control Unit) - Directs the flow of data and instructions
- Registers - Small, fast storage locations within the CPU
- Program Counter (PC) - Holds the address of the next instruction
- System Clock - Generates timing signals to synchronise operations
Fetch-Execute Cycle
The continuous process the CPU uses to process instructions.
-
1. FETCH
The next instruction is fetched from memory using the address in the Program Counter
-
2. DECODE
The Control Unit decodes the instruction to determine what operation to perform
-
3. EXECUTE
The ALU performs the required operation (calculation or logic)
-
4. STORE
Results are stored back to memory or a register
The cycle then repeats with the next instruction
FETCH → DECODE → EXECUTE → STORE → (repeat)