554 views
1 votes
1 votes

A computer has 16-bit Instruction and 5-bit address if there are maximum 128 1-Address Instructions possible,then how many 2-Address Instructions used by Computer ?

1 Answer

0 votes
0 votes
This question uses expanding opcode technique.

Suppose we are provided with $x$ 2-address instructions, $y$ 1 address instructions and $z$ 0 address instructions

Then the formula is

Total 2-address instructions possible = $2^6$

$x< 2^{6}$

After utilizing x instructions, No of 1 address instructions remaining are

$(2^{6}-x)*2^{5}$

But we know we have $y$ 1 address instructions

So total 0 address instructions are

$((2^{6}-x)*2^{5})-y)*2^{5}$