The Fetch-Decode-Execute Cycle
The Fetch-Decode-Execute Cycle
A standard process describes the steps needed for processing to take place. It is called the Fetch Decode - Execute cycle or sometimes simply called the Fetch-Execute Cycle.
The CPU has fetched an instruction, decoded it and then executed it. When it has finished one
instruction, it does the next one, and the next one and the next one. In fact, this is all the CPU
does, all day long.
1. FETCH
The first step the CPU carries out is to fetch some data and instructions (program) from main
memory then store them in its own internal temporary memory areas. These memory areas are
called 'registers'.
This is called the 'fetch' part of the cycle.
2. DECODE
The next step is for the CPU to make sense of the instruction it has just fetched. This process is
called 'decode'. The CPU is designed to understand a specific set of commands. These are called
the 'instruction set' of the CPU. Each make of CPU has a different instruction set.
The CPU decodes the instruction and prepares various areas within the chip in readiness of the
next step.
3. EXECUTE
This is the part of the cycle when data processing actually takes place. The instruction is carried
out upon the data (executed). The result of this processing is stored in yet another register.
Once the execute stage is complete, the CPU sets itself up to begin another cycle once more.