GateAI
Cache Memory and Hierarchy

GATE CSE 2015 Set 3 · Q14

MCQ1 markMedium

Time

Consider a machine with a byte addressable main memory of 2202^{20} bytes, block size of 16 bytes and a direct mapped cache having 2122^{12} cache lines. Let the addresses of two consecutive bytes in main memory be (E201F)16(\text{E}201\text{F})_{16} and (E2020)16(\text{E}2020)_{16}. What are the tag and cache line address (in hex) for main memory address (E201F)16(\text{E}201\text{F})_{16}?

Select one answerSingle correct

Pick an option to check

Solution

Step-by-step verified solution

Official answer: A) E, 201

Cache Memory and Hierarchy
  1. Physical Address Size: Main memory size =220 bytes  ⟹  20 bits= 2^{20}\text{ bytes} \implies 20\text{ bits}.

  2. Block Offset (Word Offset): Block size =16 bytes=24 bytes  ⟹  4 bits= 16\text{ bytes} = 2^4\text{ bytes} \implies 4\text{ bits}.

  3. Cache Line (Index) Bits: Number of cache lines =212  ⟹  12 bits= 2^{12} \implies 12\text{ bits}.

  4. Tag Bits:

    Tag bits=20−12−4=4 bits\text{Tag bits} = 20 - 12 - 4 = 4\text{ bits}
  5. Address Division for (E201F)16(\text{E}201\text{F})_{16}:

    • In hexadecimal, 20 bits correspond to 5 hex digits: E 2 0 1 F.

    • Tag (first 4 bits / 1 hex digit): E

    • Cache Line Index (next 12 bits / 3 hex digits): 201

    • Block Offset (last 4 bits / 1 hex digit): F

Therefore, the tag is E and the cache line address is 201.

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This Cache Memory and Hierarchy previous year question is Q14 of the GATE CSE 2015 Set 3 paper. Find more GATE CSE PYQs on Cache Memory and Hierarchy in Computer Organization and Architecture, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related Cache Memory and Hierarchy PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

Cache Memory and Hierarchy in GATE CSE

Cache Memory and Hierarchy has 47 GATE CSE PYQs across 23 papers from 2011 to 2026. 4 of them are 1-mark MCQs like this one, and it is the only one in GATE CSE 2015 Set 3.

How GATE tests Cache Memory and Hierarchy

More from GATE CSE 2015 Set 3

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2015 Set 3 · Q14 · MCQ

Consider a machine with a byte addressable main memory of 220 bytes, block size of 16 bytes and a direct mapped cache having 212 cache lines. Let the addresses of two consecutive bytes in main memory be (E201F)16 and (E2020)16. What are the tag and cache line address (in hex) for main memory address (E201F)16?

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.