Question
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 _________
Official answer and solution
- Official answer
- 32
- From
- Official GATE 2024 answer key
Solution
Subtract the bits required for the addressing mode, two register operands, and 16-bit scalar field from 32 bits to find the opcode bit-width.
- Addressing mode field: bits.
- Two register operand fields: Each of the registers requires bits, so bits.
- Scalar field: bits.
- Opcode field: bits.
With bits for the opcode field, the maximum number of unique opcodes is .
32
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2024 Computer Science and Information Technology - Set 2 (CS2)
- Question
- 57 of 65
- Section
- Computer Science and Information Technology
Report an error in this question
GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.