• edited by
2,027 views
15 15 votes

Match each addressing mode in $\textbf{List I}$ with a data element or an element of a data structure (in a high-level language) in $\textbf{List II}$:
\[
\begin{array}{|l|l|}
\hline
{\textbf{List I}} & {\textbf{List II}} \\
\hline \hline
P.\ \text{Immediate} & 1.\ \text{Element of an array} \\
\hline
Q.\ \text{Indirect} & 2.\ \text{Pointer} \\
\hline
R.\ \text{Base with index} & 3.\ \text{Element of a record} \\
\hline
S.\ \text{Base with offset/displacement} & 4.\ \text{Constant} \\
\hline
\end{array}
\]

  1. $\mathrm{P}-4, \mathrm{Q}-3, \mathrm{R}-1, \mathrm{~S}-2$
  2. $\mathrm{P}-4, \mathrm{Q}-2, \mathrm{R}-1, \mathrm{~S}-3$
  3. $\mathrm{P}-1, \mathrm{Q}-4, \mathrm{R}-3, \mathrm{~S}-2$
  4. $\mathrm{P}-2, \mathrm{Q}-3, \mathrm{R}-1, \mathrm{~S}-4$

3 Answers

Best answer
9 9 votes

Answer is option $\boxed{B).\text{P-4, Q-2, R-1, S-3}}$

Immediate: Constant $(P\to 4)$

In Imm. Addressing mode the operand field of the instruction contains the actual data itself. 

Indirect :Pointer $(Q\to 2)$

Address field of the instruction points to a memory location which contains the effective address . This is similar to working of pointer. 

Base with index: Elements of an array $(R \to1)$

Base will hold the starting address of the array and index will tell us wihch element of the array we need. Both value can change here.  

Base with offset/displacement: Element of a record $(S\to 3)$

Here displacement would be a fixed value and Base will change. Like for example this is used to access linked list contents. where base acts as starting address of linked list node and displacement will  tell us which content of the Linked List to access. 

 

Good question to solve: https://gateoverflow.in/118291/gate-cse-2017-set-1-question-11

 

• edited by
Answer:
Position:
Show:

Related questions

12 12 votes
5 5 answers
1.9k
1.9k views
gatecse asked Feb 23
1,949 views
Consider a processor $\text{P}$ whose instruction set architecture is the load-store architecture. The instruction format is such that the first operand of any instructio...
9 9 votes
4 4 answers
1.6k
1.6k views
gatecse asked Feb 23
1,647 views
Which one of the following dependencies among the register operands of different instructions can cause a data hazard in a pipelined processor?Read-after-readRead-after-w...
12 12 votes
6 6 answers
1.6k
1.6k views
gatecse asked Feb 23
1,624 views
The size of the physical address space of a processor is $2^{32}$ bytes. The capacity of a cache memory unit is $2^{23}$ bytes. The cache block size is $128$ bytes. The c...
12 12 votes
3 3 answers
2.1k
2.1k views
gatecse asked Feb 23
2,092 views
Consider a system that has a cache memory unit and a memory management unit (MMU). The address input to the cache memory is a physical address. The MMU has a translation ...