Addressing Modes Question Bank for C-CAT
Topic-wise Addressing Modes MCQs for CDAC C-CAT preparation with answers and explanations.
Show Answer & Explanation
Correct Answer: C - Operand is in instruction itself
Immediate: operand value is directly in the instruction.
Show Answer & Explanation
Correct Answer: B - Data in a register
Register addressing: operand is in a CPU register.
Show Answer & Explanation
Correct Answer: D - Address in instruction points to memory
Direct: instruction contains memory address of operand.
Show Answer & Explanation
Correct Answer: B - Instruction has address of address
Indirect: address in instruction points to another address.
Show Answer & Explanation
Correct Answer: D - Uses index register + base
Indexed: effective address = base + index register.
Show Answer & Explanation
Correct Answer: A - Relocatable code
Base addressing helps make code position-independent.
Show Answer & Explanation
Correct Answer: C - Operand on top of stack
Stack addressing: operand implicitly on top of stack.
Show Answer & Explanation
Correct Answer: D - Register
Register mode is fastest - no memory access needed.
Show Answer & Explanation
Correct Answer: D - PC + offset
Relative: address = Program Counter + displacement.
Show Answer & Explanation
Correct Answer: C - Increments register after use
Auto-increment: register value used then incremented.
Show Answer & Explanation
Correct Answer: B - In the instruction itself
In immediate addressing, the operand value is part of the instruction itself, not in a register or memory.
Show Answer & Explanation
Correct Answer: B - Register contains the memory address of operand
In register indirect addressing, a register contains the memory address where the operand is located.
Show Answer & Explanation
Correct Answer: B - Base address + index register value
In indexed addressing, effective address = base address + contents of index register.
Show Answer & Explanation
Correct Answer: C - Effective address = base register + displacement in instruction
In base-register addressing, effective address = contents of base register + displacement value in instruction.
Show Answer & Explanation
Correct Answer: B - Branch and jump instructions
Relative addressing uses PC + offset to calculate address, commonly used for branch instructions to create position-independent code.
Show Answer & Explanation
Correct Answer: B - No memory reference needed, fastest for constants
Immediate addressing requires no memory access to fetch operand as it is part of instruction, making it very fast for constants.
Show Answer & Explanation
Correct Answer: B - Indexed
Indexed addressing is ideal for arrays as base address points to array start and index register holds element offset.
Show Answer & Explanation
Correct Answer: A - Register is decremented before accessing operand
In auto-decrement mode, the register is decremented before it is used to access the operand.
Show Answer & Explanation
Correct Answer: A - Relative (PC-relative) addressing
Relative addressing uses offset from PC, so code can be loaded anywhere in memory and still work correctly.
Show Answer & Explanation
Correct Answer: D - The actual memory address computed by the addressing mode
Effective address is the final memory address calculated after applying the addressing mode calculations.
Show Answer & Explanation
Correct Answer: B - Operand is implied by opcode, no address needed
In implied addressing, the operand is implicit in the instruction itself (e.g., CLA - clear accumulator).
Show Answer & Explanation
Correct Answer: D - Limited address space determined by instruction size
Direct addressing is limited by the number of bits available for the address field in the instruction format.
Show Answer & Explanation
Correct Answer: C - Uses base or PC plus displacement to calculate address
Displacement addressing combines a register (base or PC) with a displacement value to compute effective address.
Show Answer & Explanation
Correct Answer: D - Multiple levels of pointers are followed
Multilevel indirect addressing follows multiple pointer references to reach the final operand.
Show Answer & Explanation
Correct Answer: A - Scale factor (size of data element)
Scaled index addressing multiplies the index by the size of each element (1, 2, 4, or 8 bytes) for efficient array access.
Show Answer & Explanation
Correct Answer: B - Specified directly in the instruction itself
In immediate addressing mode, the operand value is directly included as part of the instruction. For example, MOV R1, #5 moves the value 5 directly into register R1.
Show Answer & Explanation
Correct Answer: D - The memory address where the operand is stored
In direct addressing mode, the instruction contains the actual memory address of the operand. The CPU directly accesses the specified memory location to get the data.
Show Answer & Explanation
Correct Answer: A - The instruction contains a register or memory location that holds the address of the operand
In indirect addressing mode, the instruction specifies a register or memory location that contains the address of the operand, requiring an additional memory access to get the actual data.
Show Answer & Explanation
Correct Answer: C - CPU registers to hold operands
In register addressing mode, the operand is located in a CPU register specified in the instruction. This is the fastest addressing mode as no memory access is needed.
Show Answer & Explanation
Correct Answer: B - Adding the content of an index register to a base address in the instruction
In indexed addressing mode, the effective address = Base address (given in instruction) + Content of index register. This is useful for accessing array elements sequentially.
Show Answer & Explanation
Correct Answer: B - Relocating programs in memory
Base register addressing calculates the effective address by adding an offset to a base register value. This facilitates program relocation since only the base register needs to change.
Show Answer & Explanation
Correct Answer: A - The actual memory address of the operand after address calculation
The effective address (EA) is the final computed memory address that is used to access the actual operand. Different addressing modes use different methods to calculate it.
Show Answer & Explanation
Correct Answer: C - The register contains the memory address of the operand
In register indirect addressing, the specified register holds the memory address where the operand is stored. The CPU first reads the register to get the address, then accesses that memory location.
Show Answer & Explanation
Correct Answer: D - The Program Counter (PC)
In relative addressing (PC-relative), the effective address = Program Counter + Offset. This is commonly used for branch instructions as it allows position-independent code.
Show Answer & Explanation
Correct Answer: D - Indexed
Indexed addressing mode is ideal for array access. The base address points to the start of the array, and the index register holds the element offset, which can be incremented in a loop.
Show Answer & Explanation
Correct Answer: A - The stack pointer register to access the top of stack
In stack (implicit) addressing, operations like PUSH and POP implicitly use the stack pointer to access the top of the stack. No explicit address is needed in the instruction.
Show Answer & Explanation
Correct Answer: D - The register value is automatically incremented
In auto-increment mode, the register used for addressing is automatically incremented after the operand is accessed. This is useful for traversing arrays or sequential memory locations.
Show Answer & Explanation
Correct Answer: C - Before accessing the operand
In auto-decrement mode, the register value is decremented before the operand is accessed. This is commonly used with stack operations (push) where the stack grows downward.
Show Answer & Explanation
Correct Answer: C - Register addressing
Register addressing is the fastest because the operand is already in a CPU register, requiring no memory access. All other modes need at least one memory access.
Show Answer & Explanation
Correct Answer: A - Content of a register + displacement value in instruction
In displacement addressing, the effective address = Register content + Displacement (offset given in instruction). Base register, indexed, and relative addressing are all variants of displacement addressing.
Show Answer & Explanation
Correct Answer: D - No memory access needed to fetch the operand
Immediate addressing is fast because the operand is part of the instruction itself, so no additional memory access is required to fetch it. However, the operand size is limited by the instruction format.
Show Answer & Explanation
Correct Answer: C - Register indirect
The brackets [R2] indicate register indirect addressing. R2 contains the memory address, and the data at that address is moved to R1. The CPU uses R2's value as a pointer to memory.
Show Answer & Explanation
Correct Answer: B - PC-relative (relative) addressing
PC-relative addressing calculates the branch target relative to the current PC value. This makes the code position-independent as the offset remains valid regardless of where the code is loaded in memory.
Show Answer & Explanation
Correct Answer: A - Base register + Index register
Base-indexed addressing combines a base register and an index register: EA = Base register + Index register. This is useful for accessing elements of arrays within data structures.
Show Answer & Explanation
Correct Answer: C - Requires extra memory access to get the operand address
Indirect addressing requires at least two memory accesses: one to get the address of the operand and another to get the operand itself. This makes it slower than direct addressing.
Show Answer & Explanation
Correct Answer: A - The operand is implied by the opcode itself
In implied addressing, the instruction itself specifies the operation without explicitly mentioning the operand. Examples include CLC (clear carry flag) and NOP (no operation).
Show Answer & Explanation
Correct Answer: A - 2
Two addressing modes are used: Register addressing for R1 and R2, and Immediate addressing for the constant value #10.
Show Answer & Explanation
Correct Answer: A - Register indirect addressing
Register indirect addressing corresponds to pointer dereferencing in high-level languages. The register holds the address (pointer), and the data at that address is the referenced value.
Show Answer & Explanation
Correct Answer: A - The address obtained points to another address, forming a chain
In multilevel indirect addressing, the address obtained from the first indirect reference points to another memory location that contains yet another address, forming a chain until the actual operand is reached.
Show Answer & Explanation
Correct Answer: C - Register and displacement (base + offset)
MOV R1, 100(R2) uses register addressing for R1 and displacement addressing for the source. The effective address of the source = R2 + 100, combining a base register with an offset.