# Which address bits are used for set selection/tag check in a cache?

If

Capacity = 24 KiB Associativity = 6 Line Size = 32 B

As far as I know:

$$Capacity = Associtivity * Line Size * Sets$$

so $$24576 = 32 * 6 * Sets$$

$$Sets = 128 = 2^7$$

thus 7 least significant bits are needed to identify set number.

Am I doing it correctly?

## 1 Answer

Your result is almost correct. The number of sets is indeed 128. But 128=2^7 And 7 bits are required to identify a set...

• Yes, my mistake – sswwqqaa Jan 10 '19 at 21:53