The fetch–decode–execute cycle Cambridge IGCSE Computer Science revision

Not started

Learn it

In plain words

A CPU does the same three things over and over, billions of times a second: fetch the next instruction from memory, work out what it means, and carry it out.

Follow one instruction on its journey and the registers make sense: each one is a stopping place on the way.

6 things to know

  1. Fetch: the address in the program counter is copied to the memory address register, along the address bus.
  2. The instruction at that address in RAM is copied to the memory data register, along the data bus.
  3. The program counter is increased by one, so it points at the next instruction.
  4. The instruction is copied from the memory data register to the current instruction register.
  5. Decode: the control unit decodes the instruction in the current instruction register.
  6. Execute: the control unit sends control signals to carry the instruction out. Any calculation is done by the ALU and its result is stored in the accumulator. Then the cycle starts again.

Worked example

The program counter holds 20. Describe the fetch stage for this instruction.

  1. The address 20 is copied from the PC to the MAR.
  2. The instruction stored at address 20 in RAM is sent along the data bus to the MDR.
  3. The PC is increased to 21, ready for the next cycle.
  4. The instruction is copied from the MDR to the CIR, ready to be decoded.

Tips and tricks

  • Get the order right: PC to MAR, memory to MDR, MDR to CIR. Draw it as a chain of arrows if that helps you remember.
  • Name the bus as well as the register. The address travels on the address bus, the instruction on the data bus.
5 questions, about 2 minutes.

It lands in your notebook with its questions as flashcards.

The fetch–decode–execute cycle: 5 questions and answers

These are the quiz’s questions. Do the quiz first, then come back here for the ones that got you.

  1. What is the correct order of the cycle?
    • decode, fetch, execute
    • execute, decode, fetch
    • fetch, decode, execute (the answer)
    • fetch, execute, decode

    Get it, understand it, do it.

  2. In the fetch stage, where is the address in the program counter copied to?
    • the accumulator
    • the memory address register (the answer)
    • the current instruction register
    • the ALU

    The MAR holds the address that memory is asked for.

  3. Where does a fetched instruction go first when it arrives from RAM?
    • the program counter
    • the accumulator
    • the memory data register (the answer)
    • the control unit

    It then moves on to the CIR.

  4. Which component decodes the instruction?
    • the control unit (the answer)
    • the ALU
    • the accumulator
    • the data bus

    The control unit decodes it and sends out control signals.

  5. What happens to the program counter during the fetch stage?
    • It is set to zero.
    • It is increased by one. (the answer)
    • It is copied to the accumulator.
    • Nothing.

    It then holds the address of the next instruction.

Still stuck on this one?Ask in the Papermunch Discord, or help someone else who is. Discord is for ages 13 and up.Join the server

Things you can type

Or go straight to

Or browse a shelf