Skip to main content

GATE CSE 2026CO & Architecture › Memory Hierarchy & Cache OrganizationVerified

GATE CSE 2026 PYQ: Consider a system with 1 1 1 MB physical memory and a word length of 1 1 1 byte. The system uses a direct…

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\text{0xA2C28} is mapped to the cache block number 17610176_{10} . The maximum possible size of the cache (in KB ) for this configuration is _______\_\_\_\_\_\_\_. (answer in integer)

Note: 1 K=2101 \mathrm{~K}=2^{10} and 1M=2201 \mathrm{M}=2^{20}

    Answer

    128

    Approach

    Use direct-mapped cache address mapping: with block size $2^k$ bytes and $2^m$ cache blocks, the cache block number is floor(address / $2^k)$ mod $2^m$. Since only one address is given, maximize cache size by maximizing m, while the low m bits of (address >> k) must be exactly 176.

    Only a 64-byte block size gives the required 8-bit index value 176, and the next higher address bit limits the index to 11 bits. Hence the largest possible cache is 2¹¹ blocks × 64 bytes = 128 KB.

    Reviewed by GateIQ Editorial Team: IIT & IISc Alumni.