engineering computer science MCQ #210

A CPU has a 3-stage pipeline: IF, ID, EX. If the EX stage takes 2 cycles, what is the total number of cycles to execute 5 instructions?

engineering computer science MCQ #210

  1. Question 1

    Q1. A CPU has a 3-stage pipeline: IF, ID, EX. If the EX stage takes 2 cycles, what is the total number of cycles to execute 5 instructions?

    • A) 8
    • B) 9
    • C) 7
    • D) 10

    Answer: 7

    Explanation: For the first instruction, it takes 3 + 1 (for EX) = 4 cycles. For subsequent 4 instructions, it takes 1 cycle each, so total cycles = 4 + 4 - 1 (since the pipeline is filled) = 7.