Fetch Execute Cycle
Learning Objectives
➢ Describe in simple terms the fetch / decode /
execute cycle and
➢ The effects of the stages of the cycle
on specific registers.
The Operation Of The CPU
▫ The fetch execute cycle is the basic operation (instruction)
cycle of a computer (also known as the fetch decode execute
cycle).
▫ The cycle of fetching, decoding, and
executing an instruction is continually
repeated by the CPU whilst the
computer is turned on.
When the computer is switched on, the CPU repeats a set of
actions called the fetch-execute cycle.
1. The control unit fetches an instruction from main
memory. The instructions are coded as binary numbers.
2. The control unit decodes the instructions so it knows
what action to carried out.
3. The ALU carries out the action. That is called executing
the instructions.
4. Repeat until there are no more instructions.
FETCH
▫ During the fetch execute cycle, the computer retrieves a
program instruction from secondary storage to main
memory.
▫ Fetch: copying of an instruction binary number from main
memory into instruction register on CPU
▫ Register holds only one instruction at a time.
DECODE
▫ CPU interprets the instruction and determines what operation
needs to be performed.
EXECUTE
▫ The Arithmetic Logic Unit (ALU) then executes the decoded
instructions - tasks such as numerical calculations or logical
decisions.
▫ Send and write the results back in main memory
SUMMARY
The CPU continuously reads instructions stored in main memory
and executes them as required.
▫ Fetch : the next instruction is fetched to the CPU from main
memory.
▫ Decode : the instruction is decoded to work out what is it.
▫ Execute : the instruction is executed (carried out). This may
include reading/writing from/to main memory.