since 480 registers, hence 9 bits for register operand bits.

opcode=6bits | operand1=9bits | operand2=9bits |

((2^6-48)*2^9-x)=2^11

solving it, we get x=8188.

Dark Mode

312 views

0 votes

A register to register machine supports 2–address, 1-address and zero–address instructions. Instruction register size is 24 bits and register set size is 480.

If there are 48 2–address instructions and 2048 zero – address instructions then what is the maximum possible number of 1 – address instruction?

If there are 48 2–address instructions and 2048 zero – address instructions then what is the maximum possible number of 1 – address instruction?

1 vote

Best answer

As there are 480 registers, the bits require to represent registers is 9(log 480).

Now as we have 2 register operands we are left with 6 bits(24-18) for opcode.

The number of 2 address instructions possible = 2^6.

But we are only using 48 instructions from the 64, 2 address instructions.

2 address instructions not used = 64 - 48 = 16.

Total number of 1 address instruction possible = 16 * (2^9) => 8192

Let x be total number of 1 address instruction we are using.

So total number of 1 address instruction not used = 8192 - x

Now total number of 0 address instructions possible = (8192 - x) * 2^9

(8192 - x)*2^9 = 2048

x= 8188.

Total number of 1 address instructions possible = 8188

Now as we have 2 register operands we are left with 6 bits(24-18) for opcode.

The number of 2 address instructions possible = 2^6.

But we are only using 48 instructions from the 64, 2 address instructions.

2 address instructions not used = 64 - 48 = 16.

Total number of 1 address instruction possible = 16 * (2^9) => 8192

Let x be total number of 1 address instruction we are using.

So total number of 1 address instruction not used = 8192 - x

Now total number of 0 address instructions possible = (8192 - x) * 2^9

(8192 - x)*2^9 = 2048

x= 8188.

Total number of 1 address instructions possible = 8188