in CO and Architecture edited by
23 votes

The most appropriate matching for the following pairs$$\begin{array}{ll} \text{X: Indirect addressing} & \text{1: Loops } \\  \text{Y: Immediate addressing } & \text{2: Pointers} \\   \text{Z: Auto decrement addressing } & \text{3: Constants } \\  \end{array}$$ is

  1. $X - 3,  Y - 2,  Z - 1$
  2. $X - 1,  Y - 3,  Z - 2$
  3. $X - 2,  Y - 3,  Z - 1$
  4. $X - 3,  Y - 1,  Z - 2$
in CO and Architecture edited by


Register add mode :  access the local variables

Immediate add mode : access the  constant

Direct/Absolute add mode : access the static variables

Indirect add mode : implement pointer

indexed/ Base index : access the random array

Auto index: access the linear array

relative add mode and base register add mode : relocation at run time

base register add mode : best suit to write positions independent code

base register add mode : best suit to write positions independent code


Why not PC relative add mode is best suit ?



positions independent code means we can transfer control of statement  multiple segment  using diff diff base address 

but pc relative control will be transfer  within the  segment  


Subscribe to GO Classes for GATE CSE 2022

2 Answers

29 votes
Best answer

(C) is the most appropriate one.

General instruction format: |opcode|Mode|Address Field|
Pointer dereference $\rightarrow $ Indirect addressing, $E.A = M$ [Value stored in address field]
Operating with a constant $\rightarrow $ Immediate addressing, $E.A =$ Address field of the instruction.
Loop iteration counter check $\rightarrow $ Auto decrement addressing $R1=R1-1$; $E.A = R1$

E.A = Effective address, where the required operand will be found.

edited by


Pointer dereference-> indirect addressing
Operating with a constant -> immediate addressing
Loop iteration counter check -> auto decrement addressing
Please explain autodecrement addressing and loops
@barney ross

for(i=n; i<1000; )        // loop

{   i=i-1

0 votes

Indirect addressing:
Indirect addressing means that the address of the data is held in an intermediate location so that the address is first 'looked up' and then used to locate the data itself.

Immediate addressing:
Immediate Addressing. An immediate operand has a constant value or an expression. When an instruction with two operands uses immediate addressing, the first operand may be a register or memory location, and the second operand is an immediate constant.

 Auto increment or decrements: can be one by using loops.


Related questions