Last Updated : 19 Nov, 2018

A two way set associative cache memory unit with a capacity of 16 KB is built using a block size of 8 words. The word length is 32 bits. The physical address space is 4 GB. The number of bits in the TAG, SET fields are
(A) 20, 7
(B) 19, 8
(C) 20, 8
(D) 21, 9


Answer: (B)

Explanation: Offset field(block size)= 8 words * size of each word = 8 * 4 Bytes = 32 Bytes
Number of blocks = size of cache/ block size
= 16 KB/ 32 B = 512
Number of sets = 512/2= 256
Bits required for set field = log2(256) = 8 bits
Tag bits = 32-5-8 = 19 bits

Quiz of this Question


Share your thoughts in the comments