Instruction cycle

From Free net encyclopedia

Image:Merge-arrows.gif It has been suggested that this article or section be merged with Fetch-execute cycle. (Discuss)
Image:Merge-arrows.gif It has been suggested that this article or section be merged with Execute cycle. (Discuss)

The instruction cycle is the time period during which one instruction is fetched from memory and executed when a computer is given an instruction in machine language. There are typically five stages of an instruction cycle that the CPU carries out:

  • "Fetch the instruction" from memory. This step brings the instruction into the instruction register, a circuit that holds the instruction so that it can be decoded and executed.
  • "Decode" the instruction.
  • "Execute" the instruction.
  • "Store" in memory any results generated by the operation, or send the results to an output device.

Steps 1 and 2 are called the fetch cycle and are the same for each instruction. Steps 3 and 4 are called the execute cycle and will change with each instruction.

The term refers to both the series of four steps and also the amount of time that it takes to carry out the four steps.

An instruction cycle also is called a machine cycle and fetch-and-execute cycle.