Member-only story
Why Pipeline a Microprocessor?
Modern CPUs all use pipelining to improve performance, but how does it work? We will use a warehouse robot analogy to explain how.

Pipelining is in many ways such a universal way to speed up any task, that it is possible to find countless analogies for it in manufacturing or in your every day life, such as doing laundry, or cooking.
At the heart we deal with the challenge of getting as much work done per time unit as possible. There are many ways of achieving this. I will go through different approaches to help you understand how microprocessor designers arrived at pipelining as a smart solution. We will look at:
- Clock frequency. How early CPUs got speed bumps by increasing clock frequency.
- Parallel execution. If you cannot perform an instruction faster, how about performing more in parallel?
- Pipelining is for when you cannot do more tasks in parallel and you cannot miniaturize to increase clock frequency.
Speeding Up CPUs By Increasing Clock Frequency
A computer does everything in discrete time steps, called clock cycles. In one clock cycle the smallest task is performed in a CPU. It is a bit like how a mechanical watch only does something when cogs in its gears move one step. Nothing happens in-between.
The most straightforward way of increasing the performance of a microprocessor is by shortening the length of one clock cycle. However there is a limit to how short a clock cycle can be. You cannot make electrons move faster. They have to be able to move through all the necessary transistors in your CPU to complete the operation it is supposed to do in one clock cycle.
This is easier to clarify with a warehouse robot analogy. We got a robot in a warehouse picking packages in one end and delivering them at another end.

One could say this robot also has a clock cycle. The clock cycle is the time it takes for the robot to deliver a package at the end and return to…