An 8-way set associative cache of size 64 KB (1 KB = 1024 bytes) is used in a…
2023
An 8-way set associative cache of size 64 KB (1 KB = 1024 bytes) is used in a system with 32-bit address. The address is sub-divided into TAG, INDEX, and BLOCK OFFSET.
The number of bits in the TAG is __________ .
Answer: 19 — Key idea: compute how many bits are used for the block offset plus the index from the cache size and associativity. Cache size = 64 KB = 64 × 1024 = 65536…
Attempted by 259 students.
Show answer & explanation
Correct answer: 19
Key idea: compute how many bits are used for the block offset plus the index from the cache size and associativity.
Cache size = 64 KB = 64 × 1024 = 65536 bytes.
For an 8-way set associative cache: cache size = associativity × number_of_sets × block_size. So number_of_sets × block_size = cache_size / associativity = 65536 / 8 = 8192 = 2^13.
Thus index bits + block offset bits = log2(8192) = 13.
Tag bits = 32 (address bits) − (index + offset) = 32 − 13 = 19 bits.
Answer: 19 bits.