GATE | Sudo GATE 2020 Mock II (10 January 2019) | Question 56

Consider a machine with byte addressable memory of 2^32 bytes divided into blocks of size 32 bytes. Assume a 2-set associative cache having 512 cache lines is used with this machine. The size of tag field in bits is _____ .
(A) 16
(B) 18
(C) 19
(D) 21


Answer: (C)

Explanation: Total address space = 32 bit
Block size (W.O.) = 5 bit
No. of bit to represent Set offset (S.O.)

= log2(512) - log2(2) 
= 9 - 1 
= 8 

Therefore, number of Tag bits are,

= 32 - 8 - 5 
= 19 bits 

Option (C) is correct.

Quiz of this Question

My Personal Notes arrow_drop_up
Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.