GATE CS 2026 Set 2 | Question 44
Computer Organization & Architecture › Machine Instructions · MCQ · 2 marks · Answer: B
- Question 44Computer Organization & Architecturemcq2 marksConsider a processor that has 16 general purpose registers and it uses a 2-byte instruction format for all its instructions. Variable-sized opcodes are permitted. There are three types of instructions; M-type, R-type, and C-type. Each M-type has 2 register operands and a 6-bit immediate operand. Each R-type has 3 register operands. Each C-type has a register operand and a 6-bit offset value. If there are 2 unique M-type opcodes and 7 unique R-type opcodes, which one of the following options gives the maximum number of unique opcodes possible for C-type instructions?
- A.8
- B.4✓
- C.64
- D.16
Answer: B
Solution
Answer: (B) 16 registers → 4 bits/register; total instruction = 16 bits. - M-type operands bits → opcode field bits (4 codes). Using 2 leaves free 2-bit prefixes. - R-type operands bits → opcode bits. Each free 2-bit prefix expands into four-bit codes, so R-codes available; using 7 leaves 1 four-bit code. - C-type operands bits → opcode bits. The 1 remaining four-bit code expands into six-bit C-type opcodes. - A.
More GATE PYQ on Machine Instructions
All GATE CS Computer Organization & Architecture PYQ →Attempt GATE CS 2026 Set 2 in real GATE exam mode
Full paper with a timer, the GATE interface and a topic-wise analysis — free.
Create free account →