A processor has a four-stage pipeline and each stage takes one clock cycle. There are no stalls or branches. How many clock cycles are needed to complete 12 instructions, and how many are saved compared with no pipelining?
- The first instruction finishes after 4 cycles.
- Each of the other 11 instructions finishes one cycle later: 4 + 11 = 15 cycles.
- Without a pipeline: 4 × 12 = 48 cycles.
- Saving: 48 − 15 = 33 cycles.
Answer: 15 clock cycles, which is 33 fewer than without pipelining.