The Fetch-Decode-Execute cycle of a computer is the process by which a computer:
This cycle is repeated continuously by the central processing unit (CPU), from bootup to when the computer is shut down. In modern computers this means completing the cycle billions of times a second! Without it nothing would be able to be calculated.
The circuits used in the CPU during the cycle are:
To describe the cycle we can use register notation. This is a very simple way of noting all the steps involved. In all cases where you see brackets e.g. [PC], this means that the contents of the thing inside the brackets is loaded. In the case of the first line, the contents of the program counter is loaded into the Memory Address Register.
(Increment the PC for next cycle at the same time)
decoded then executed
To better understand what is going on at each stage we'll now look at a detailed description:
The contents of the Program Counter, the address of the next instruction to be executed, is placed into the Memory Address Register
The address is sent from the MAR along the address bus to the Main Memory. The instruction at that address is found and returned along the data bus to the Memory Buffer Register. At the same time the contents of the Program Counter is increased by 1, to reference the next instruction to be executed.
The MBR loads the Current Instruction Register with the instruction to be executed.
The instruction is decoded and executed using the ALU if necessary.
The Cycle starts again!
Text is available under the Creative Commons Attribution-ShareAlike License https://en.wikibooks.org/wiki/A-level_Computing