A computer architecture engineer designs a direct-mapped cache for a processor with a 28-bit byte-addressable address space. The cache has 1024 cache lines, each holding 16 bytes. How many bits are allocated to the tag, index, and block offset fields respectively?
Block offset bits = log2(16) = 4. Index bits = log2(1024) = 10. Tag bits = 28 − 10 − 4 = 14. So Tag=14, Index=10, Offset=4.