If you want to understand the instruction cycle you need to understand the instruction execution first. We also described the execution cycle in detail.
Instruction Execution: The actual execution of an instruction, such as the move instruction, generally requires a number of machine cycles. The instruction is retrieved from storage, interpreted, and executed. These functions generally require at least two machine cycles called.
- Instruction cycle, and
- Execution cycle.
The instruction cycle is the first machine cycle in the execution of an instruction. Four distinct steps are performed during the instruction cycle. These are:
- The instruction is fetched from primary memory and placed in a register called a storage register.
- The opcode is moved to the instruction register and decoded. This is accomplished with aid of operation decoders.
- The operands are placed in one or more address registers, depending on the number of operands in the instruction.
- The address of the next instruction is determined.
Instructions are executed one after the other. Normally next instruction will be located immediately after the current instruction. Its address is simply the address of the current instruction plus the number of locations occupied by the current instruction.
Sometimes it may be necessary is a program to branch, or transfer control, to an instruction other than the next instruction. In such cases, the current instruction indicates the address of the next instruction.
This address is then placed in the instruction counter, and the sequential section of instructions is resumed until another branch instruction is encountered.
The execution cycle represents the remaining machine cycles in the execution of an instruction. The execution cycle may consist of more than one machine cycle.
The time required to complete the execution cycle is referred to as execution time. Throughout this cycle, operations are controlled by the instruction register.
The steps performed in an execution cycle depend on the instruction being executed. Let cycle the control unit would decode the instruction and directed the ALU to perform the ADD operation. It would also have placed the addresses of the operands is the address register.
The execution cycle would the following:
- Operands would be obtained from the primary locations indicated in the address register. One value would be placed in a storage register and the other would be placed in the accumulator register.
- ALU would then add these numbers.
- The sum would be stored in the accumulator register.
The instruction cycle of the next instruction would begin next. This instruction would most likely involve moving the content of the accumulator register (the sum of the two numbers) to a location in the primary memory.
You may like also