Similar questions 15 more →
Cache Memory


Shared context
32-bit byte addresses; cache data capacity 256 KB=2^18 bytes; 4-way set associative; 16-byte blocks.
Answer & solution
Answer: 4 bits. (no official key was published)
Step through it (7 steps)
1. A block stores 16 individually addressable bytes. The byte offset must distinguish positions 0 through 15 within that block.
2. An unsigned b-bit field distinguishes 2b positions, so 2b=16 gives b=4.
3. These are the lowest four address bits A3…A0. For example offsets 0000 and 1111 identify the first and last byte.
4. The four-way organization does not change this field: associativity changes where a whole block is placed, not how bytes inside it are selected.