Skip to content
Related Articles

Related Articles

Improve Article

GATE | GATE-CS-2014-(Set-2) | Question 65

  • Difficulty Level : Medium
  • Last Updated : 19 Nov, 2018

A 4-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 size of the physical address space is 4 GB. The number of bits for the TAG field is _____
(A) 5
(B) 15
(C) 20
(D) 25

Answer: (C)


In a k-way set associate mapping, cache memory is divided into sets, each of size k blocks.
Size of Cache memory = 16 KB
As it is 4-way set associative,K = 4
Block size B = 8 words
The word length is 32 bits.
size of Physical address space = 4 GB.

No of blocks in Cache Memory(N) = (size of cache memory / size of a block)

= (16*1024 bytes / 8*4 bytes) = 512 (as 1 word = 4 bytes)

No of sets(S) = (No of blocks in cache memory/ no of blocks in a set)

= N/K = 512/4 = 128

Now,size of physical address = 4GB = 4*(2^30) Bytes = 2^32 Bytes

These physical adresses are divided equally among the sets.

Hence, each set can access ((2^32)/128) bytes = 2^25 bytes = 2^23 words = 2^20 blocks

So, each set can access total of 2^20 blocks. So to identify these 2^20 blocks, each
set needs TAG bits of length 20 bits.

Hence option C.

Quiz of this Question

Attention reader! Don’t stop learning now.  Practice GATE exam well before the actual exam with the subject-wise and overall quizzes available in GATE Test Series Course.

Learn all GATE CS concepts with Free Live Classes on our youtube channel.

My Personal Notes arrow_drop_up
Recommended Articles
Page :