|
The fetch/execute cycle
is the process of
fetching an instruction
from memory, decoding it
and then executing it.
The program counter in
the CPU contains the
address of the next
instruction to be
fetched.
The instruction is
represented by a binary
number, called an opcode.
Data (called the
operand), for the
instruction to work on,
is at the address
following that at which
the instruction is
stored.
If the opcode is ADD and
is stored at address
10011000, then the data,
eg. 10, will be stored
at 10011001.
The following actions
are taken during a
fetch/execute cycle to
fetch the opcode and
operand.
Fetch opcode (read
memory).
Increment program
counter.
Fetch operand (read
memory).
Increment program
counter.
Execute instruction.
|