No. of entries in cache = 4K
Line size = 2 *16 = 32 bits = 1 word, for byte addressing (which is default) we need 2 offset bits to address 4 bytes.
So, number of cache lines = 4K
Number of lines in a set = 4 (4 way set associative)
So, number of sets = 4K / 4 = 1024.
So, we need lg 1024 = 10 set/index bits and 2 offset bits. Remaining 12 (24-10-2) bits must be tag bits.