In a two-way set associative cache with 32 blocks each storing 64 bytes, how many bits are needed for the index?
The 2 way set associative cache contains 32 blocks each of 64 bytes therefore the main memory size is 64 x 32 which is 2048 bytes. We require 11 bits to represent 2048 bytes. but in 2 way set assosiative cache the memory is adressed with (index adress + block adress) . to represent 32 blocks 5 bits are required. so the remaining 6 bits are used for index.
(or)
In a simple manner each block contains 64 Bytes so represent 64 Bytes we require 6 bits. Therefore the index bits are 6.
Get Answers For Free
Most questions answered within 1 hours.