GATE / CS ARCHIVE

GATE CSE 2019 / QUESTION 1

Tag and index bits in a fully associative cache

Computer Organization & Architecture · Cache Memory · Full GATE CSE 2019 paper

GATE 2019, Q1 1 mark · MCQ
Report issue

Cache Memory

Question 1, GATE 2019: A byte-addressed processor has 32-bit addresses and a fully associative 16 kB cache with 16-byte blocks. Find tag bits and index bits, in that order. Choices: A (24,0); B (28,4); C (24,4); D (28,0).
Tap to enlarge
Your answer
Answer & solution

Official answer: D

Step through it (6 steps)

Method: partition the address into tag, set index, and block offset.

1. Because memory is byte-addressed, the offset selects one of the 16 bytes in a block. It requires log2(16) = 4 bits.
2. A fully associative cache has only one set containing all cache lines. Any memory block can occupy any line, so the processor address supplies no set index: log2(1) = 0 bits.
3. The remaining address bits identify which memory block is stored: tag bits = 32 − 4 − 0 = 28.
4. The 16 kB capacity determines the number of available lines, not an address index in this organization. Interpreting kB as 1024 bytes gives 1024 lines, all compared associatively.

Result: D, 28 tag bits and 0 index bits. The four low-order bits are an offset, not an index.

Original paper, page 4 · Answer key