Fetch Execute Decode
1. The Fetch-Decode-Execute cycle
The Fetch-Decode-Execute cycle is the basic method used by the CPU to carry out a single instruction contained in a computer program.
The diagram below shows how each step relate to one another. First there is a fetch operation followed by a decode operation and then an execute operation. Then another fetch begins and the cycle starts all over again.
The diagram below shows the software to be run is located in main memory (RAM). Usually the operating system loads it, ready for the CPU to use. The very first instruction in the program needs to be loaded into the CPU (fetch)
The fetch action loads an instruction into the CPU then the decode and execute stage take place inside the CPU. Once the first cycle is complete, the CPU fetches the next instruction.