Similar questions 15 more →
Cache Memory

Answer & solution
Official answer: 19
Step through it (4 steps)
For byte addressing, cache data capacity equals associativity times number of sets times bytes per block. Therefore the number of sets times block size is 65536/8=8192=213. The index and block-offset fields together occupy 13 bits regardless of the particular power-of-two block size. The tag has 32-13=19 bits. As usual, the stated capacity is data capacity, excluding tag and replacement metadata.
Teaching detail. Let block size be 2b bytes and the number of sets be 2s. Eight ways means each set stores eight blocks, so 216=23·2s·2b and s+b=13. These lower address bits choose a set and byte within a block; the remaining bits identify which memory block occupies the selected way. Therefore tag width is independent of the unspecified block size, provided the conventional power-of-two partition is used. Associativity bits do not appear as a separate address field selecting a way.