Question Details

Match the following List-I and List-II:


List-I

A. Immediate AM

B. Base register

C. Indirect

D. Index


List-II

1. Pointer

2. Constant

3. Array element

4. Position independent codes

Options

A

1 2 3 4

B

2 1 3 4

C

2 4 1 3

D

3 2 1 4

Show Answer

Correct Answer :

Option C

2 4 1 3

Solution :

The correct option is 2 4 1 3, which corresponds to the following matching:
A. Immediate AM → 2. Constant
B. Base register → 4. Position independent codes
C. Indirect → 1. Pointer
D. Index → 3. Array element

Here is the step-by-step educational breakdown of why these addressing modes match their respective concepts:

1. Immediate Addressing Mode (A → 2)
In immediate addressing mode, the operand is explicitly specified within the instruction itself. For example, in an instruction like ADD R1, #5, the value 5 is a constant value embedded in the instruction. Therefore, immediate addressing is directly used to represent constants.

2. Base Register Addressing Mode (B → 4)
In base register addressing, the effective address of an operand is calculated by adding an offset to the content of a base register. This allows programs and data to be loaded into any segment of memory without changing the offsets in the instructions. By updating the base register to point to the new starting address of the program, the code executes correctly. Hence, it is essential for implementing position-independent codes.

3. Indirect Addressing Mode (C → 1)
In indirect addressing mode, the address field of the instruction points to a memory location or register that contains the actual effective address of the operand (address of the address). This mechanism is exactly how pointers are implemented in programming languages, where a variable stores the address of another variable rather than the data itself.

4. Index Addressing Mode (D → 3)
In index addressing mode, the effective address is computed by adding an index value (usually stored in an index register) to a base memory address. This is the standard way to access an array element. The base address represents the starting location of the array, while the index register holds the offset of the specific element being accessed.

Unlock Our Free Library

Access expert-curated educational resources and study materials—completely free.

Ask AI Tutor
5 left
Q1 View Question & Options
AI Tutor is solving this question...
Reading question context & options...