LearnViz CompSci
Home / Learn / Computer Architecture & Logic / Fetch-Decode-Execute Cycle

Beginner Topic 17 of 51 Computer Architecture & Logic

Fetch-Decode-Execute Cycle

The repeated instruction processing loop of a CPU.

How it works

The processor repeats a three-stage loop. Fetch reads the instruction at the address in the program counter and increments it. Decode interprets the opcode and identifies operands and registers. Execute performs the operation, possibly followed by memory access and writing results back. Branches and jumps change the program counter, and interrupts are checked between cycles.

Step-by-step walkthrough

  1. The program counter selects the next instruction and it is fetched from memory.
  2. The control unit decodes the opcode and operands.
  3. The ALU or memory unit executes it.
  4. The result is written to a register.
  5. The program counter advances and the cycle repeats.

Where it is used

Every program on every CPU runs through this cycle, which is the foundation for understanding assembly, pipelining and performance. Simulators and emulators implement the same loop in software.

Common pitfall

Thinking of it as strictly sequential hides how real processors overlap stages with pipelining. Misunderstanding the program counter, for example forgetting it already points to the next instruction, causes errors in assembly. Branch and memory latency stalls determine real performance, not the nominal clock rate.

Where it fits in the course

Fetch-Decode-Execute Cycle is topic 17 of 51 in Computer Architecture & Logic, rated Beginner. It follows Von Neumann Architecture. The next topic is Sequential Circuits.

Practice and explore

How to study this topic

  1. Read the explanation above and restate the definition in your own words.
  2. Open the interactive lesson and answer its mini quiz.
  3. Read the common pitfall, then write a short example that avoids it.
  4. Check your understanding in the Computer Architecture & Logic quiz, and revisit the topic if you miss a question.

Frequently asked questions

What is Fetch-Decode-Execute Cycle?
The repeated instruction processing loop of a CPU. It belongs to Computer Architecture & Logic and is a beginner-level topic.
Where do people use Fetch-Decode-Execute Cycle?
Every program on every CPU runs through this cycle, which is the foundation for understanding assembly, pipelining and performance.
What is the most common mistake with Fetch-Decode-Execute Cycle?
Thinking of it as strictly sequential hides how real processors overlap stages with pipelining.
What should I learn before this topic?
Start with Von Neumann Architecture, the topic just before it in Computer Architecture & Logic.
How can I practice it?
Answer the mini quiz in the interactive lesson, then take the Computer Architecture & Logic quiz.
Is Fetch-Decode-Execute Cycle hard to learn?
It is a Beginner topic, so it works as an entry point. If the terms are new, read the explanation twice and try the visualizer before the quiz.
How long does it take to learn Fetch-Decode-Execute Cycle?
Most learners can read the explanation and finish the interactive lesson in under an hour. Fluency comes from applying the idea, so plan a few short practice sessions with the quiz.
Which topics are related to Fetch-Decode-Execute Cycle?
Von Neumann Architecture, Sequential Circuits, Clock Signal are closely connected. The full list is in the related topics section of this page.
What should I study after Fetch-Decode-Execute Cycle?
Continue with Sequential Circuits, the next topic in Computer Architecture & Logic.

Related topics