Skip to main content

GATE CSE 2025CO & Architecture › Machine Instructions & Addressing ModesVerified

GATE CSE 2025 PYQ: A processor has 64 64 64 general-purpose registers and 50 50 50 distinct instruction types. An instruction…

A processor has 64 general-purpose registers and 50 distinct instruction types. An instruction is encoded in 32-bits. What is the maximum number of bits that can be used to store the immediate operand for the given instruction?

ADD R1\text{ADD R1}, #25\#25  / /  R 1=R 1+25\text{R 1=R 1+25}

  1. A
    16
  2. B
    20
    Correct answer
  3. C
    22
  4. D
    24

Answer

(B) 20 20 20

Approach

The instruction format must allocate enough bits to identify the opcode and the register operand; the remaining bits can be used for the immediate value. For ADD R1, #25, one register is explicitly referenced, so the fields are opcode, register, and immediate.

The maximum immediate operand size is determined by subtracting the opcode and register fields from the 32-bit instruction length: $32 - \lceil \log_2 50 \rceil - \lceil \log_2 64 \rceil = 32 - 6 - 6 = 20$ bits.

Reviewed by GateIQ Editorial Team: IIT & IISc Alumni.