retagged by
465 views
0 votes
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?
retagged by

2 Answers

Best answer
1 votes
1 votes
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
selected by
1 votes
1 votes

One tip: Start with lowest bit in opcode that is maximum number of address instruction.

Related questions

2 votes
2 votes
1 answer
1
0 votes
0 votes
1 answer
4
lea asked Jun 12, 2023
290 views