Q68.Marks: +2.0UGC NET Paper 2: Computer Science 18th June 2024 Shift 1 (Cancelled)
The instruction LD ADR(X) which is equivalent to AC ← M[ADR + XR] is in :
1.Direct Addressing Mode
2.Indirect Addressing Mode
3.Index Addressing Mode✓ Correct
4.Immediate Addressing Mode
Solution
The correct answer is Index Addressing Mode.
Key Points
The instruction LD ADR(X) which is equivalent to AC ← M[ADR + XR] is using the Index Addressing Mode.
In Index Addressing Mode, the effective address of the operand is generated by adding a constant value (ADR) to the contents of an index register (XR).
This mode is particularly useful for accessing array elements and iterating through data structures.
Additional Information
Direct Addressing Mode: The operand's address is given explicitly within the instruction. For example, LD 500 means load the content of memory location 500 into the AC.
Indirect Addressing Mode: The address field of the instruction points to a memory location that contains the effective address of the operand. For example, LD (500) means load the content of the memory location whose address is stored in memory location 500.
Immediate Addressing Mode: The operand is specified within the instruction itself. For example, LD #10 means load the value 10 directly into the AC.