The GATE Grind

GATE 2015 CS (CS3) – Question 34

Computer Organization and Architecture · Memory Interfacing and Hierarchy · 1 mark · Multiple choice

A byte-addressable machine has $2^{20}$ bytes of memory, sixteen-byte blocks and a direct-mapped cache with $2^{12}$ lines. Consecutive addresses include hexadecimal E201F and E2020. Find the tag and cache-line address, in hexadecimal, for E201F.

  1. E,201
  2. F,201
  3. E,E20
  4. 2,01F

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: (A) E,201

Explanation

The sixteen-byte block offset consumes the final four address bits. The next twelve bits select the cache line and the upper four bits form the tag. Splitting E201F as E | 201 | F gives tag E and line 201, A.

More Memory Interfacing and Hierarchy questions

All Memory Interfacing and Hierarchy questions →