A direct-mapped cache has 128 blocks. What is the number of bits required for the index?
Q1. A direct-mapped cache has 128 blocks. What is the number of bits required for the index?
Answer: 7
Explanation: Number of index bits = log2(number of blocks) = log2(128) = 7.