The fetch-decode-execute cycle
The three phases of the cycle on a small accumulator machine: the role of the program counter, the instruction register and the accumulator, stepping through short programs, clock and frequency.
- 27 cards
- 5 topics
- Free
The outline, topic by topic
Each topic is weighted the way the exam weighs it.
- Concepts
- Questions
- Sort and link
- The numbers
- Understand
A few cards from the deck
Fetch-decode-execute cycle: what is it?
Show the answer
The processor's endless loop: read the instruction at the designated address, work out what it asks, then carry it out.
Fetch: the instruction goes from memory to the instruction register and the counter advances. Decode: the control unit reads the opcode. Execute: the ALU or memory does the work.
On an accumulator machine where each instruction fills one cell, the program counter advances during the fetch phase. The instruction stored at address 6 has just been read. What does the program counter hold?
- 7
- 6
- 5
- The instruction itself
Show the answer
7
The program counter always designates the next instruction: once the one at address 6 is read, it holds 7. The instruction read is in the instruction register, not in the counter.
During the fetch phase, the instruction whose address is in the … is copied into the ….
Show the answer
During the fetch phase, the instruction whose address is in the program counter is copied into the instruction register.
The program counter immediately moves on to the next instruction: the address and the code of the current instruction are two different things.
Program counter: what is it?
Show the answer
The register that holds the address of the next instruction to fetch from memory.
It advances by 1 (or by the instruction's size) per instruction. A jump overwrites it with the target address, which is how a loop or an if changes what comes next.