GATE CSE Instruction Set and Addressing Modes PYQs
Instruction set and addressing modes in GATE CS is consistently tested through instruction word encoding, expanding opcode schemes, addressing mode semantics, a… Read the guide
- Questions
- 19
- Asked
- since 2011
- Total marks
- 29
- Marks / paper
- 1.2
19 GATE CSE Instruction Set and Addressing Modes PYQs with solutions, from Computer Organization and Architecture. Browse all GATE CSE PYQs.
Questions
Every official paper that asked this topic, newest first.
- GATE CSE 2026 Set 1 · Q14Match each addressing mode in List I with a data element or an element of a data structure (in a high-level language) in List II:MCQ1 markMediumDiagramSolve
- GATE CSE 2026 Set 1 · Q15Consider a processor P whose instruction set architecture is the load-store architecture. The instruction format is such that the first operand of any instruction is the destination operand. Which one of the following sequences of instructions corresponds to the high-level language statement ? *Note:*…MCQ1 markEasySolve
- GATE CSE 2026 Set 2 · Q44Consider 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.…MCQ2 marksMediumSolve
- GATE CSE 2025 Set 1 · Q37A 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 + 25MCQ2 marksEasySolve - GATE CSE 2025 Set 2 · Q28Which of the following is/are part of an Instruction Set Architecture of a processor?MSQ1 markEasySolve
- GATE CSE 2024 Set 2 · Q57A processor with 16 general purpose registers uses a 32-bit instruction format. The instruction format consists of an opcode field, an addressing mode field, two register operand fields, and a 16-bit scalar field. If 8 addressing modes are to be supported, the maximum number of unique opcodes possible for every…NAT2 marksEasySolve
- GATE CSE 2024 Set 2 · Q61A 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. R-type Instruction Format: I-type Instruction Format: In the…NAT2 marksMediumDiagramSolve
- GATE CSE 2023 · Q41Consider the given C-code and its corresponding assembly code, with a few operands U1–U4 being unknown. Some useful information as well as the semantics of each unique assembly instruction is annotated as inline comments in the code. The memory is byte-addressable. Which one of the following options is a CORRECT…MCQ2 marksMediumDiagramSolve
- GATE CSE 2021 Set 1 · Q55Consider the following instruction sequence where registers R1, R2 and R3 are general purpose and MEMORY[X] denotes the content at the memory location X. Assume that the content of the memory location 5000 is 10, and the content of the register R3 is 3000. The content of each of the memory locations from 3000 to 3010…NAT2 marksMediumDiagramSolve
- GATE CSE 2021 Set 2 · Q44If the numerical value of a 2-byte unsigned integer on a little endian computer is 255 more than that on a big endian computer, which of the following choices represent(s) the unsigned integer on a little endian computer?MSQ2 marksMediumSolve
- GATE CSE 2020 · Q44A processor has 64 registers and uses 16-bit instruction format. It has two types of instructions: I-type and R-type. Each I-type instruction contains an opcode, a register name, and a 4-bit immediate value. Each R-type instruction contains an opcode and two register names. If there are 8 distinct I-type opcodes, then…NAT2 marksMediumSolve
- GATE CSE 2018 · Q5Consider the following processor design characteristics. I. Register-to-register arithmetic operations only II. Fixed-length instruction format III. Hardwired control unit Which of the characteristics above are used in the design of a RISC processor?MCQ1 markEasySolve
- GATE CSE 2017 Set 1 · Q11Consider the C struct defined below:
struct data { int marks [100]; char grade; int cnumber; }; struct data student;The base address ofstudentis available in register R1. The fieldstudent.gradecan be accessed efficiently usingMCQ1 markEasySolve - GATE CSE 2017 Set 1 · Q49Consider a RISC machine where each instruction is exactly 4 bytes long. Conditional and unconditional branch instructions use PC-relative addressing mode with Offset specified in bytes to the target location of the branch instruction. Further the Offset is always with respect to the address of the next instruction in…NAT2 marksMediumDiagramSolve
- GATE CSE 2016 Set 2 · Q10A processor has 40 distinct instructions and 24 general purpose registers. A 32-bit instruction word has an opcode, two register operands and an immediate operand. The number of bits available for the immediate operand field is __________.NAT1 markEasySolve
- GATE CSE 2016 Set 2 · Q31Consider a processor with 64 registers and an instruction set of size twelve. Each instruction has five distinct fields, namely, opcode, two source register identifiers, one destination register identifier, and a twelve-bit immediate value. Each instruction must be stored in memory in a byte-aligned fashion. If a…NAT2 marksEasySolve
- GATE CSE 2015 Set 1 · Q8For computers based on three-address instruction formats, each address field can be used to specify which of the following: (S1) A memory operand (S2) A processor register (S3) An implied accumulator registerMCQ1 markEasySolve
- GATE CSE 2014 Set 1 · Q9A machine has a 32-bit architecture, with 1-word long instructions. It has 64 registers, each of which is 32 bits long. It needs to support 45 instructions, which have an immediate operand in addition to two register operands. Assuming that the immediate operand is an unsigned integer, the maximum value of the…NAT1 markMediumSolve
- GATE CSE 2011 · Q21Consider a hypothetical processor with an instruction of type
LW R1, 20(R2), which during execution reads a 32-bit word from memory and stores it in a 32-bit register R1. The effective address of the memory location is obtained by the addition of a constant 20 and the contents of register R2. Which of the…MCQ1 markEasySolve
What GATE tests in Instruction Set and Addressing Modes
Concepts, patterns, formulas and traps distilled from past papers.
Instruction set and addressing modes in GATE CS is consistently tested through instruction word encoding, expanding opcode schemes, addressing mode semantics, and ISA architectural principles. Problems evaluate a candidate's ability to calculate bit allocations for opcodes, register specifiers, and immediates, as well as mapping high-level constructs (structs, arrays, pointers) to assembly addressing modes. The topic features a healthy mix of conceptual 1-mark MCQs/MSQs and rigorous 2-mark NATs involving bit calculations and assembly program traces.
Core concepts
- Instruction word encoding (Opcode, Register fields, Addressing Mode field, Immediate/Displacement)
- Expanding opcode encoding for variable-length opcodes
- Addressing modes: Immediate, Direct, Register Direct, Register Indirect, Base/Indexed with Displacement, Autoincrement/Autodecrement
- ISA vs. Microarchitecture (architectural registers vs. caches, clock speed, pipeline stages)
- Load-Store Architecture (RISC principles, memory access strictly via LOAD/STORE)
- Byte-addressable memory alignment and pointer arithmetic scaling
- Big-Endian vs. Little-Endian memory layout
- Least Significant Byte (LSB) and Most Significant Byte (MSB) positioning
- Multi-byte integer hexadecimal notation
- Byte-level algebraic difference formulation
- PC-Relative Addressing Mode
- Branch Target Address (BTA) Computation
- Instruction Length and Byte Alignment
- Relative Displacement (Forward vs. Backward Branching)
- Sequential PC Increment Behavior
Recurring question patterns
Instruction Format Bit Allocation and Immediate Calculation
Commonmixed1.5 marks2025, 2024, 2016, 2014Given total instruction length, number of distinct instructions, and register counts, determine the field widths (opcode, register, addressing mode, unused) or the maximum immediate/scalar operand value, occasionally incorporating memory alignment constraints (e.g., byte alignment).
Expanding Opcode Technique
Commonmixed2 marks2026, 2020Calculate the maximum number of distinct instructions for one instruction format given used opcodes in other formats by tracking unused prefix combinations across variable-length opcode fields.
Addressing Mode Identification and HLL Data Structure Mapping
CommonMCQ1 marks2026, 2017, 2011Identify specific addressing modes (Base-displacement, Index, Indirect, Immediate) from assembly instructions or match addressing modes to high-level language constructs (constants, pointers, struct fields, array indexing).
ISA Fundamentals and Load-Store Execution
Commonmixed1 marks2026, 2025, 2018, 2015Conceptual evaluation of ISA vs. microarchitecture boundaries (registers vs cache/clock), RISC vs CISC design traits (hardwired control, fixed-length instructions), and synthesizing load-store instruction sequences for high-level operations.
Assembly Code Execution and C-to-Assembly Mapping
Occasionalmixed2 marks2023, 2021Trace execution of an assembly loop operating on memory arrays to determine final register/memory contents, or fill in missing assembly operands (e.g., shift amounts for scaling, byte offsets, branch labels) matching a C code snippet.
Endianness Arithmetic and Value Comparison
OccasionalMSQ2 marks2021Given a relation (such as an arithmetic difference) between the numerical values of the same multi-byte integer stored in memory under Little Endian and Big Endian conventions, determine the valid hexadecimal representations.
PC-Relative Branch Offset Calculation
OccasionalNAT2 marks2017Given a sequence of fixed-size instructions (e.g., 4-byte RISC instructions) and a branch instruction at index i+k targeting index i, compute the signed offset in bytes or words assuming the PC has already advanced to the sequential next instruction.
Formulas GATE uses
Register Field Width
Used to find the minimum number of bits required to encode one register operand among architectural registers.
Opcode Field Width
Used when an instruction set requires a fixed-width opcode to distinguish operations.
Max Unsigned Immediate Value
Used to compute the maximum integer representable in an unsigned immediate field of width bits.
Byte-Aligned Memory Size
Used when instructions must be padded to whole byte boundaries in byte-addressable memory.
Expanding Opcode Availability
Used when unused prefixes of bit-length are extended to create opcodes of bit-length .
2-Byte Big-Endian Value
When interpreting a 2-byte integer stored at consecutive addresses where byte is at the lower address (MSB) and byte is at the higher address (LSB).
2-Byte Little-Endian Value
When interpreting a 2-byte integer stored at consecutive addresses where byte is at the lower address (LSB) and byte is at the higher address (MSB).
2-Byte Endianness Value Difference
When relating the numerical difference between little-endian and big-endian representations of the same memory bytes.
PC-Relative Target Address
Used to compute the branch target address when the PC is incremented to point to the instruction immediately following the branch instruction.
Signed Byte Offset Calculation
Used when determining the decimal value to encode in a branch instruction field given instruction size and relative positions.
Examiner traps in Instruction Set and Addressing Modes
- Forgetting that 32-bit integer array accesses in byte-addressable memory require byte displacements (scaling index by 4, not 1).
- Failing to apply the ceiling function ⌈ log2(N) ⌉ when N is not an exact power of 2 (e.g., 50 registers require 6 bits, not 5.64 bits).
- Conflating ISA features (register file size) with microarchitecture features (cache levels, clock frequency).
- Forgetting to subtract used opcodes before expanding unused prefixes in expanding opcode problems.
- Neglecting byte-alignment ceiling ⌈ bits/8 ⌉ before multiplying by total instruction count.
- Allowing direct memory operands in ALU operations in load-store (RISC) architectures.
- Confusing written hexadecimal order with memory address order (hex literals are written MSB-first, so standard notation displays B1B0 in little-endian systems where B1 is the MSB).
- Sign inversion trap: confusing B1 - B0 = +1 with B0 - B1 = +1, leading to selecting inverted byte pairs.
- Forgetting that 0x00 and 0xFF are valid single-byte values when checking boundary cases like 0x0100.
- Calculating offset relative to the branch instruction address itself rather than the updated PC (address of the subsequent instruction).
- Forgetting the negative sign for backward branch offsets.
- Failing to scale the offset by the instruction length in bytes when offset is specified in byte units rather than word units.
How questions are asked
- Compute bit-field width or immediate range (NAT)
- Multi-tier expanding opcode maximization (NAT/MCQ)
- Match addressing mode to high-level programming language construct (MCQ)
- Identify architectural characteristics vs microarchitectural implementations (MSQ/MCQ)
- Synthesize load-store instruction sequence for arithmetic expressions (MCQ)
- Assembly loop trace with memory address updates (NAT)
- Fill-in-the-blank operands for C-to-assembly compiler mapping (MCQ)
- Multi-select identification of hexadecimal values matching endian arithmetic conditions
- Memory-dump byte layout translation to integer/hex representation
- Instruction sequence analysis to compute signed numerical branch offset (NAT)
- Effective address calculation given register values and addressing mode specifications
Paper trends
Instruction format questions evolved from simple 1-mark bit subtractions into multi-format equations with unused/type-specifier bits and linear combinations (e.g., computing ).
2024, 2016, 2014
Introduction of MSQ and multi-option matchings testing fine distinctions between ISA visible state and microarchitectural features.
2026, 2025
Expanding opcode problems shifted from two-type formats (I-type and R-type) to three-tier formats (M-type, R-type, C-type).
2026, 2020
Testing shifted to MSQ formats requiring candidates to solve an algebraic byte constraint () and identify all matching multi-byte hexadecimal patterns.
2021
Focus shifted towards NAT questions requiring signed arithmetic calculation of jump displacements rather than purely theoretical classification of addressing modes.
2017
Difficulty notes
Easy questions (1 mark) focus on direct formula application (), identifying addressing modes for structs/constants, or distinguishing ISA from microarchitecture. Medium questions (2 marks) involve multi-type expanding opcodes, assembly loop traces with boundary conditions, byte-alignment padding calculations, or C-to-assembly semantic matches.