Size of cache = 256 KB
1 set = 8 Block ( 8 way set associative)
Tag bits = 6 bits
We know in set associative cache
Tag bits + set offset bits + word offset bits = physical address bits
Let's take set offset = x ( means 2^x sets )
Word offset = y (means no of words in block are 2^y)
No.Of blocks in cache= 2^18/2^y = 2^(18-y)
No of sets = 2^(18-y)/8 = 2^(18-y-3)
No of bits in physical address = 6+18-y-3+y+6 = 21 bits
Size of main memory = 2^21 = 2MB
Hence 2MB should be the answer