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?
- A. 11
- B. 19
- C. 17
- 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.
Practise more Computer Organization and Architecture questionsComputer Organization and Architecture: notes and key points
More Computer Organization and Architecture questions
- 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…
- An 8 KB cache with 16-byte blocks and 32-bit addresses can be built fully associative or 4-way set-associative. How many more tag bits…
- Processor A runs a program at 3.0 GHz with CPI 1.6. Processor B, with the same ISA and the same compiled program, runs at 2.4 GHz. What is…