Skip to content
GATEiit

GATE CSE 2021 Set 1 Q32: Tag bits for a 32 KB direct-mapped cache with 64-byte blocks

Question

Consider a computer system with a byte-addressable primary memory of size 2322^{32} bytes. Assume the computer system has a direct-mapped cache of size 32 KB (1 KB =210= 2^{10} bytes), and each cache block is of size 64 bytes.

The size of the tag field is ________ bits.

Try it: numerical answer: type the value

Numerical answer. No negative marking.
Show answer and explanation

Answer: 17 (official GATE 2021 final answer key)

Concept used: Address = tag + index + offset; in a direct-mapped cache, index + offset bits =log⁡2(cache size)= \log_2(\text{cache size}).

First step: A cache of 2152^{15} bytes means index and offset together take 15 of the 32 address bits.

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 2021 Set 1 CS question paper and final answer key, organised by IIT Bombay. Question paper · Answer key