0% found this document useful (0 votes)
10 views2 pages

Fetch Decode and Execute Cycle

Uploaded by

charlandrob
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views2 pages

Fetch Decode and Execute Cycle

Uploaded by

charlandrob
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Fetch, Decode-Execute Cycle:

What is a computer:
 A computer is an electronic device that takes input, processes data and delivers
output.
 To process data, a computer follows a set of instructions, known as a program.

Fetch Stage:
 The program counter is checked, as it holds the address of the next instruction to be
executed.
 The address store is then copied into the memory address register (MAR).
 The address is then sent along the address bus to main memory, where it waits to
receive a signal from the control bus.
 As we want to read the data stored in the memory address, the control unit sends a
read signal along the control bus to main memory.
 The contents stored in the desired memory address can now be sent along the data
bus to the memory data register.
 The data received by the memory data register from memory now gets copied into
the current instruction register.
 We now increment the contents of the program counter so the address it contains
points to the next instruction to be executed.

Decode Stage:
 This is the stage where the instruction held in the current instruction register is now
decoded by the decode unit.
 The instruction is made up of two parts:
o Opcode: What to do
o Operand: What to do it to
 The operand could contain the data or an address where the data is found.
 We decode the instruction, and compare the instruction with what to do. E.g. a load
instruction.
 If it was a load instruction, we need to load the contents of the memory location into
the CPU’s accumulator.
 We send the memory locations address to the memory address register.
 We then send the address down the address bus to main memory.
 We want to read the data stored in the memory address, so the control unit sends a
read signal along the control bus to main memory.
 The contents stored in memory at the address can now be sent along the data bus to
the memory data register.
 The contents of the memory data register are now copied to the accumulator. The
instruction is now complete.
Branching:
 In the current instruction register, we have an instruction that means branch always.
 This replaces the value held in the program counter with the contents of the operand
from the current instruction register.
 When the next fetch cycle begins, the program counter is checked.
 As its contents have been previously updated to a new memory location and not
simply incremented, the program can jump around memory.

You might also like