An Overview of Pipelining: Overlapping Instruction Execution

A single-cycle processor wastes enormous amounts of hardware idle time since every instruction must fit within the length of the slowest possible instruction. This article introduces pipelining as a solution, explains the classic assembly-line analogy, breaks down the standard five-stage pipeline, and covers why pipelining increases instruction throughput without making any individual instruction faster.

PipeliningInstruction ThroughputFive-Stage Pipeline

~3 min read · Updated Sep 6, 2026

The Core Weakness of a Single-Cycle Design

In the single-cycle implementation covered earlier in this series, every instruction takes exactly one clock cycle, but that cycle must be long enough to accommodate the slowest instruction the processor supports, typically a load instruction that touches memory. This means simple instructions like addition sit idle for much of the cycle, wasting available hardware capacity.

The Assembly-Line Analogy

Pipelining solves this by overlapping the execution of multiple instructions, much like an assembly line where different workers handle different stages of production simultaneously on different products. While one instruction is being decoded, another can already be fetched, and a third can be executing — all in the same clock cycle, just at different stages.

The Standard Five-Stage Pipeline

A classic RISC pipeline, including the one used for RISC-V in this chapter, divides instruction execution into five distinct stages:

  • IF (Instruction Fetch): read the next instruction from instruction memory.
  • ID (Instruction Decode): decode the instruction and read the required values from the register file.
  • EX (Execute): perform the arithmetic operation or calculate a memory address using the ALU.
  • MEM (Memory Access): read from or write to data memory, relevant only for load and store instructions.
  • WB (Write Back): write the final result back into the register file.

Each stage is handled by a distinct piece of hardware, and a set of pipeline registers between stages hold the intermediate results of one instruction while the next instruction moves into the earlier stage.

Visualizing Overlapped Execution

Cycle:      1    2    3    4    5    6    7
Instr 1:   IF   ID   EX   MEM  WB
Instr 2:        IF   ID   EX   MEM  WB
Instr 3:             IF   ID   EX   MEM  WB

At cycle 3 in this diagram, three different instructions are being processed simultaneously, each in a different stage — this overlap is the entire source of pipelining's performance benefit.

Throughput Improves, But Individual Latency Does Not

It is a common misconception that pipelining makes each instruction execute faster. In reality, a single instruction still takes the same total time, or slightly longer, to move through all five stages. What improves is Throughput: once the pipeline is full, a new instruction can complete roughly every single clock cycle instead of waiting for the entire multi-stage process to finish before starting the next one.

Why This Idea Needs Careful Handling

Overlapping instructions this way introduces new problems that a single-cycle design never had to face — instructions that depend on each other's results, and branches that are not yet resolved when the next instruction needs to be fetched. These complications, known as pipeline hazards, are the focus of the sections that follow later in this series.

Written & researched by Dr. Shahin Siami

Related Articles

Cache Fundamentals: How Small, Fast Memory Predicts What You Need Next

A cache works because programs tend to access the same or nearby data repeatedly rather than randomly. This article explains the principle of locality that makes caching effective, how a direct-mapped cache locates data using an address, and what happens on a cache hit versus a cache miss.

Continue

The Memory Hierarchy: Why Computers Use Several Kinds of Memory

No single memory technology is simultaneously fast, large, and cheap. This article introduces the concept of a memory hierarchy that combines several different memory technologies to approximate the speed of the fastest one at the cost of the cheapest, then walks through the core technologies that make up each level.

Continue

Common Misconceptions About Processor Design and Chapter Four's Big Picture

After covering datapaths, pipelining, hazards, and real-world processor comparisons, it is time to correct a handful of persistent misconceptions about how processors actually behave. This article addresses common fallacies about pipelining and performance, then ties together the full journey from simple datapaths to superscalar execution covered throughout this chapter.

Continue

Real-World Pipelines: Comparing ARM and Intel, and Speeding Up Matrix Multiply

Theoretical pipeline concepts take concrete shape in real commercial processors, which vary widely in pipeline depth and issue width depending on their design goals. This article compares how the ARM Cortex-A53 and Intel Core i7 implement pipelining differently for power efficiency versus raw performance, then shows how instruction-level parallelism accelerates matrix multiplication in practice.

Continue

Instruction-Level Parallelism: Executing More Than One Instruction at Once

A single pipeline can only advance one instruction into each stage per cycle, which caps its performance at roughly one instruction per clock. This article explains how processors go beyond that limit by issuing multiple instructions simultaneously, the hardware duplication this requires, and the fundamental limits imposed by dependencies between instructions.

Continue

How a Pipelined Processor Handles Exceptions

Not every instruction executes as expected — some trigger error conditions like an undefined opcode or an arithmetic overflow that the processor must respond to safely. This article explains what exceptions are, how a pipelined processor detects and handles them without corrupting program state, and why exceptions are treated similarly to control hazards.

Continue