Isn’t the question asking number of 0-address instructions, instead of possible number of encoding?
I approached the problem like this, let me know if I got it wrong.
Let’s say we have 10 bit word to hold the instructions. The address bits are represented using $x$ and opcode bits be $y$.
For a two-address instruction, the bit fields will look like this
$y\thinspace y\thinspace y\thinspace y\thinspace x\thinspace x\thinspace x\thinspace x\thinspace x\thinspace x\thinspace$
For one-address instructions,
$y\thinspace y\thinspace y\thinspace y\thinspace y\thinspace y\thinspace y\thinspace x\thinspace x\thinspace x\thinspace$
And for zero-adress instructions,
$y\thinspace y\thinspace y\thinspace y\thinspace y\thinspace y\thinspace y\thinspace y\thinspace y\thinspace y\thinspace$
Since we want to differentiate among different types of n-address instructions, let’s say starting 2 bits of opcode bits are dedicated for that.
($00$ for 2 address | $01$ for 1 address | $11$ for 0 address)
So we’re left with 2 bits of opcode in the first case, 5 bits in second case and 8 bits in third. So possible number of 2 address instructions will be 4. Same for 1 address will be 32, but question specifically mentions 16, so not sure if this method is correct or not. And if correct, we’re left with 8 bits in the third case, which results in 256 possible 0-address instructions.
Update: I read about expanding OP codes. Now it’s clear why it’s 640.