Cache capacity =N words

Block size= B words**,bits** for block offset=log(B)

No of lines in **Direct Mapped cache** =N/B,**bits** for no. of lines=log(N/B)

No of Sets in **16-way set associative cache**=N/16B,,**bits** for no. of sets=log(N/16B)

In direct mapped length of tag =10 bits

Length of **PHYSICAL ADDRESSES** :-

DIRECT-MAPPED
TAG-10 |
LINE.NO:-LOG(N/B) |
BLOCK OFFSET:-LOG(B) |

16-WAY SET ASSOCIATIVE
TAG-X |
SET.NO-LOG(N/16B) |
BLOCK OFFSET:-LOG(B) |

**As Physical address is same for both cache mappings**,

10+LOG(N/B)+LOG(B)=X+LOG(N/16B)+LOG(B)

10+LOG(N/B)=X+LOG(N/16B) //AFTER CANCELLING LOG(B)

2^(10+LOG(N/B))=2^(X+LOG(N/16B)) //EXPONENTIATION WITH 2 ,BOTH SIDES

(2^10) *(N/B)=(2^X) *(N/16B)

(2^10) =(2^X) *(1/2^4)

2^14=2^X

**X=14 ** //APPLYING LOG TO BOTH SIDES