The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
+5 votes

Addressing Mode.        




$1.$Register Addressing Mode


Register Direct AM

$\text{Add}   R_{1},R_{2}$ $R_{1}\leftarrow R_{1}+R_{2}$ Two General Purpose Register value is added. Operands stored in GPRs
$2.$Immediate Addressing Mode $\text{Add}   R_{1},$#$4$ $R_{1}\leftarrow R_{1}+4$ Register value is added with a constant term (operands are in instruction , no need of GPRs). Here we use Instruction Register(IR)
$3.$Displacement Addressing Mode $\text{Add }R_{4},100(R_{1})$ $R_{4}\leftarrow R_{4}+M[100+R_{1}]$ Register value is added by the memory location pointed by another register with 100 as displacement(This is alternatively a Indexed Addressing Mode)
$4.$Indexed $\text{Add} R_{3},(B,I)$

$i)R_{3}\leftarrow R_{3}+M[B+I]$


$ii)\text{Add} 20(R_{1}),R_{2}$

$R_{1}\leftarrow 1000$



$iii)\text{Add} 1000(R_{1}),R_{2}$

$R_{1}\leftarrow 20$

Register value is added to memory address from base address of array  with some displacement(which work like pointer) for specific index location.It can be use a set of GPR's or called Index Registers. Also it can be done with more than one registers, called Base Registers. like$(R_{I},R_{j})$ where Second register contains offset value of X(Refer Hamacher)
$5.$Direct or Absolute $\text{Add} R_{1},(R_{2})$ $R_{1}\leftarrow R_{1}+M[R_{2}]$ Register value is added with some memory location to get effective address
$6.$Indirect AM (or) Register Indirect AM $\text{Add} R_{1},[email protected]$(R_{3})$ $R_{1}\leftarrow R_{1}+M[M[R_{3}]]$ Register value is added with memory location, which is address of memory location of the operand
$7.$ Base Register Addressing Add BaseReg,Off   In this addressing mode Base register value added with offset value
$8.$ Implied Addressing $\text{Add} R_{1}, AC$ $R_{1}\leftarrow R_{1}+AC$ Accumulator value is added with register value to get effective address
$9.$Relative Addressing Mode PC,offset   Effective Address is calculated by adding Counter value with offset value,Here PC used as a Special Purpose Registers instead of General Purpose Registers
$10.$Auto Increment Addressing $\text{Add} R_{1},(R_{2})+$ $R_{1} \leftarrow R_{1} +M[R2]$
$R_{2} \leftarrow R_{2} + d$
$11.$Auto Decreasing Addressing Mode $\text{Add} R1,-(R2)$ $R_{2} \leftarrow R_{2}-d$ 
$R_{1} \leftarrow R_{1} + M[R2]$


I have tried to collect all addressing mode and how these mode works? Is my explanation correct for every addressing mode.Is any other addressing mode exists , which am I missing? Plz check


asked in CO and Architecture by Veteran (112k points)
edited by | 216 views

Is my explanation correct for every addressing mode


Is any other addressing mode exists , which am I missing?

There are two types of direct and indirect AM..

Register direct mode  , Memory direct mode

Register indirect mode, Memory indirect mode

is these for GATE? Can u explain
That i don't know but there is nothing much in it.. moreover the questions usually describe the operation of AMs because the syntax varies...

there is nothing like Memory indirect mode.


I nowhere got this mode

Base and Limit register 

Base and limit registers are special hardware registers. When a process is run, the base register is loaded with the physical location where the process begins in memory. The limit register is loaded with the length of the process. In other words, they define the logical address space.

In Tanenbaum’s book, an example shows both a base and limit register loaded with 16384. He follows up with a question asking if base and limit registers will always be loaded with the same value. It is an accident that these values are the same because base and limit registers won’t always be the same. In this case where they are both the same, the program starts at location 16384 in memory and has a length of 16384 indicating that the program occupies all space between 16384 and 32768. The limit register could have easily been 4096 indicating that the program occupies all space between 16384 and 20480.

Please log in or register to answer this question.

Related questions

+4 votes
0 answers
asked Jan 11, 2018 in CO and Architecture by thepeeyoosh Active (1.9k points) | 589 views
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
49,808 questions
54,481 answers
74,526 users