Question:

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?

Show Hint

In direct-mapped cache, the number of index bits determines the number of cache blocks, while the tag bits determine how memory addresses are mapped uniquely.
Updated On: Apr 7, 2025
  • {64 KB and 4 KB}
  • {128 KB and 16 KB}
  • {64 KB and 8 KB}
  • {128 KB and 6 KB}
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is A

Solution and Explanation

- The total address size in bits is the sum of the tag and index bits: \(4 + 12 = 16\). This means the main memory size is \(2^{16} = 64\) KB. - The number of cache blocks is \(2^{12} = 4096\), and since each block stores 1 byte, the cache memory size is \(4096 = 4\) KB. Thus, the correct option is (A).
Was this answer helpful?
0
0