The three main components of a central processing unit (CPU) are the arithmetic logic unit (ALU), the control unit (CU), and registers. Together, they fetch, decode, and execute program instructions.
Functions of the Components
| Component | Main function | Example |
|---|---|---|
| ALU | Performs arithmetic operations, logical comparisons, and bitwise operations | Addition, subtraction, AND, OR, and comparing two values |
| Control unit | Coordinates the CPU's operations by decoding instructions and issuing control signals | Directing data from a register to the ALU |
| Registers | Provide very small, high-speed storage locations inside the CPU | Holding an instruction, address, operand, or intermediate result |
The CPU processes instructions through the fetch-decode-execute cycle. During the fetch stage, the control unit uses the program counter (PC) to identify the address of the next instruction. The address is copied to the memory address register (MAR), while the retrieved instruction passes through the memory data register (MDR) and is placed in the current instruction register (CIR).
During decoding, the control unit interprets the instruction's opcode, which specifies the operation to perform, and identifies any required operands. It then sends control signals to the relevant CPU components.
During execution, the ALU may perform a calculation or logical comparison. The result can be stored temporarily in the accumulator or another general-purpose register before being written to memory. The PC is updated so that the next instruction can be fetched.
A common misconception is that registers are the same as cache or RAM. Registers are located directly inside the CPU and normally provide faster, much smaller storage; cache and RAM occupy different levels of the memory hierarchy.
IB Exam Technique
For an IB question using the command term describe, state both the identity and function of each component. For an explain question, link the components through the fetch-decode-execute cycle rather than listing isolated definitions. Use named registers accurately and avoid claiming that the ALU controls instruction sequencing; that is the control unit's role.