GATE / CS ARCHIVE

GATE CSE 2014 SET 2 / QUESTION 9

GATE CSE 2014 Set 2 Q9

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

GATE 2014 Set 2, Q9 1 mark · NAT
Report issue

Cache Memory

Question 9, GATE 2014: A 16 KB cache is 4-way set associative. A block contains 8 words, each 32 bits. Physical address space is 4 GB. Find the number of tag bits.
Tap to enlarge
Answer & solution

Official answer: 20

Step through it (7 steps)

1. Set up the reasoning. Use the textbook binary KB/GB and byte-addressing convention. Convert words to bytes first: one line has 8×4=32 bytes; compute line count, set count, and their base-two logarithms.

2. Derive the result. A block is 8×4=32 bytes, requiring 5 offset bits. The cache has 16384/32=512 lines and 128 sets, requiring 7 index bits. A4GB byte address is 32 bits, leaving 32−7−5=20 tag bits.

3. Check the interpretation. Do not allocate only three offset bits: those identify the eight words but miss the two byte-within-word bits. The tag, set index, and byte offset together must total the 32 physical-address bits.

Original paper, page 31 · Answer key