GCSE · Computer Science · OCR · Spec J277

Registers

Your CPU has a few tiny, very fast stores built right into it. Every fetched instruction gets passed between them like a relay baton. Learn who holds it when.

Computer Science · Inside the CPU

Follow one instruction through the registers

Main memory holds the instruction LOAD 2 at address 0 and the number 42 at address 2. Press Next and watch each value move.

Before each Next, predict which box will change, and what it will hold.

Phase: Ready

PC

0

MAR

—

Address bus

—

Data bus

—

MDR

—

CIR

—

Acc

—

Output

 

Step 1: Nothing fetched yet. The program counter holds 0: the address of the next instruction the CPU needs to fetch.

1 / 10

A dash means that box isn't part of the story yet. Every value here is the lesson's own worked trace.

Step 1 of 10: Nothing fetched yet. The program counter holds 0: the address of the next instruction the CPU needs to fetch..

Watch out: The MDR takes whatever comes back from memory, instruction or data. Only an instruction is copied on to the CIR.

Computer Science · Structure

Where the registers sit

Tap any part to see its job, then follow the two buses between the MAR, the MDR and main memory.

CPUaddress busdata bus

Tap any part of the diagram to see what it does.

Which register?

Put each one where it lives

Pick an item, then the register that holds it.

Still to sort

PC (0)

Address of the NEXT instruction

Where the line is: The PC and the MAR both hold addresses. The PC's is the next instruction to fetch; the MAR's is the one being looked up right now.

MAR (0)

Address being looked up in RAM now

MDR (0)

Whatever has just arrived from memory

Where the line is: The MDR takes data and instructions alike. Only an instruction is copied on to the CIR.

CIR (0)

The instruction to be executed

Acc (0)

Data for calculations, and their results

8 of 8 still to sort.

Check the method

One line of this fetch is wrong

Describe how the CPU fetches an instruction from main memory.

Jordan's answer — which line goes wrong?

Decode and execute

Where does the data go?

LOAD 2 has been fetched and decoded. Address 2 went into the MAR, and the number 42 has just arrived in the MDR.

Where does 42 go next? Pick the idea closest to what you think right now.
How sure are you?

WHAT YOU'VE LEARNED

A quick recap of today's lesson.

The CPU's tiny, super-fast stores, and how they pass one instruction along from memory to the moment it runs.

What you need to know

  • A register is a very small, very fast memory location inside the CPU. Each register has its own job.
  • The program counter (PC) holds the address of the next instruction the CPU needs to fetch.
  • Have a goPredict: the PC holds 30 when a fetch begins. Which memory address will the CPU fetch the instruction from?

    Address 30.

    The PC holds the address of the next instruction to fetch, so 30 is where the CPU goes. It isn't a count of instructions already run.

  • MAR, the memory address register, holds the address being used to find data or an instruction in RAM.
  • Anything fetched from memory, data or instruction, arrives in the memory data register (MDR).
  • In the current instruction register (CIR) sits the instruction to be executed, held as a binary pattern.
  • Have a goYour mate swears the MDR and the CIR are basically twins: 'they both just hold the instruction.' What's your one-line comeback?

    The MDR holds whatever arrives from memory, data included; the CIR holds only the instruction to be executed.

    The MDR takes data as well as instructions, but the CIR holds only the instruction to be executed, so data doesn't belong there.

  • Calculations use the accumulator (Acc): it holds the data being worked on and the results.
  • Fetching starts with a copy: the PC's address goes into the MAR, which sends it along the address bus to memory.
  • Back along the data bus comes the instruction, into the MDR, and it is then copied into the CIR.
  • Once the fetch is done, the PC goes up by one, pointing at the next instruction in sequence.
  • Have a goSpot the problem: 'The PC's address moves into the MAR, so the PC is left empty until the fetch ends.'

    It's copied, not moved: the PC keeps its address, then goes up by one.

    Fetching starts with a copy, so the PC still holds its value; once the fetch is done it is increased by one to point at the next instruction.

  • Then the control unit decodes the instruction in the CIR and tells the other components what to do.

The big picture

Registers are very small, very fast memory locations inside the CPU, each with one job. The PC holds the address of the next instruction; the MAR, the address being looked up in RAM; the MDR, whatever is fetched from memory; the CIR, the instruction to be executed; the accumulator, data for calculations and their results. During a fetch the PC's address is copied to the MAR and sent along the address bus; the instruction returns along the data bus to the MDR, is copied to the CIR, and the PC goes up by one. For LOAD 2, address 2 goes into the MAR and the returned data into the accumulator.

Key points

1Registers are very small, very fast memory locations inside the CPU, each with its own function.
2Two registers hold addresses: the PC (next instruction to fetch) and the MAR (address being looked up now).
3Everything fetched from memory arrives in the MDR; an instruction is then copied to the CIR.
4Fetch order: PC → MAR → address bus → main memory → data bus → MDR → CIR, then the PC goes up by one.
5The accumulator holds data used in calculations and their results. LOAD 2 puts the data from address 2 there.

Worked example

Problem

Part-way through a cycle, the registers read: PC 8, MAR 7, MDR LOAD 12, CIR LOAD 12, Acc 5. Has the fetch of LOAD 12 finished? Address 12 holds the number 30: say which registers change during the execute, and to what.

⚠ Watch out

Thinking the PC counts how many instructions have run. It holds an address: the address of the next instruction to fetch. It goes up by one after each fetch so that it points to the next instruction in sequence.

🧠

Memory hook

Fetch order: Please Make My Coffee. PC → MAR → MDR → CIR. Then the PC adds one, ready for the next cup.

✓

Check yourself

Close the page. Write the fetch as a chain of arrows from the PC, naming the bus each way. Then say where LOAD 2's data ends up, and why.

Flashcards

(14)
What is a register?
A very small, very fast memory location inside the CPU. Each register has its own function.
What does the program counter (PC) hold?
The memory address of the next instruction the CPU needs to fetch.
What happens to the PC after each fetch?
It is increased by one, so it points to the next instruction in sequence.
What does the memory address register (MAR) store?
The memory address used when searching for data or an instruction in RAM.
What does the memory data register (MDR) store?
The data or instruction that has been fetched from memory.
What does the current instruction register (CIR) hold?
The binary representation of the instruction that is to be executed.
What does the accumulator (Acc) store?
Data being used in calculations, and the results of calculations.
Which bus carries the address from the MAR to main memory?
The address bus.
Which bus brings the fetched instruction back into the MDR?
The data bus.
Where does a fetched instruction go after the MDR?
It is copied into the CIR.
What is the first step of the fetch?
The address held in the PC is copied into the MAR.
What does the control unit do with the instruction in the CIR?
Decodes it and tells the other components what to do.
Executing LOAD 2: what is placed in the MAR?
The address 2.
Executing LOAD 2: where is the returned value stored, and why?
In the accumulator, because it is data and not an instruction.

Tap any card to flip it, or use Study as deck to go through them one at a time. In the full lesson these run as a spaced-repetition deck — you rate each card Hard, Good or Easy and the tricky ones keep coming back until they stick.

Learning with Lightbulb is opening soon

You can use this lesson now. Join the waitlist and we'll let you know when the full Lightbulb experience is ready.

Keep me posted

More OCR GCSE Computer Science topics

See the full OCR Computer Science curriculum →

How this lesson was checked. This OCR GCSE Computer Science (specification J277)lesson was published through Lightbulb Learning's human-designed editorial process — the educational standards, accuracy rules and publication checks it must pass were authored and approved by Philip Halpin. It passed subject-specific assessment, automated educational checks and technical publication verification before going live (publication checks completed 9 November 2026). Published pages are monitored, human spot-checking is ongoing across the lesson library, and anything found wrong is corrected or withdrawn. How our lessons are made and checked. Spotted a mistake? Email hello@lightbulblearning.co and we'll review it.