GATE CSE 2024 Session 2 Q61: Field widths in R-type and I-type instruction formats
- Computer Organization and Architecture
- 2 marks
- NAT
- No negative marking
Question
A processor uses a 32-bit instruction format and supports byte-addressable memory access. The ISA of the processor has 150 distinct instructions. The instructions are equally divided into two types, namely R-type and I-type, whose formats are shown below.
| OPCODE | UNUSED | DST Register | SRC Register1 | SRC Register 2 |
| OPCODE | DST Register | SRC Register | # Immediate value/address |
In the OPCODE, 1 bit is used to distinguish between I-type and R-type instructions and the remaining bits indicate the operation. The processor has 50 architectural registers, and all register fields in the instructions are of equal size.
Let be the number of bits used to encode the UNUSED field, be the number of bits used to encode the OPCODE field, and be the number of bits used to encode the immediate value/address field. The value of is ________
Try it: numerical answer: type the value
Show answer and explanation
Answer: 34 (official GATE 2024 final answer key)
Concept used: Field widths: of the number of items to encode, with the rest of 32 bits left over.
First step: 50 registers need 6 bits; each type has 75 operations needing 7 bits, plus 1 type bit, so OPCODE is 8 bits.
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
Source: official GATE 2024 Session 2 CS question paper and final answer key, organised by IISc Bangalore. Question paper · Answer key
More Computer Organization and Architecture PYQs
- 2026 Session 1 · Q14Match addressing modes with high-level data elements
- 2026 Session 1 · Q15Instruction sequence for Z = X + Y on a load-store machine
- 2026 Session 1 · Q16Register dependency that causes a data hazard
- 2026 Session 1 · Q36IEEE 754 single-precision sum of 35C00000 and 34A00000
- 2026 Session 1 · Q38Tag length: direct-mapped vs K-way set-associative cache
- 2026 Session 1 · Q54Impossible TLB / page table / cache event sequences