in CO and Architecture
596 views
1 vote
1 vote

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 ?

in CO and Architecture
596 views

4 Comments

@Ananya : Thanks, this link helps me to clear my doubt.
0
0
@Anu

will ans not be $\left ( 2^{11}-128 \right )\times 2^{5}$
0
0

answer will be (216 - 128*25 ) / 210 = 60

1
1

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}$