The GATE Grind

GATE 2017 CS – Question 64

Computer Organization and Architecture · Memory Interfacing and Hierarchy · 2 marks · Numerical answer

A cache memory unit with capacity of $N$ words and block size of $B$ words is to be designed. If it is designed as a direct mapped cache, the length of the TAG field is 10 bits. If the cache unit is now designed as a 16-way set-associative cache, the length of the TAG field is ________ bits.

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: 14

Explanation

A 16-way set-associative cache has 16 times fewer sets than a direct mapped cache of the same size, so the index field is $\log_2 16 = 4$ bits shorter. The block offset and the address length do not change, so those 4 bits move into the tag. The tag length becomes $10 + 4 = 14$ bits.