Similar questions 15 more →
Cache Memory

Answer & solution
Official answer: 18.0
Our answer: 18
Step through it (6 steps)
1. There are 232 separately addressable bytes, so a memory address needs 32 bits. A 32-byte block needs log₂32=5 low-order offset bits to select a byte within it.
2. A direct-mapped cache with 512=29 lines uses 9 index bits to select the one cache line where a block may reside.
3. The remaining high-order bits distinguish the different memory blocks that map to that same line: tag=32-5-9=18 bits. Equivalently, memory has 227 blocks and each of 29 lines represents 218 possible blocks. Do not use 512 as the cache byte capacity; it is the number of lines.