Question:

Consider a system with 1 MB physical memory and a word length of 1 byte. The
system uses a direct mapped cache, with block numbers starting from 0. The word
with physical address 0xA2C28 is mapped to the cache block number \(176_{10}\). The
maximum possible size of the cache (in KB) for this configuration is ___________.
(answer in integer)
Note: \(1\mathrm{K}=2^{10}\) and \(1\mathrm{M}=2^{20}\)

Show Hint

Write 0xA2C28 in binary and choose the largest block-offset plus index split for which the line-index bits equal decimal 176.
Updated On: Aug 3, 2026
Show Solution
collegedunia
Verified By Collegedunia

Correct Answer: 128

Solution and Explanation

Step 1: Convert the given physical address to binary form. The address is \(0xA2C28\), and physical memory is 1 MB = \(2^{20}\) bytes, so the physical address has 20 bits.

Step 2: In a direct mapped cache, the cache block number is obtained from the line-index bits of the physical address after removing the block-offset bits. The given cache block number is \(176_{10}\). Since \(176 = 128 + 32 + 16 = (10110000)_2\), the visible line-index suffix must be \(10110000\).

Step 3: The address \(0xA2C28\) in binary is \(1010\,0010\,1100\,0010\,1000\). To get decimal 176 as the cache block number, take a block offset of 6 bits. Then the index field begins after the lower 6 bits, and the next 11 index bits end with \(00010110000_2 = 176\).

Step 4: Therefore, the largest possible cache uses 6 offset bits and 11 index bits. The cache size is \[2^6 imes 2^{11} = 2^{17} ext{ bytes} = 128 ext{ KB}.\]

\[\boxed{128\text{ KB}}\]

Was this answer helpful?
0
0

Top GATE CS Computer Science and IT Engineering Questions

View More Questions

Top GATE CS Computer Organization and Architecture Questions

View More Questions