A computer with 32bit instruct ions and 12bit addresses has
A computer with 32-bit instruct ions and 12-bit addresses has 124 2-address instructions and some number of 1-address inst ructions. How many bits are available for the opcodes of the 2-address instructions. How many 1-address instructions may be encoded? Show (in hexadecimal) how the instructions may be encoded (use the non-hexadecimal digit \'X\' to indicate the part of the instruction consumed by address(es)).
Solution
a
12 bits for 1 address.So we require 12*2 =24 bits for 2 addresses.
32-24 =8 bits are available for the opcodes of the 2 address instructions.
b.
So 220 1 address instructions may be executed.
c
124 in decimal = 7C in hexadecimal
| Opcode(20 bit) | Address(12 bit) |
