1. Computer Architecture
IGCSE Computer Science (0478)
  • Chapter 6: Automated & Emerging Technologies
  • Data Representation
    • Introduction
    • Why computers use binary (how binary represents data)
    • Number system
      • Introduction
      • Number Conversions
      • Addition of Binary Numbers
      • Logical binary shifts (positive 8-bit integers)
      • Two’s Complement (Signed: Positive and Negative Numbers)
      • Use of the Hexadecimal System
    • Text, Sound and Image
      • Text, Sound and Images
      • File Types
    • Data storage and File compression
      • Measurement of the Size of Computer Memories
      • Lossless and Lossy File Compression
  • Hardware
    • Computer Architecture
      • The CPU & Microprocessors
      • Von Neumann Architecture
      • Fetch-Decode-Execute Cycle (FDE)
      • Characteristics of the CPU
      • CPU Instruction Sets
      • Embedded Systems
    • Input/output devices
      • Input devices
      • Output devices
      • Sensors
    • Data Storage
      • What is Primary Storage?
      • What is Secondary Storage?
      • What is Virtual Memory?
      • What is cloud storage?
    • Network hardware
      • What is a Network Interface Card(NIC)?
      • MAC Addresses & IP Addresses
      • What is a Router?
  1. Computer Architecture

Fetch-Decode-Execute Cycle (FDE)

The Fetch-Decode-Execute Cycle is the basic process the CPU uses to run programs.
The CPU repeats this cycle billions of times per second.
It's how your computer does EVERYTHING - from running games to opening documents.

Why Is It Important?#

Understanding the FDE cycle means understanding how computers ACTUALLY work. This is THE most important concept in computer architecture.

The 3 Stages of FDE Cycle#

The CPU does 3 things over and over:
1.
FETCH - Get an instruction from memory
2.
DECODE - Understand what the instruction means
3.
EXECUTE - Do what the instruction says
Then it repeats... billions of times!

The Complete FDE Cycle - Visual Overview#


STAGE 1: FETCH - Get the Instruction#

What Happens in Fetch?#

The CPU gets an instruction from memory.

Step-by-Step#

Step 1: PC (Program Counter) = 100
        ↓
        "Next instruction is at address 100"

Step 2: PC sends address 100 to MAR (Memory Address Register)
        ↓
        MAR = 100

Step 3: MAR sends address via Address Bus
        ↓
        Address Bus carries 100 to Memory

Step 4: Control Unit sends READ signal via Control Bus
        ↓
        "Memory, please send me the instruction at address 100"

Step 5: Memory finds instruction at address 100: "ADD 5, 3"
        ↓
        Memory sends "ADD 5, 3" via Data Bus

Step 6: MDR (Memory Data Register) receives instruction
        ↓
        MDR = "ADD 5, 3"

Step 7: CIR (Current Instruction Register) gets copy
        ↓
        CIR = "ADD 5, 3"

Step 8: PC increments (adds 1)
        ↓
        PC = 100 → PC = 101
        (Points to next instruction)

Diagram - Fetch Stage Detailed#

What Registers Are Used in Fetch?#

RegisterWhat It Does
PCHolds address of instruction to fetch
MARHolds the address (copy from PC)
MDRReceives the instruction from memory
CIRReceives copy of instruction

What Buses Are Used in Fetch?#

BusDirectionCarries
Address BusCPU → MemoryAddress (100)
Data BusMemory → CPUInstruction (ADD 5, 3)
Control BusCPU → MemoryREAD signal

STAGE 2: DECODE - Understand the Instruction#

What Happens in Decode?#

The Control Unit reads the instruction and figures out what it means.

How Instructions Are Structured#

Every instruction has 2 parts:
Instruction: ADD 5, 3

┌─────────────────┐
│   OPCODE        │  = What operation to do
│   (Operation)   │  = Example: ADD, SUBTRACT, JUMP
└─────────────────┘

┌─────────────────┐
│   OPERAND       │  = What to do it to
│   (Data/Address)│  = Example: 5, 3, or memory location
└─────────────────┘

Example: Breaking Down Instructions#

InstructionOpcodeOperand 1Operand 2Meaning
ADD 5, 3ADD53Add the numbers 5 and 3
LOAD 200LOADAddress 200-Get data from memory address 200
STORE ACCSTOREAccumulator-Save accumulator to memory
JUMP 500JUMPAddress 500-Go to instruction at address 500
COMPARE 10COMPARE10-Compare something with 10

Decode Process#

CIR contains: "ADD 5, 3"
             ↓
Control Unit reads CIR
             ↓
Control Unit splits instruction:
  - Opcode: ADD
  - Operand 1: 5
  - Operand 2: 3
             ↓
Control Unit understands:
  "I need to ADD two numbers: 5 and 3"
  "I need to use the ALU"
  "I need to store result in ACC"
             ↓
Ready to EXECUTE

What Happens During Decode#

1.
Instruction is read - Control Unit looks at CIR
2.
Instruction is split - Breaks into Opcode and Operand
3.
Meaning is understood - "This is ADD, this is SUBTRACT, etc."
4.
Resources are prepared - Gets ready to execute

STAGE 3: EXECUTE - Do the Instruction#

What Happens in Execute?#

The CPU actually performs the instruction.

What Can Happen in Execute?#

The action depends on the instruction:

1. Perform a Calculation#

Instruction: ADD 5, 3

What happens:
- ALU receives 5 and 3
- ALU adds: 5 + 3 = 8
- Result (8) stored in ACC (Accumulator)

Memory/Registers before: ACC = ?
Memory/Registers after:  ACC = 8

2. Store Data to Memory#

Instruction: STORE 200

What happens:
- Data in ACC is written to memory
- Memory address is 200
- ACC value is written to address 200

Memory location 200 before: [Empty]
Memory location 200 after:  [8]

3. Load Data from Memory#

Instruction: LOAD 300

What happens:
- Data from memory address 300 is read
- Data is stored in ACC
- Now ACC has the value from memory

Memory location 300: [15]
ACC before: [8]
ACC after:  [15]  (loaded from memory)

4. Make a Decision (Conditional Jump)#

Instruction: IF ACC > 0 THEN JUMP 500

What happens:
- Check if ACC is greater than 0
- If TRUE: PC jumps to address 500
- If FALSE: PC continues normally

Result: The next instruction comes from address 500 (if true)
        or from the normal sequence (if false)

5. Comparison#

Instruction: COMPARE ACC WITH 10

What happens:
- ALU compares ACC value with 10
- Sets status flags (Equal, Greater, Less)
- These flags used by later instructions

Example:
If ACC = 10: Equal flag = True
If ACC = 15: Greater flag = True
If ACC = 5:  Less flag = True

Execute Diagram#


Complete FDE Cycle - Real Example#

Example: Add Two Numbers#

Memory:
Address 100: ADD 7, 4
Address 101: STORE 200
Address 102: LOAD 300
...
Address 200: [Empty - will store result]
Address 300: [Some data]

CYCLE 1: First Instruction (ADD 7, 4)#

FETCH:
PC = 100
PC → MAR (copy address)
Address Bus sends 100 to Memory
Memory sends "ADD 7, 4" via Data Bus
MDR = "ADD 7, 4"
CIR = "ADD 7, 4"
PC increments to 101
DECODE:
Control Unit reads CIR
Opcode = ADD
Operands = 7, 4
Understands: "Add 7 and 4, store in ACC"
EXECUTE:
ALU calculates: 7 + 4 = 11
ACC = 11

CYCLE 2: Second Instruction (STORE 200)#

FETCH:
PC = 101
Address Bus sends 101 to Memory
Memory sends "STORE 200"
CIR = "STORE 200"
PC increments to 102
DECODE:
Control Unit reads CIR
Opcode = STORE
Operand = 200 (memory address)
Understands: "Store ACC value to memory location 200"
EXECUTE:
ACC value (11) written to memory address 200
Memory[200] = 11

CYCLE 3: Third Instruction (LOAD 300)#

FETCH:
PC = 102
Address Bus sends 102 to Memory
Memory sends "LOAD 300"
CIR = "LOAD 300"
PC increments to 103
DECODE:
Control Unit reads CIR
Opcode = LOAD
Operand = 300 (memory address)
Understands: "Load data from memory location 300 into ACC"
EXECUTE:
Data from memory[300] loaded into ACC
ACC = [whatever was in address 300]

Important Points to Remember#

✅ Always Remember These Facts#

1.
Fetch gets instruction from memory
2.
Decode understands what instruction means
3.
Execute performs the instruction
4.
Cycle repeats billions of times per second
5.
PC increments after fetch (points to next instruction)
6.
Instructions have 2 parts: Opcode (what) + Operand (what to do it to)

❌ Common Mistakes to Avoid#

MistakeCorrection
"PC increments before fetch"❌ PC increments AFTER fetch
"Decode happens after execute"❌ Decode happens BEFORE execute
"All instructions do math"❌ Some load, some store, some jump
"MDR and MAR do the same thing"❌ MAR = address, MDR = data
"FDE cycle takes long time"❌ Happens in nanoseconds (billions/second)

Registers Used in FDE Cycle#

Summary Table#

RegisterUsed in StagePurpose
PCFETCHHolds address of next instruction
MARFETCHHolds address to access memory
MDRFETCHHolds instruction/data from memory
CIRFETCH & DECODEHolds instruction being decoded
ACCEXECUTEHolds results of calculations

Buses Used in FDE Cycle#

Summary Table#

BusUsed in StageDirectionCarries
Address BusFETCHCPU → MemoryMemory address
Data BusFETCHMemory → CPUInstruction/Data
Control BusFETCHCPU → MemoryREAD/WRITE signal

Exam Question: How to Answer#

Type 1: Describe the FDE Cycle (3 marks)#

Question: "Describe the three stages of the Fetch-Decode-Execute cycle." [3 marks]
WRONG Answer ❌:
"The CPU fetches, decodes, and executes instructions."
(Too brief, no detail)
CORRECT Answer ✅:
1. FETCH: The CPU fetches the next instruction from memory using 
   the address in the Program Counter.

2. DECODE: The Control Unit reads the instruction and determines 
   what operation needs to be performed.

3. EXECUTE: The CPU performs the operation specified by the 
   instruction (such as addition, storing data, or jumping to a 
   new location). The cycle then repeats.

Type 2: Explain How an Instruction is Fetched (6 marks)#

Question: "Explain how an instruction is fetched using Von Neumann architecture." [6 marks]
CORRECT Answer ✅:
1. The Program Counter (PC) holds the address of the next 
   instruction to be fetched. (1 mark)

2. The address held in the PC is sent to the Memory Address 
   Register (MAR). (1 mark)

3. The memory address is sent using the Address Bus. (1 mark)

4. The Control Unit sends a READ signal via the Control Bus. (1 mark)

5. The instruction is sent from memory to the Memory Data Register 
   (MDR) via the Data Bus. (1 mark)

6. The instruction is transferred to the Current Instruction 
   Register (CIR), and the PC increments by 1. (1 mark)
Why this is correct:
✅ Each step is explained
✅ Registers are named
✅ Buses are mentioned
✅ Shows the sequence clearly

Type 3: Execute Instruction (2 marks)#

Question: "What happens during the execute stage when the instruction is ADD 5, 3?" [2 marks]
CORRECT Answer ✅:
1. The ALU receives the two operands (5 and 3).

2. The ALU adds them together (5 + 3 = 8) and stores the result 
   in the Accumulator (ACC).

Practice Questions#

Question 1: Fetch Stage#

Describe what happens during the FETCH stage of the FDE cycle. [4 marks]
Click to see answer
Sample Answer:
"1. The Program Counter holds the address of the next instruction to fetch.
2. This address is copied to the Memory Address Register.
3. The address is sent via the Address Bus to memory.
4. The Control Unit sends a READ signal on the Control Bus.
5. Memory returns the instruction via the Data Bus to the MDR.
6. The instruction is copied to the Current Instruction Register.
7. The Program Counter increments by 1 to point to the next instruction."
Why this is correct:
✅ Describes sequence of events
✅ Mentions all key registers
✅ Shows how buses are used
✅ Explains PC increment

Question 2: Decode Stage#

Explain what happens during the DECODE stage. [2 marks]
Click to see answer
Sample Answer:
"The Control Unit reads the instruction in the Current Instruction Register and breaks it into two parts: the opcode (what operation to perform) and the operand (what data to use). The Control Unit then understands what needs to be done and prepares to execute the instruction."
Why this is correct:
✅ Mentions CIR
✅ Explains opcode and operand
✅ Shows understanding of the process

Question 3: Execute Stage#

What might happen during the EXECUTE stage? Give three examples. [3 marks]
Click to see answer
Sample Answer:
"1. The CPU might perform a calculation (such as addition or subtraction) using the ALU, with the result stored in the Accumulator.
2.
The CPU might store data or results from the Accumulator to a memory location.
3.
The CPU might load data from a memory location into the Accumulator."
Why this is correct:
✅ Gives three different examples
✅ Each example is valid for execute stage
✅ Shows variety of possible operations

Question 4: Full Cycle Explanation#

Trace through one complete FDE cycle for the instruction LOAD 300, explaining what happens at each stage. [6 marks]
Click to see answer
Sample Answer:
FETCH Stage:
The Program Counter contains the address (say, 100) of the next instruction
This address is placed in the MAR
The address is sent via Address Bus to memory
The Control Unit sends a READ signal via Control Bus
Memory returns "LOAD 300" via Data Bus to MDR
MDR transfers to CIR
PC increments to 101
DECODE Stage:
Control Unit reads the instruction in CIR: "LOAD 300"
Opcode: LOAD (meaning retrieve data)
Operand: 300 (memory location)
Understanding: Load data from address 300 into ACC
EXECUTE Stage:
The CPU accesses memory location 300
The data stored there is retrieved
This data is loaded into the Accumulator
Why this is correct:
✅ Explains all three stages
✅ Shows complete flow of data
✅ Mentions all key components
✅ Logical sequence throughout

Key Terms - Definitions#

TermSimple Meaning
OpcodeThe operation part of instruction (ADD, LOAD, STORE, etc.)
OperandThe data part of instruction (numbers, addresses, etc.)
IncrementAdd 1 to the number (PC goes 100 → 101)
FetchGet an instruction from memory
DecodeUnderstand what the instruction means
ExecutePerform the instruction
CycleProcess that repeats over and over
NanosecondOne billionth of a second
ALUComponent that does math operations
AccumulatorRegister that stores calculation results

Exam Tips#

✅ DO THIS#

1.
Use correct terminology: "Fetch-Decode-Execute cycle" not "FDE process"
2.
Mention registers by name: "Program Counter", "Memory Address Register"
3.
Explain the sequence: Show the order of events
4.
Mention buses: Show how data moves
5.
Give examples: Real instructions help show understanding
6.
Be specific: "ADD 5, 3" not just "an instruction"
7.
Count your marks: 2 marks = 2 points, 3 marks = 3 points

❌ DON'T DO THIS#

1.
Don't be vague: "The CPU does something" is not enough
2.
Don't skip stages: Explain fetch, decode, AND execute
3.
Don't mix up order: It's always Fetch → Decode → Execute
4.
Don't forget PC increment: This is important in fetch
5.
Don't assume understanding: Explain HOW and WHY
6.
Don't use abbreviations only: Write "Program Counter" first time
7.
Don't over-explain: Answer what is asked

How to Learn This Topic#

Day 1: Understand Each Stage#

Read about FETCH
Read about DECODE
Read about EXECUTE
Understand what each stage does

Day 2: Learn the Details#

Learn which registers are used
Learn which buses are used
Learn what happens in each stage in detail

Day 3: Practice Examples#

Try the practice questions
Trace through instructions step-by-step
Make your own examples

Day 4: Exam Preparation#

Practice writing answers
Time yourself (don't spend too long)
Check your answers
Learn from mistakes

Quick Reference Card#

Fetch Stage#

PC → MAR (copy address)
Address Bus sends to memory
Control Bus sends READ signal
Data Bus returns instruction to MDR
MDR → CIR (copy instruction)
PC increments

Decode Stage#

CIR holds instruction
Control Unit reads instruction
Splits into Opcode + Operand
Understands what to do

Execute Stage#

Performs the operation
Might calculate (ALU)
Might load (memory → register)
Might store (register → memory)
Might jump (change PC)

Then Repeat#

Cycle repeats billions of times per second

Visual Summary - All 3 Stages#


Are You Ready?#

Checklist - Do You Know?#

What does FDE stand for?
What are the 3 stages?
What happens in FETCH?
What happens in DECODE?
What happens in EXECUTE?
Which registers are used?
Which buses are used?
What is an opcode?
What is an operand?
How often does FDE repeat?
Can you trace an instruction through all 3 stages?
Can you answer practice questions?
Can you explain to someone else?
If you checked all boxes ✅ - You're ready for exam!

Common Questions Answered#

Q: Does FDE cycle always have 3 stages?#

A: Yes, always. Every instruction goes through Fetch, Decode, Execute.

Q: Can you skip a stage?#

A: No. All three stages are required for every instruction.

Q: Why does PC increment after fetch?#

A: So it points to the next instruction. This way, instructions are executed in order.

Q: What if PC doesn't increment?#

A: We would keep executing the same instruction forever. PC increment is critical.

Q: Can operand be an address?#

A: Yes. Operand can be a number OR a memory address where data is stored.

Q: Why split instruction into opcode and operand?#

A: Because CPU needs to know WHAT to do (opcode) and WHAT to do it to (operand).

Q: How fast is FDE cycle?#

A: Modern CPUs run FDE billions of times per second (GHz = gigahertz = billions).
Modified at 2026-04-03 09:43:27
Previous
Von Neumann Architecture
Next
Characteristics of the CPU
Built with