Question
Consider a memory system with 1M bytes of main memory and 16K bytes of cache memory. Assume that the processor generates 20-bit memory address, and the cache block size is 16 bytes. If the cache uses direct mapping, how many bits will be required to store all the tag values? [Assume memory is byte addressable, , .]
Official answer and solution
- Official answer
- A
- From
- Official GATE 2025 answer key
Solution
Determine the number of cache lines and the tag width in bits for each line, then multiply them.
- Cache geometry:
- Cache size bytes.
- Block size bytes Byte offset bits.
- Number of cache lines (blocks) lines Line index bits.
- Tag size per cache line:
- Memory address bits.
- Tag bits per line bits.
- Total tag storage:
Option (A)
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2025 Computer Science and Information Technology - Session 1 (CS1)
- Question
- 36 of 65
- Section
- Computer Science and Information Technology
Report an error in this question
GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.