GATE Computer ScienceHardGATE CS (PYQ pattern)

A branch outcome stream is TTTTTNN repeated 6 times (42 outcomes). With a 2-bit saturating counter (taken predicted in states 2,3) initially 3, how many mispredictions occur in total?

  1. A. 11
  2. B. 19
  3. C. 17
  4. D. 23

Correct answer: C. 17

The first period costs 2 (the two N's at states 3 and 2). Every later period starts from state 1: its first T is mispredicted (1→2) and then the two N's are mispredicted again (3→2→1), so 3 per period: 2 + 5·3 = 17.

More Computer Organization and Architecture questions

Exams that ask this topic