GATE / CS ARCHIVE

GATE CSE 2025 SET 1 / QUESTION 36

Calculating direct-mapped cache tag storage

Computer Organization & Architecture · Cache Memory · Full GATE CSE 2025 Set 1 paper

GATE 2025 Set 1, Q36 2 marks · MCQ
Report issue

Cache Memory

Question 36, GATE 2025: A byte-addressable system has 1 MiB of main memory, 20-bit addresses, and a 16 KiB direct-mapped cache with 16-byte blocks. How many bits store the tag values for all lines, excluding other metadata? A 6×2^10; B 8×2^10; C 2^12; D 2^14. Here K=2^10 and M=2^20.
Tap to enlarge
Your answer
Answer & solution

Official answer: A

Step through it (7 steps)

Approach: Split an address into tag, cache-line index and byte offset; then multiply tag width by the number of lines.
A 16-byte block requires log₂16=4 offset bits. The cache contains 16 KiB/16 bytes=214/24=210 lines, so direct mapping requires 10 index bits to select a line.
From the 20 address bits, the remaining tag width is 20−10−4=6 bits. Every line needs its own stored tag to distinguish the main-memory blocks that map to that line. Therefore total tag storage is 210×6=6144 bits, option A.
This is a bit count, not a byte count. The 16 KiB cache size describes data capacity; valid bits, dirty bits and other control metadata are not part of the requested tag values. Ignoring the block offset or using the number of bytes instead of lines would produce the wrong tag width or multiplier.

Original paper, page 36 · Answer key