in CO and Architecture retagged by
369 views
0 votes
0 votes
Certain CPU uses expanding op-code . It has 16 bit instructions with 6-bit addresses . It has maximum 192 one-address Instructions.

Then number of 2-addresses instructions are supported by the system is __________________
in CO and Architecture retagged by
by
369 views

2 Comments

@Magma

https://gateoverflow.in/170986/no-of-0-address-instructions

$\left ( 2^{16}-192\times 2^{6} \right )/\left ( 2^{6} \right )^{2}=13$

got it?

1
1
thanks :)
0
0

1 Answer

2 votes
2 votes
6 bit addresses ....2 address instructions are also there

so 12 bit for address and 4 bit for opcode

now let 2 address instructions be n so no.of unused instructions will be 2^4-n

now for expanding opcode we will have

(2^4-n)*2^6 on adress which will be equal to 192

(2^4-n)*2^6=192 solving it we get n as 13

2 Comments

@Navneet Kalra    thanks

can you explain me with more details..cuz I always stuck on this kind of questions

so 12 bit for address

How ?? 

0
0
See it is given two address instructions are there...........ofr example take ADD R1 R2

so we will have mention two addresses for two registers so 6 bit for 1 and 6 bit for other altogether 12 bits....

as we can specify R1 AND R2 IN one 6 bit at a time in the instruction........now take expanding opcode is given so one adrress such as PUSH AND POP Instruction can also be executed here
1
1