It is given , 20 bit instruction is placed in 1 word of memory .
And we have 256 word memory , 256 = 28 so 8 bits for 1 address, 8 bits for 2 address and 20 - (8+8) =4 bits for opcode.
opcode = 4 bits
add1= 8 bits
add2 = 8 bits
Given that there exist 8 two address instructions and 1984 one address instructions
with 20 bits , possible encoding is 220 .
No. of encoding for 2 address instructions = 8 * 28 * 28 = 219 bcoz two 8-bit address fields .
No. of encoding for 1 address instructions = 1984 * 28 bcoz one 8-bit address fields
So, number of possible 0-address instructions = 220 - 219 - ( 1984 * 28 )
= 524288 - 507904
= 16384
Now possible 0-address instructions = 16384 .