GATE Computer ScienceHardGATE CS (PYQ pattern)
A loop branch is taken 9 times and then falls through (T×9, N), and the whole 10-outcome pattern repeats 5 times. A 2-bit saturating counter starts at state 3 (strongly taken). The 1-bit last-outcome predictor starts as taken. What are the total mispredictions (2-bit, 1-bit)?
- A. 5 and 13
- B. 10 and 9
- C. 5 and 9
- D. 9 and 5
Correct answer: C. 5 and 9
The 2-bit counter pays only for each loop exit (the N), because one N cannot flip it from the taken half: 5. The 1-bit predictor pays for the exit and for the first T of the next run: 5 + 4 (the very first outcome T is predicted correctly) = 9.
Practise more Computer Organization and Architecture questionsComputer Organization and Architecture: notes and key points
More Computer Organization and Architecture questions
- A control unit has 48 control signals partitioned into 6 groups of mutually exclusive signals of sizes 12, 10, 9, 8, 5 and 4. In a…
- A branch outcome stream is TTTTTNN repeated 6 times (42 outcomes). With a 2-bit saturating counter (taken predicted in states 2,3)…
- A direct-mapped cache has 2 lines of 4 words each. A program writes (once each) to word addresses 0, 4, 8, 12, 16, 20, 24, 28 and never…
- A processor encodes branch targets as a 16-bit signed offset relative to the incremented PC in 2-byte instruction units (target = PC + 2 ×…
- A synchronous 100 MHz bus has a multiplexed 32-bit address/data path. A block read takes 1 address cycle, 3 wait cycles, then one data…
- A memory-mapped device in a 32-bit byte-addressed system is selected when A31 = 1, A30 = 1 and A15–A12 = 0101; A3–A0 select one of its 16…