5.2Key registers
The idea
A handful of special registers do the housekeeping: PC, IR, MAR, MDR, ACC, SP and the status flags.
Think of it like this: Like a clerk's tools: a bookmark (PC), the page being read (IR), a note of which shelf (MAR), a tray for the item (MDR).
Why it exists
Knowing who holds what lets you trace any instruction step by step.
How it works
- PC: address of the next instruction. IR: the current instruction.
- MAR: address sent to memory. MDR: data coming from / going to memory.
- ACC: results of the ALU. SP: top of the stack. PSW: condition flags (Z, C, S, V).
Worked example: Which register drives the address bus?
The MAR. The PC value is copied into MAR first.
Now play with it
- →Step through and see which register lights up for each role.
- PC holds the address of the next instruction
- MAR ← PC: MAR drives the address bus
- MDR ← M[MAR]: MDR buffers data from/to memory
- IR ← MDR: IR keeps the current instruction while it is decoded
- PC ← PC + 1 (already pointing at the next instruction)
- ALU result goes to ACC; condition flags to PSW
- SP points at the top of the stack (PUSH/POP, CALL/RET)
Values shown are for an example LOAD at address 100.
Check yourself
Which register holds the address placed on the address bus for a memory access?
Exam notes (the dense version)
PC next instr address · IR current instr · MAR address to memory · MDR data to/from memory · ACC, SP, PSW/flags (Z, C, S, V).
Previous year questions: ALU, Datapath & Control Unit (3)
PYQs are grouped by topic, so this is the full set for ALU, Datapath & Control Unit; try the ones that match this subtopic. Open all 3 on the topic page.