<-------------------------16 bits--------------------------------------->
no. of lines = cache size / block size = ${}\frac{2^{10}}{2^3} = 2^7$
sets = lines/associativity = ${}\frac{2^{7}}{2^x} = 2^{7-x}$
so, 16 = 9 +(7-x) +3
$\therefore$ x= 3
associativity = $2^x = 2^3 =8$