GATE Computer ScienceVery hardGATE CSE

A branch with the repeating outcome pattern T, T, T, N (period 4, repeated 10 times, 40 executions) is predicted by a single 2-bit saturating counter (states 0,1 predict not taken; 2,3 predict taken; increment on taken, decrement on not taken). The counter starts at state 1. How many mispredictions occur in the 40 executions?

  1. A. 11
  2. B. 8
  3. C. 14
  4. D. 10

Correct answer: A. 11

From state 1 the first T mispredicts, state rises to 2 and the next two T's are right; each N mispredicts; steady state has 1 miss per period. Simulation gives 11.

More Computer Organization and Architecture questions

Exams that ask this topic