Skip to content
GATEiit

GATE CSE 2026 Session 2 Q52: Hits and misses for four words in a direct-mapped cache

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: 1K=2101\text{K} = 2^{10} and 1M=2201\text{M} = 2^{20}

Try it: multiple select: one or more correct options

Select one or more options
Select all correct options. No negative marking, no partial marks.
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

WhatsAppDownload image

Source: official GATE 2026 Session 2 CS question paper and final answer key, organised by IIT Guwahati. Question paper · Answer key