Instruction cycle:
An instruction cycle (Sometimes called a fetch-decode-execute cycle) is the
basic operational process of a computer. It is the process by which a computer
retrieves a program instruction from its memory, determines what actions the
instruction dictates, and carries out those actions.
Basic instruction cycle |
Using the simplified two-steps description given,
the instruction cycle is depicted.
(i) Fetch cycle:
At the beginning of each instruction cycle, the CPU fetches an instruction from
memory. In a typical CPU, a register called the program counter (PC) holds the
address of the instruction is to be fetched next. The fetched instruction is
loaded into a register in the CPU known as the instruction register (IR). The
CPU interprets the instruction and per forms the required actions fall into
four categories.
Ø CPU-Memory:
Data may be transferred from the CPU to memory or from memory to CPU.
Ø CPU-I/O:
Data
may be transferred to or from the outside world by transferring between the CPU
and an I/O module.
Ø Data
Processing: The CPU may perform some arithmetic or
logic operation on data.
Ø Control:
An instruction may specify that the sequence of execution be altered.
(ii) Execute cycle:
Which a particular instruction on such processors could involve more than one
reference to memory and also instead of memory reference an instruction may
specify an I/O operation.
No comments:
Post a Comment