GATE / CS ARCHIVE

GATE CSE 2021 SET 2 / QUESTION 19

GATE CSE 2021 Set 2 Q19

Computer Organization & Architecture · Cache Memory · Full GATE CSE 2021 Set 2 paper

GATE 2021 Set 2, Q19 1 mark · NAT
Report issue

Cache Memory

Question 19, GATE 2021: Byte-addressable set-associative cache: capacity 2KB, block 64 bytes, addresses 32 bits, tag 22 bits, KB=1024 bytes. Find associativity.
Tap to enlarge
Answer & solution

Official answer: 2

A64-byte block needs 6 offset bits. The remaining index width is 32−22−6=4 bits, giving 16 sets. Capacity2048/64=32 cache lines means 32/16=2 lines per set, so two-way associativity.

Address format is [tag | set index | byte offset]. Capacity includes all ways, so number of sets is not total number of lines unless the cache is direct-mapped. Check reconstruction: 16 sets×2 ways×64 bytes=2048 bytes and 22+4+6=32 address bits.

Original paper, page 64 · Answer key