Fetch Execute Cycle
The fetch execute cycle is the basic operation (instruction) cycle of a computer (also known as the fetch decode execute cycle).
During the fetch execute cycle, the computer retrieves a program instruction from its memory. It then establishes and carries out the actions that are required for that instruction.
The cycle of fetching, decoding, and executing an instruction is continually repeated by the CPU whilst the computer is turned on.
Step | Fetch execute cycle steps | Simplified description |
---|---|---|
1 | The PC contains the address of the memory location that has the next instruction which has to be fetched | PC has address of next instruction |
2 | This address is then copied from the PC to the MAR via the address bus | PC copied to the MAR |
3 | The contents (instruction) at the memory location (address) contained in MAR are then copied into the MDR | Lookup MAR and get contents. Copy contents into the MDR |
4 | The contents (instruction) in the MDR is then copied and placed into the CIR | Copy MDR contents into the CIR |
5 | The value in the PC is then incremented by 1 so that it now points to the next instruction which has to be fetched | PC is then incremented by 1 |
6 | The instruction is finally decoded and then executed by sending out signals (via control bus) to the various components of the computer | The instruction is decoded and then executed |
7 | Repeat |