227 views
1 votes
1 votes
The format of a double operand instruction of a cpu consist of 4 bit op-code and 4 bits for source and destination. 12 double  operand instructions and 24 single operand instructions must be implemented. Op-code field mus identify three groups of n-operand instructions . What is the total number of zero operand instructions that can be implemented ?

1 Answer

0 votes
0 votes

Number of operations possible = 2opcode = 24 =16

Here, address field value is 4 bits each for source and destination. So that makes instruction format as :

 opcode (4 bits)   Address field for source (4 bits)   Address filed for destination (4 bits)

<-------------------------------- 12 bits ------------------------------>

Number of 2 address instructions = 12

$\therefore$ Free combinations = 16 - 12 = 4

Now, we'll allocate memory for 1 address instructions

So, number of 1 address instructions possible = Free combinations * decoded value of address field

                                                                   = 4 * 24

                                                                                         = 64

But there are only 24 1 address instructions available, so the remaining must be allocated to 0 address instructions.

So, number of addresses free after allocation of 1 address instructions = 64 - 24 = 40

$\therefore$ Number of 0 address instructions possible = 40 * decoded value of address field

                                                                               = 40 * 24

                                                                                                         = 640

Note : In expand opcode technique, we always allocate space for higher addresses initially and then move on to the lower addresses.

Related questions

0 votes
0 votes
0 answers
1
deba1014 asked Aug 11, 2023
363 views
Consider a system which supports 2-address and 1-address instructions both. System has 20-bits instructions and 7-bits addresses then which of the following is/are the nu...
0 votes
0 votes
1 answer
3
Learner_jai asked Nov 30, 2017
475 views
A DMA module is transferring character s to memory using cycle stealing, from a device transmitting at 9600 bits per second.The processor is fetching instructions at the ...
1 votes
1 votes
0 answers
4
Warlock lord asked Sep 28, 2017
182 views
If asked to count the number of RAW dependencies, do we consider only adjacent instructions or both adjacent and non-adjacent? Please explain in detail.