401 views
1 votes
1 votes

The format of a double operand instruction of a CPU consist of 4 bit opcode
and 4 bits for source and destination. 12 double operand
instructions and 24 single operand instructions must be implemented.
Opcode
field must identify the three groups of noperand
instructions.
Calculate the total number of zero operand instructions that can be
implemented?

answer given as -512

dnt knw about answer want ur option with correct explanation

2 Answers

Best answer
1 votes
1 votes

Ans should be 640

4bit opecode + 4bit source + 4bit destination

Two operand instruction includes source as well as destinatiion operand. 

Number of two operand instruction possible=2=16  from this we are using only 12

 =16-12 =4  choices still left to use and ramaining 8 bits so that is used with single operand instruction.Single Operand instruction having one operand may be source or destination .

So total possibilitis=4 * 2=64 from this we are used only 24 =64-24=40 are still left to use and remaining 4 bits .That can be used with zero operand instruction.

SO =40 * 2 =640 instuctions are possible.


edited by

Related questions