GATE CSE 2026 Session 2 Q52: Hits and misses for four words in a direct-mapped cache
- Computer Organization and Architecture
- 2 marks
- MSQ
- No negative marking
Question
Consider a system with a processor and a 4 KB direct mapped cache with block size of 16 bytes. The system has a 16 MB physical memory. Four words P, Q, R, and S are accessed by the processor in the same order 10 times. That is, there are a total of 40 memory references in the sequence P, Q, R, S, P, Q, R, S, …
Assume that the cache memory is initially empty. The physical addresses of the words are given below (1 word = 1 byte).
P: 0x845B32, Q: 0x845B26, R: 0x845B36, S: 0x846B32
Which of the following statements is/are true?
Note: and
Try it: multiple select: one or more correct options
Show answer and explanation
Answer: A, B (official GATE 2026 final answer key)
Concept used: Direct mapping: address = tag | line index | block offset; same line with different tags evict each other.
First step: With 256 lines and 16-byte blocks, split the 24-bit addresses as 12-bit tag, 8-bit index, 4-bit offset and compare P, Q, R, S.
Full step-by-step solution
Detailed working, common mistakes and linked mock tests will be available with a free GATEiit account. Log-in is coming soon.
Share this question
Source: official GATE 2026 Session 2 CS question paper and final answer key, organised by IIT Guwahati. Question paper · Answer key
More Computer Organization and Architecture PYQs
- 2026 Session 1 · Q14Match addressing modes with high-level data elements
- 2026 Session 1 · Q15Instruction sequence for Z = X + Y on a load-store machine
- 2026 Session 1 · Q16Register dependency that causes a data hazard
- 2026 Session 1 · Q36IEEE 754 single-precision sum of 35C00000 and 34A00000
- 2026 Session 1 · Q38Tag length: direct-mapped vs K-way set-associative cache
- 2026 Session 1 · Q54Impossible TLB / page table / cache event sequences