Topic: Computer Organization and Architecture
4-way set-associative cache has a total capacity of 64 KB with a block size of 64 bytes. If a 32-bit memory address is used, how many bits are required for the cache index field?
- A. 6 bits
- B. 10 bits
- C. 12 bits
- D. 8 bits
Answer: D. 8 bits
Explanation: First, calculate the total number of blocks in the cache: $64 \text{ KB} / 64 \text{ Bytes} = 1024 \text{ blocks}$. Since the cache is 4-way set-associative, each set contains 4 blocks. The total number of sets is $1024 / 4 = 256 \text{ sets}$. The number of index bits required to uniquely address 256 sets is $\log_2(256) = 8$ bits.