GATE Computer ScienceVery hardGATE CSE · NIELIT
The backward branch of an inner loop executes 10 times per entry (taken 9 times, then not taken once), and the inner loop is entered 20 times in a row. A 1-bit predictor (predict the last outcome; initial state not taken) is used for this branch. How many mispredictions occur over all 200 executions?
- A. 20
- B. 40
- C. 41
- D. 39
Correct answer: B. 40
Every entry mispredicts twice: the first taken (the predictor holds not-taken from the previous exit or the initial state) and the exit itself; 2 × 20 = 40.
Practise more Computer Organization and Architecture questionsComputer Organization and Architecture: notes and key points
More Computer Organization and Architecture questions
- A 256×256 array of 4-byte integers is stored in row-major order starting at address 0. A 16 KB direct-mapped cache has 32-byte lines (512…
- In IEEE 754 single precision with round-to-nearest-even, let x = 2^24 = 16777216. What are the values of (x + 1) + 1 and x + (1 + 1)?
- A 4 KB direct-mapped cache has 32-byte lines. The loop "for i = 0..127: sum += A[i] + B[i]" reads 4-byte integers, A starting at address 0…
- A RISC ISA has fixed 4-byte instructions. A conditional branch holds a 16-bit signed offset counted in instructions and the target is…
- How many distinct single-precision IEEE 754 values x satisfy 1 ≤ x < 1024?
- A disk spins at 7200 rpm, has an 8 ms average seek and a 100 MB/s media rate (1 KB = 1000 B, 1 MB = 10⁶ B). Request X reads one contiguous…