Number of operations possible = 2opcode = 24 =16
Here, address field value is 4 bits each for source and destination. So that makes instruction format as :
opcode (4 bits) |
Address field for source (4 bits) |
Address filed for destination (4 bits) |
<-------------------------------- 12 bits ------------------------------>
Number of 2 address instructions = 12
$\therefore$ Free combinations = 16 - 12 = 4
Now, we'll allocate memory for 1 address instructions
So, number of 1 address instructions possible = Free combinations * decoded value of address field
= 4 * 24
= 64
But there are only 24 1 address instructions available, so the remaining must be allocated to 0 address instructions.
So, number of addresses free after allocation of 1 address instructions = 64 - 24 = 40
$\therefore$ Number of 0 address instructions possible = 40 * decoded value of address field
= 40 * 24
= 640
Note : In expand opcode technique, we always allocate space for higher addresses initially and then move on to the lower addresses.