Unable to open this exercise
Common exam pitfall
Students often think MAR is incremented, but the Program Counter (PC) is incremented to point to the next instruction.
The Central Processing Unit (CPU) is the primary hardware component that executes software programs. Nearly all general-purpose microprocessors manufactured today are based on the Von Neumann Architecture, first proposed by mathematician and physicist John von Neumann in 1945.
Learning Objectives
- Describe the stored program concept that underpins the Von Neumann model.
- Explain the role and function of the ALU, Control Unit, System Clock, and CPU Cache.
- Identify and describe the special-purpose registers: PC, MAR, MDR, CIR, and ACC.
- Differentiate between the three system buses: Address Bus, Data Bus, and Control Bus.
The Stored Program Concept
Before John von Neumann, early computing machinery was hardwired to perform only one specific calculation; running a different program required physically rewiring cables and switches.
The Von Neumann Architecture introduced the Stored Program Concept:
- Shared Memory: Program instructions and data are stored together in the same continuous primary memory space (RAM).
- Binary Representation: Both instructions and data are encoded as binary numbers ($0$s and $1$s).
- Sequential Execution: Instructions are fetched from memory and executed by the processor sequentially, one after another, unless a jump or branch instruction redirects execution.
Core CPU Components
A modern CPU contains several interconnected hardware subsystems:
+-------------------------------------------------------------------------+
| CENTRAL PROCESSING UNIT (CPU) |
| |
| +--------------------+ Control Signals +------------------------+ |
| | Control Unit | ------------------> | Arithmetic Logic Unit | |
| | (CU) | | (ALU) | |
| +--------------------+ +------------------------+ |
| ^ ^ |
| | | |
| +-------------------------------------------------------------------+ |
| | INTERNAL REGISTERS | |
| | [ PC ] [ MAR ] [ MDR ] [ CIR ] [ ACC ] | |
| +-------------------------------------------------------------------+ |
+-------------------------------------------------------------------------+
| Address Bus (Unidirectional) | Data Bus (Bidirectional)
v v
+-------------------------------------------------------------------------+
| PRIMARY MEMORY (RAM) |
| Stores Instructions and Data in Shared Memory Locations |
+-------------------------------------------------------------------------+
1. Control Unit (CU)
- Manages and coordinates all operations of the CPU.
- Directs the flow of instructions and data through the CPU registers.
- Decodes instructions retrieved from memory.
- Generates control signals and timing pulses to synchronize ALU calculations, register transfers, and memory read/write cycles.
2. Arithmetic Logic Unit (ALU)
- Performs all mathematical calculations: arithmetic operations (addition, subtraction, multiplication, division).
- Performs all logical comparisons: Boolean logic operations (
AND,OR,NOT) and relational comparisons (<,>,==,!=).
3. System Clock
- An electronic quartz oscillator that emits continuous electrical pulses at a fixed frequency.
- Synchronizes all internal processor operations; each micro-operation of the CPU takes a specific number of clock cycles.
4. Cache Memory
- Extremely fast Static RAM (SRAM) located directly on or adjacent to the CPU core.
- Stores frequently and recently accessed instructions and data to minimize access latency to slower dynamic RAM (DRAM).
Special-Purpose CPU Registers
Registers are high-speed, temporary storage memory locations built directly inside the CPU die, operating at processor clock speed:
Register | Full Name | Primary Responsibility |
|---|---|---|
PC | Program Counter | Holds the memory address of the next instruction to be fetched from RAM. Increments automatically after each fetch. |
MAR | Memory Address Register | Holds the memory address of the RAM location currently being read from or written to. Directly connected to the Address Bus. |
MDR | Memory Data Register | Holds the data word or instruction just read from RAM, or data waiting to be written out to RAM. Directly connected to the Data Bus. |
CIR | Current Instruction Register | Holds the binary instruction that is currently being decoded and executed by the Control Unit. |
ACC | Accumulator | Temporarily stores the intermediate results of arithmetic calculations and logic comparisons performed by the ALU. |
System Buses
Buses are sets of parallel conductive pathways (copper tracks on the motherboard or silicon traces inside the chip) that transfer electrical signals between the CPU, memory, and input/output controllers:
1. Address Bus
- Purpose: Carries memory addresses from the CPU to RAM, specifying the physical address of the data or instruction to access.
- Directionality: Unidirectional (one-way only, from CPU $\to$ Memory).
- Bus Width: The number of parallel wires determines the maximum addressable memory capacity. An $n$-bit address bus can address $2^n$ distinct memory locations (e.g. a 32-bit address bus addresses $2^{32} = 4\text{ GiB}$ of RAM).
2. Data Bus
- Purpose: Carries actual data values and program instructions between the CPU, memory, and peripheral controllers.
- Directionality: Bidirectional (two-way, allowing the CPU to read data from memory and write data back to memory).
- Bus Width: The width of the data bus (e.g. 32-bit or 64-bit) determines the word size—the amount of data transferred in a single bus cycle.
3. Control Bus
- Purpose: Transmits synchronization signals, timing pulses, read/write commands, and hardware interrupt requests across CPU and peripheral components.
- Directionality: Bidirectional (signals travel both out from the CU and into the CPU from external devices).
Written practice and self-review
The Von Neumann architecture relies on system buses to connect the Central Processing Unit (CPU) to Primary Storage (RAM).
- State the stored program concept that defines the Von Neumann model.
- Compare the Address Bus and the Data Bus in terms of:
- The type of information carried.
- The directionality of transmission (unidirectional vs bidirectional).
Write an explanation before checking the theory. Check that each claim answers the question, uses the correct concept and explains why it applies. Discuss uncertain points with a teacher. The structured exercise below checks specific facts; it does not automatically mark this explanation.
AI Socratic Tutor
Need guidance? Ask a question or use the hint below.
AI Socratic Tutor is an All-Access Benefit
Unlock step-by-step Socratic hints, algorithm trace table walkthroughs, and error diagnostics for every Cambridge exercise.
You're chatting with an AI tutor, not a person. AI can make mistakes, so double-check its answers.
Exam-Style Question: Trace Register Transfers During Fetch Stage
Complete the sequence of register transfers (using abbreviations PC, MAR, MDR, CIR) during the Fetch stage of the Fetch-Decode-Execute cycle:
- The address of the next instruction is copied from the [Space 1] into the MAR.
- The instruction located at that address in RAM is placed into the [Space 2].
- The address in the [Space 3] is incremented by 1.
- The instruction is copied from the MDR into the [Space 4] for decoding.
Interactive exercises for Module 2 and beyond require an active plan.