# GATE | Sudo GATE 2020 Mock I (27 December 2019) | Question 11

The size of the physical address space of a processor is 240 bytes. The capacity of cache memory is 512 Kbytes. The word length is 32 bytes. The size of each cache block is 16 words. For a 16-way set-associative cache memory, the length (in number of bits) of the tag field is _______________ .
(A) 21
(B) 8
(C) 16
(D) 25

Explanation: Given physical address space = 40 bits,
Cache memory size = 512 Kbytes = 219 bytes,

The word length is 32 bytes, and size of each cache block is 16 words. So, word offset is

```= 32*16 bytes
= 512 bytes
= 29 bytes ```

Line offset is,

```= 219 bytes / 29 bytes
= 210 ```

So, set offset is,

```= 210 / 16
= 210 / 24
= 26
= 6 bits ```

Hence, the length (in number of bits) of the tag field is,

```= 40 - 6 - 9
= 25 bits ```

Option (D) 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.