GATE CS 2025 Set 2 | Question 39

MCQ · 2 marks · −0.66

For a direct-mapped cache, 4 bits are used for the tag field and 12 bits are used to index into a cache block. The size of each cache block is one byte. Assume that there is no other information stored for each cache block.

Which ONE of the following is the CORRECT option for the sizes of the main memory and the cache memory in this system (byte addressable), respectively?

  1. Option A: 64 KB and 4 KB (correct)
  2. Option B: 128 KB and 16 KB
  3. Option C: 64 KB and 8 KB
  4. Option D: 128 KB and 6 KB

Answer

(A)

Explanation

Each block holds one byte, so the address has no offset field: it is just tag plus index, \(4 + 12 = 16\) bits.

  • Main memory: \(2^{16}\) bytes = 64 KB.
  • Cache: the index picks one of \(2^{12}\) blocks of 1 byte each, so the cache holds \(2^{12}\) bytes = 4 KB.

Option D’s 6 KB would add the 4-bit tags to the data (12 bits per block), and its 128 KB would need a 17-bit address, so it does not fit.

Answer: A