• retagged by
12,626 views
39 39 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$

4 Answers

Best answer
45 45 votes

(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
1 1 vote

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.

0 0 votes

Indirect Addressing Mode is used in case of Pointers (to hold address of operands).

Immediate Addressing Mode is used to initialize registers with constant value.

Auto-decrement Addressing Mode implements Loops to automatically decrement the contents of the register specified in the instruction, which is used as the effective address of the operand.

Therefore, Option C is correct.

0 0 votes
  • X → 2 (Pointers)
    Indirect addressing  Effective address=M[A]
  • Y → 3 (Constants)
    Immediate addressing the address field of the instruction contains the operand 
  • Z → 1 (Loops)
    Auto-decrement  -(R)  is useful in loops  $1$. Decrement R by operand size   $2.$ E[A] = [R] = Content of R

 

Answer:
Position:
Show:

Related questions

51 51 votes
8 answers 8 answers
17.6k
17.6k views
Kathleen asked Sep 14, 2014
17,599 views
A multiset is an unordered collection of elements where elements may repeat any number of times. The size of a multiset is the number of elements in it, counting repetiti...
33 33 votes
2 answers 2 answers
8.8k
8.8k views
Kathleen asked Sep 14, 2014
8,767 views
The most appropriate matching for the following pairs$$\begin{array}{|l|l|}\hline \text{X: depth first search} & \text{1: heap } \\\hline \text{Y: breadth first search...
79 79 votes
4 answers 4 answers
19.6k
19.6k views
Kathleen asked Sep 14, 2014
19,575 views
The most appropriate matching for the following pairs$$\begin{array}{|ll|ll|}\hline X: & \text{m = malloc(5); m = NULL;} & 1: & \text{using dangling pointers} \\\hline Y...
10 10 votes
3 answers 3 answers
4.2k
4.2k views
sh!va asked May 7, 2017
4,211 views
The most appropriate matching for the following pairs :$\begin{array}{clcl} \text{X.} & \text{Indirect Addressing} & \text{i.} & \text{Loop} \\ \text{Y.} & \text{Immedi...