Question:medium

Consider a computer system with a byte-addressable primary memory of size \(2^{32}\) bytes.
Assume a direct-mapped cache of size 32 KB and cache block size of 64 bytes. The size of the tag field is \(\underline{\hspace{2cm}}\) bits.

Show Hint

Tag bits = Address bits − (Index bits + Offset bits).
Updated On: Jan 30, 2026
Show Solution

Correct Answer: 17

Solution and Explanation

Step 1: Determine total address size.
Main memory size is 232 bytes, so the number of address bits required is:

Address bits = 32


Step 2: Analyze cache parameters.
Cache size = 32 KB = 32 × 1024 bytes = 215 bytes

Block size = 64 bytes = 26 bytes


Step 3: Calculate offset and index bits.
Offset bits = log2(block size) = 6

Number of cache blocks = 215 / 26 = 29

Index bits = log2(number of blocks) = 9


Step 4: Compute tag bits.
Tag bits = Total address bits − (Index bits + Offset bits)

Tag bits = 32 − (9 + 6) = 17


Final Answer:

17

Was this answer helpful?
0

Top Questions on Memory hierarchy