Computer Sciences > GATE 2025 SET-1 > Instruction Set Architecture
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, #25 //R1=R1+25
A
16
B
20
C
22
D
24

Correct : b

Explanation:
To find the maximum number of bits available for an immediate operand, we need to calculate how many bits of the 32-bit instruction must be allocated to the Opcode (instruction type) and the register fields.
1. Calculate Opcode Bits:
The processor supports 50 distinct instruction types. To uniquely represent 50 operations, the number of bits required for the opcode field is:
    25 < 50 ≤ 266 bits are required.

2. Calculate Register Bits:
The processor has 64 general-purpose registers. To address any one of the 64 unique registers, the number of bits required per register field is:
    26 = 64 → 6 bits are required per register.

3. Analyze the Target Instruction Type:
Look at the example given: ADD R1, #25 (which represents $R1 = R1 + 25$).
• This is an instruction that involves one destination register ($R1$), one source register (also $R1$ since it reads and modifies it), and one immediate operand ($25$).
• Therefore, the instruction structure must allocate bits for: [ Opcode ] [ Register Destination ] [ Immediate Value ].

4. Calculate the Remaining Bits for the Immediate Operand:
Subtract the bits consumed by the opcode and the single referenced register field from the total instruction size:
    Bits for Immediate Operand = Total Bits - Opcode Bits - Register Bits
    Bits for Immediate Operand = 32 - 6 - 6 = 20 bits.

5. Conclusion:
The maximum size of the immediate field for this instruction type is exactly 20 bits, matching option (b).

Similar Questions

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, tw...
#939 Fill in the Blanks
Which of the following is/are part of an Instruction Set Architecture of a processor?
#1436 MCQ
Consider a processor P whose instruction set architecture is the load-store architecture. The instruction format is such that the first operand of any instruct...
#1499 MCQ

Related Topics

No tags found

Unique Visitor Count

Total Unique Visitors

Loading......