CPU Registers
What Are Registers?
Registers are high-speed storage locations built inside the CPU. They hold the data, addresses and instructions that the CPU is actively working with. They are faster than cache and far faster than RAM, but hold only tiny amounts of data.
The Four Key Registers
Program Counter (PC)
- Holds the memory address of the next instruction to be fetched
- After each fetch, the PC is automatically incremented to point to the following instruction
- Acts as the CPU’s “bookmark” in the program
Memory Address Register (MAR)
- Holds the address in memory that the CPU wants to read from or write to
- Receives the address from the PC (during fetch) or from the program (during data access)
- Connected to the Address Bus
Memory Data Register (MDR)
- Holds the data that has just been read from or is about to be written to memory
- Acts as a buffer between the CPU and RAM
- Connected to the Data Bus
Accumulator (ACC)
- Holds the result of calculations performed by the ALU
- Also used as a source operand going into ALU operations
Register Roles During the FDE Cycle
| Stage | Registers Involved |
|---|---|
| Fetch | PC → MAR (address copied); MDR ← RAM (instruction loaded) |
| Decode | CU reads from MDR |
| Execute | ALU writes result to ACC |
See Fetch-Decode-Execute Cycle for the full cycle.
Quick Reference
| Register | Abbreviation | Holds |
|---|---|---|
| Program Counter | PC | Address of the next instruction |
| Memory Address Register | MAR | Address currently being accessed in RAM |
| Memory Data Register | MDR | Data being transferred to/from RAM |
| Accumulator | ACC | Result of ALU operations |
Exam Questions
Q: What is the role of the Program Counter?
It holds the memory address of the next instruction to be fetched. After each fetch it is incremented so the CPU knows where to get the next instruction.
Q: What is the difference between the MAR and MDR?
The MAR holds the address in memory to access, while the MDR holds the actual data that was read from or will be written to that address.
Exam Tip
A common mistake is confusing MAR and MDR. Remember: MAR = Address (where to look), MDR = Data (what was found).