A certain processor uses a fully associative cache of size 16 kB. The cache…
2019
A certain processor uses a fully associative cache of size 16 kB. The cache block size is 16 bytes. Assume that the main memory is byte addressable and uses a 32-bit address. How many bits are required for the Tag and the Index fields respectively in the addresses generated by the processor?
- A.
24 bits and 0 bits
- B.
28 bits and 4 bits
- C.
24 bits and 4 bits
- D.
28 bits and 0 bits
Attempted by 344 students.
Show answer & explanation
Correct answer: D
Quick method: compute offset, index, then tag.
Offset bits = log2(block size) = log2(16) = 4 bits (because each block holds 16 bytes).
Index bits = 0, since the cache is fully associative (there are no set index bits).
Tag bits = 32 (address length) - Offset - Index = 32 - 4 - 0 = 28 bits.
Therefore the address fields are: Tag = 28 bits, Index = 0 bits.