The GATE Grind

GATE 2021 CS (CS2) – Question 29

Computer Organization and Architecture · Memory Interfacing and Hierarchy · 1 mark · Numerical answer

A byte-addressable set-associative cache is 2 KB, with 64-byte blocks and 32-bit addresses. Its tag is 22 bits wide. Find the associativity.

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: 2 to 2

Explanation

The block offset requires six bits. The set-index width is therefore 32−22−6=4 bits, giving sixteen sets. The cache contains 2048/64=32 blocks. Dividing thirty-two blocks among sixteen sets gives two blocks per set, so it is two-way associative.

More Memory Interfacing and Hierarchy questions

All Memory Interfacing and Hierarchy questions →