retagged by
1,935 views
2 votes
2 votes
A processor with $16$ general purpose registers uses a $32$-bit instruction format. The instruction format consists of an opcode field, an addressing mode field, two register operand fields, and a $16$-bit scalar field. If $8$ addressing modes are to be supported, the maximum number of unique opcodes possible for every addressing mode is ___________.
retagged by

1 Answer

0 votes
0 votes

Instruction size = 32 bits

Given that no. of Registers = 16

So no. of bits needed to specify a register in instruction = 4

Given that no. of Addressing modes = 8

So no. of bits needed to specify an addressing mode in instruction = 3

No. of bits available for opcode = Instruction size - (Addressing mode field size + 2 * Register field size + Scalar field size)

 = 32 - (3 + 2*4 + 16)

 = 32 - 27

 = 5

So maximum no. of unique opcodes possible = 2^5 = 32

edited by
Answer:

Related questions