In a 2-way set associative cache, what is the total number of sets if the cache size is 256 KB, block size is 64 B, and the address is 32 bits?
Q1. In a 2-way set associative cache, what is the total number of sets if the cache size is 256 KB, block size is 64 B, and the address is 32 bits?
Answer: 2048
Explanation: Total cache size = 256 KB = 256 * 1024 B. Block size = 64 B. Number of blocks = 256 * 1024 / 64 = 4096. For 2-way set associative, number of sets = 4096 / 2 = 2048.