GATE / CS ARCHIVE

GATE CSE 1995 / QUESTION 2.25

Set and offset bits in a cache

Computer Organization & Architecture · Cache Memory · Full GATE CSE 1995 paper

GATE 1995, Q2.25 2 marks · MCQ
Report issue

Cache Memory

Question 2.25, GATE 1995: A 4K-word cache is four-way set associative with 64 words per block. Find SET and WORD field widths.
Tap to enlarge
Your answer
Answer & solution

Answer: D: 4 set bits,6 word bits (no official key was published)

Step through it (5 steps)

The cache contains 4096/64=64 blocks. Grouping four blocks per set gives 64/4=16 sets, requiring log₂16=4 set-index bits. A block contains 64 words, requiring log₂64=6 word-offset bits. Associativity changes the number of sets, not the within-block offset. No tag width can be computed without the total main-memory address width, but it is not requested. These counts use word addresses, as specified, rather than adding an unstated byte offset.

Original paper, page 5