4.1.2 Inside the CPU: Components and Registers
A processor needs more than one circuit to carry out a program. Different parts coordinate the instruction, perform the required operation and hold small pieces of information while processing takes place. This lesson examines those parts without yet tracing the complete fetch–decode–execute cycle.
By the end of this section, you should be able to:
- Explain the roles of the Control Unit, ALU and system clock.
- Distinguish between general-purpose and special-purpose registers.
- Describe the roles of ACC, PC, MAR, MDR, CIR, IX and the Status Register.
- Identify whether a register is holding an address, an instruction, a value or flags.
- Explain the purpose of the Immediate Access Store.
How the CPU Is Organised
The Central Processing Unit is the part of the computer that interprets and carries out program instructions. A simplified CPU can be understood as three closely connected groups of hardware:
| Part | Main responsibility | Typical question to ask |
|---|---|---|
| Control Unit (CU) | Coordinates instruction processing and directs data movement. | What must happen next? |
| Arithmetic and Logic Unit (ALU) | Performs arithmetic, comparisons and logical operations. | What operation must be performed? |
| Registers | Hold the small items currently needed by the processor. | What must be available immediately? |
These parts work together. The Control Unit does not normally calculate the answer, and the ALU does not decide which instruction should run next. Each component has a defined role.
The Control Unit
The Control Unit (CU) manages the sequence of operations inside the processor. It interprets the current instruction and sends control signals so that the correct registers, memory interface and processing circuits become active.
The CU is responsible for actions such as:
- coordinating the movement of addresses, instructions and values;
- decoding the operation represented by an instruction;
- selecting the appropriate CPU component for the operation;
- using timing signals so that events occur in the correct order.
The ALU and System Clock
Arithmetic and Logic Unit
The Arithmetic and Logic Unit (ALU) carries out operations on binary data. These include addition, subtraction, comparisons and bitwise logical operations. Values used by the ALU are usually supplied through registers, and a result may be placed back into a register such as the Accumulator.
System clock
The system clock generates regular timing pulses. The Control Unit uses these pulses to coordinate processor activity. A clock pulse does not automatically mean that one complete instruction has finished; an instruction may require several smaller operations and therefore several clock cycles.
General-Purpose and Special-Purpose Registers
Registers are faster to access than main memory, but they can hold only a small amount of information. Their contents change frequently while instructions are being processed.
| Register category | How it is used | Example in the syllabus model |
|---|---|---|
| General-purpose | Can hold working data or intermediate results for different operations. | Accumulator (ACC) |
| Special-purpose | Has a defined responsibility in instruction processing or addressing. | PC, MAR, MDR, CIR, IX and Status Register |
The Named Registers
A strong explanation states both what the register holds and why the processor needs it.
| Register | What it holds | Purpose |
|---|---|---|
| Program Counter (PC) | The address of the next instruction. | Identifies where instruction processing should continue. |
| Memory Address Register (MAR) | The address currently being accessed. | Identifies a memory location or I/O address for a read or write operation. |
| Memory Data Register (MDR) | Data or an instruction moving to or from memory. | Acts as a temporary holding area between the CPU and memory. |
| Current Instruction Register (CIR) | The instruction currently being decoded or executed. | Keeps the current instruction available to the Control Unit. |
| Accumulator (ACC) | A working value or an ALU result. | Provides the simplified processor with general-purpose working storage. |
| Index Register (IX) | An offset used in indexed addressing. | Helps calculate an effective address, often when accessing a sequence of values. |
| Status Register | Individual condition flags. | Records outcomes such as zero, negative, carry or overflow, depending on the processor. |
The Immediate Access Store
The processor also needs rapid access to the program and data currently in use. The term Immediate Access Store (IAS) describes storage that the processor can access directly during processing. In a simplified system, this mainly refers to primary memory; cache may provide an even faster layer between the CPU and main memory.
IAS is not another name for a CPU register. Registers are located inside the processor and hold only the items needed immediately; the IAS provides a much larger store for the current program and its data.
Worked Snapshot: What Is Each Register Holding?
Imagine that a processor is carrying out the instruction ADD 930. Memory
location 930 contains the value 12, and the Accumulator previously contained 35.
The next instruction is at address 417.
| CPU item | Example content | Interpretation |
|---|---|---|
| PC | 417 |
Address of the next instruction. |
| CIR | ADD 930 |
Instruction currently being processed. |
| MAR | 930 |
Address of the value required by the instruction. |
| MDR | 12 |
Value transferred from memory location 930. |
| ACC before the ALU operation | 35 |
Existing working value. |
| ACC after the ALU operation | 47 |
Result of 35 + 12. |
Interactive: Explore CPU Components
Advance the simulation one stage at a time. Notice which component becomes active and consider why that component is needed at that moment.
While using the widget, ask:
- Is the highlighted item holding an address, an instruction or a value?
- Is the component coordinating, storing or processing?
- Which component will need the information next?
Common Mistakes and Misconceptions
- PC stores the current instruction. No—the PC stores the address of the next instruction; the CIR stores the current instruction.
- MAR stores data from memory. No—the MAR stores the address; the MDR temporarily holds transferred content.
- The ALU controls the processor. No—the CU coordinates operations; the ALU performs calculations and logic.
- The Status Register stores one ordinary number. Its bits are interpreted individually as condition flags.
- One clock cycle equals one complete instruction. A complete instruction commonly requires several coordinated operations.
- IAS and registers are the same. Registers are tiny stores inside the CPU; IAS is the larger directly accessible store for the running program and data.
Practice
Try these questions
- Explain one difference between a general-purpose and a special-purpose register.
- State the register that holds the address of the next instruction and explain why the CPU needs it.
- Compare the contents and purposes of the MAR and MDR.
- Explain how the CU, ALU and ACC could cooperate when an addition instruction is executed.
- A processor is decoding
SUB 680. Suggest suitable contents for the CIR and MAR. - Explain why the Status Register is better described as a collection of flags than as ordinary working storage.
- Distinguish between a register and the Immediate Access Store.
Check your answers
- A general-purpose register can hold working values for different operations; a special-purpose register has a defined role such as holding an address or instruction.
- The PC; it identifies the location from which instruction processing should continue.
- The MAR holds the address being accessed, while the MDR holds the instruction or data moving between memory and the CPU.
- The CU decodes and coordinates the operation, the ALU performs the addition, and the ACC supplies or receives a working value or result.
- The CIR could hold
SUB 680; the MAR could hold680when that operand is accessed. - Each bit records a separate condition, such as whether a result was zero, negative or caused an overflow.
- A register is tiny, extremely fast storage inside the CPU; IAS is the larger directly accessible memory holding the current program and data.
Review
| Component | Core idea |
|---|---|
| CU | Coordinates and decodes. |
| ALU | Performs arithmetic and logic. |
| System clock | Supplies regular timing pulses. |
| PC | Address of the next instruction. |
| MAR | Address currently being accessed. |
| MDR | Instruction or data moving to or from memory. |
| CIR | Current instruction. |
| ACC | General-purpose working value or result. |
| IX | Offset for indexed addressing. |
| Status Register | Condition flags. |
| IAS | Directly accessible storage for the running program and data. |