Skip to content
Related Articles
Open in App
Not now

Related Articles

GATE | GATE-CS-2007 | Question 10

Improve Article
Save Article
  • Last Updated : 19 Nov, 2018
Improve Article
Save Article

Consider a 4-way set associative cache consisting of 128 lines with a line size of 64 words. The CPU generates a 20-bit address of a word in main memory. The number of bits in the TAG, LINE and WORD fields arerespectively:

(A) 9,6,5
(B) 7, 7, 6
(C) 7, 5, 8
(D) 9, 5, 6

Answer: (D)


Here the number of sets = 128/4 = 32 (as it is 4 say set associative)

We have total 64 words then we need 6 bits to identify the word

So the line offset is 5 bits and the word offset is 6 bits

and the TAG = 20-(5+6) =9 bits

so it should be 9,5,6

Quiz of this Question

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!