GateAI
Instruction Set and Addressing Modes

GATE CSE 2026 Set 2 · Q44

MCQ2 marksMedium

Time

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?

Select one answerSingle correct

Pick an option to check

Solution

Step-by-step verified solution

Official answer: B) 4

Instruction Set and Addressing Modes

Let us analyze the instruction length and opcode requirements for each instruction format:

  1. Instruction Size & Register Bits:

    • Total instruction size =2 bytes=16 bits= 2\text{ bytes} = 16\text{ bits}.

    • Number of registers =16  ⟹  log⁡2(16)=4 bits= 16 \implies \log_2(16) = 4\text{ bits} are needed per register field.

  2. M-type Instruction:

    • Operands: 22 registers (2×4=8 bits2 \times 4 = 8\text{ bits}) +6-bit immediate=14 bits+ 6\text{-bit immediate} = 14\text{ bits}.

    • Remaining bits for Opcode =16−14=2 bits= 16 - 14 = 2\text{ bits}.

    • Total possible opcodes with 2 bits=22=42\text{ bits} = 2^2 = 4.

    • Given M-type opcodes used =2= 2.

    • Free (unused) combinations =4−2=2= 4 - 2 = 2.

  3. R-type Instruction:

    • Operands: 33 registers (3×4=12 bits3 \times 4 = 12\text{ bits}).

    • Remaining bits for Opcode =16−12=4 bits= 16 - 12 = 4\text{ bits}.

    • Expanding the 22 unused 22-bit prefixes gives: 2×24−2=2×4=82 \times 2^{4-2} = 2 \times 4 = 8 available combinations of 44-bit opcodes.

    • Given R-type opcodes used =7= 7.

    • Free (unused) combinations =8−7=1= 8 - 7 = 1.

  4. C-type Instruction:

    • Operands: 11 register (4 bits4\text{ bits}) +6-bit offset=10 bits+ 6\text{-bit offset} = 10\text{ bits}.

    • Remaining bits for Opcode =16−10=6 bits= 16 - 10 = 6\text{ bits}.

    • Expanding the 11 unused 44-bit prefix to a 66-bit opcode gives:

      Maximum C-type opcodes=1×26−4=1×22=4\text{Maximum C-type opcodes} = 1 \times 2^{6-4} = 1 \times 2^2 = 4

Thus, the correct option is (B).

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This Instruction Set and Addressing Modes previous year question is Q44 of the GATE CSE 2026 Set 2 paper. Find more GATE CSE PYQs on Instruction Set and Addressing Modes in Computer Organization and Architecture, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related Instruction Set and Addressing Modes PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

Instruction Set and Addressing Modes in GATE CSE

Instruction Set and Addressing Modes has 19 GATE CSE PYQs across 15 papers from 2011 to 2026. 3 of them are 2-mark MCQs like this one, and it is the only one in GATE CSE 2026 Set 2.

How GATE tests Instruction Set and Addressing Modes

More from GATE CSE 2026 Set 2

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2026 Set 2 · Q44 · MCQ

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?

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.