Cache size = 512 KB

Block size = 128 words

Number of Blocks = 512KB/ 128 = 4K

Since it is 4-way set associative, there are 4 blocks in each set

Number of sets= 4k/4 = 1K

No. of bits needed to get the set number = 10.

Since main memory is of size 256MB, Main memory address= 28 bits

Since block is of 128 words, block offset =7 bits

So, out of 28 bits of address 10 bits are needed for set number and 7 bits are needed for block offset.

So the no. of bits for Tag= 28-10-7 = 11bits

Tag Bits(11)

Set Number(10)

Block offset(7)

The given memory location FC23CDEH can be written as 1111 1100 0010 0011 1100 1101 1110. The last H is to say that this is hexa decimal number.

From this the most significant 11 bits are tag bits.. (1111 1100 001) its decimal value is 2017.

To calculate the required expression we need to find 2017^217 mod 17 , its value is 6. Then (2017^217 mod 17 / 6) = 1.

The final value is 1^217 = 1.