GATE Computer ScienceVery hardNIELIT Scientist B
A branch is executed 20 times with the outcome pattern T, T, T, N repeated 5 times. A 2-bit saturating counter (states 0–3, predicts taken when the state is 2 or 3, incremented on T, decremented on N) starts at state 0. How many mispredictions occur?
- A. 8
- B. 9
- C. 6
- D. 7
Correct answer: D. 7
The cold counter mispredicts T, T and N in the first round (3 misses), then it stays in states 2-3 and mispredicts only each N in the other 4 rounds, so the total is 7.
Practise more Computer Organization and Architecture questionsComputer Organization and Architecture: notes and key points
More Computer Organization and Architecture questions
- L1 has a hit time of 1 cycle and a miss rate of 8%. The L2 hit time is 10 cycles and a main-memory access takes 120 cycles. The target…
- A 16-bit instruction has 5-bit address fields and expanding opcodes. There are 40 two-address instructions and 600 one-address…
- 80% of a program's execution time benefits from an enhancement that makes that portion 8 times faster; the rest is unchanged. The overall…
- A 4-way set-associative cache of 32 KB with 64-byte lines serves 32-bit physical addresses. Each line stores its data, a tag, one valid…
- The 32-bit word 0xC2ED0000 is interpreted as an IEEE 754 single-precision number. Its value is
- Booth's algorithm multiplies by the 8-bit two's-complement multiplier 01110110. Counting only the additions and subtractions of the…