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?

  1. A.

    24 bits and 0 bits

  2. B.

    28 bits and 4 bits

  3. C.

    24 bits and 4 bits

  4. 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.

Explore the full course: Gate Guidance By Sanchit Sir