Skip to content
GATEiit

GATE CSE 2026 Session 2 Q44: Expanding opcodes: how many C-type opcodes fit

Question

Consider a processor that has 16 general purpose registers and it uses 2-byte instruction format for all its instructions. Variable-sized opcodes are permitted. There are three different types of instructions; M-type, R-type, and C-type. Each M-type instruction has 2 register operands and a 6-bit immediate operand. Each R-type instruction has 3 register operands. Each C-type instruction 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?

Try it: multiple choice: exactly one correct option

Select one option
Wrong answer costs 2/3 mark in GATE.
Show answer and explanation

Answer: B (official GATE 2026 final answer key)

Concept used: Expanding opcode: unused patterns of a shorter opcode become prefixes for longer opcodes.

First step: Opcode widths are 16 − 14 = 2 bits (M), 16 − 12 = 4 bits (R) and 16 − 10 = 6 bits (C); count the free encodings level by level.

Full step-by-step solution

Detailed working, common mistakes and linked mock tests will be available with a free GATEiit account. Log-in is coming soon.

Share this question

WhatsAppDownload image

Source: official GATE 2026 Session 2 CS question paper and final answer key, organised by IIT Guwahati. Question paper · Answer key