GATE / CS ARCHIVE

GATE CSE 2015 SET 3 / QUESTION 34

GATE CSE 2015 Set 3 Q34

Computer Organization & Architecture · Cache Memory · Full GATE CSE 2015 Set 3 paper

GATE 2015 Set 3, Q34 1 mark · MCQ
Report issue

Cache Memory

Question 34, GATE 2015: A byte-addressable main memory has size 2²⁰ bytes. Blocks contain 16 bytes, and a direct-mapped cache has 2¹² lines. Two consecutive memory-byte addresses are hexadecimal E201F and E2020. For address E201F, identify the tag and cache-line address, in hexadecimal. (A) E,201; (B) F,201; (C) E,E20; (D) 2,01F.
Tap to enlarge
Your answer
Answer & solution

Official answer: A

Step through it (7 steps)

1. A hexadecimal digit represents four bits, so the 4+12+4 split aligns exactly with E | 201 | F. The next address E2020 illustrates the offset wrapping from F to 0 and the cache-line index advancing from 201 to 202.

2. The20-bit address has 4 offset bits for 16-byte blocks and 12 index bits for 212 lines, leaving 4 tag bits. Hex E201F therefore splits tagE, index 201, offsetF. Thus A.

Original paper, page 65 · Answer key