Stored Program Computers
The fetch-decode-execute cycle is the continuous process a CPU uses to run a program: it takes one instruction at a time from main memory, works out what it means and carries it out. Under the stored program concept, the CPU fetches each instruction from main memory in this way.
During fetch, the CPU keeps the address of the next instruction in one of its registers, small and very fast stores inside the CPU. That address is sent along the address bus to main memory, and the control bus carries the signal to read it. The instruction stored at that address travels back along the data bus and is placed in a register in the CPU, while the stored address is updated to point to the next instruction.
During decode, the control unit interprets the fetched instruction to work out what must happen. During execute, the CPU carries the instruction out: the arithmetic logic unit (ALU) may perform a calculation, data may be moved between registers, or main memory may be read from or written to. Any result produced is stored in a register or written back to main memory.
The three stages form a continuous loop. Once one instruction has been executed, the CPU fetches the next instruction from the address it has stored, and the cycle starts again. Each cycle is extremely short, so a processor can complete many millions of cycles every second while a program is running.
Edexcel GCSE Computer Science · Stored Program Computers