The document provides an overview of various addressing modes in computer architecture, including immediate, direct, indirect, register, register indirect, relative, and indexed addressing. Each mode is explained with examples and their respective advantages and limitations regarding access speed and address space. The presentation also discusses auto increment and auto decrement modes as variations in addressing techniques.
LETS BEGAIN WITHAS EXAMPLE..
Suppose we have a two operands instruction
ADD X, Y
X in register
Y in memory
Then, after taking this particular example, we were in fact working out
the series of actions we must take
Next step is to look the various possible ways in which the operands can
be referred to. In other words, what we are talking about is the different
modes in which we can address the data.
That is, modes of addressing the data or referring to the data will usually
be called addressing modes
4.
DIFFERENT TYPES OFADDRESSING MODE?
Immediate Addressing
Direct Addressing
Indirect Addressing
Register Addressing
Register Indirect Addressing
Relative Addressing
Indexed Addressing
5.
IMMEDIATE ADDRESSING
Operand isgiven explicitly in the instruction
Operand = Value
e.g. ADD 5
Add 5 to contents of accumulator
5 is operand
No memory reference to fetch data
Fast
Limited range
Instruction
opcode operand
6.
DIRECT ADDRESSING
Address fieldcontains address of operand
Effective address (EA) = address field (A)
e.g. ADD A
Add contents of cell A to accumulator
Look in memory at address A for operand
Single memory reference to access data
No additional calculations to work out effective
address
Limited address space
INDIRECT ADDRESSING
Memory cellpointed to by address field contains
the address of (pointer to) the operand
EA = [A]
Look in A, find address (A) and look there for
operand
e.g. ADD (A)
Add contents of cell pointed to by contents of A to
accumulator
9.
INDIRECT ADDRESSING
Large addressspace
2n where n = word length
May be nested, multilevel, cascaded
e.g. EA = (((A)))
Draw the diagram yourself
Multiple memory accesses to find operand
Hence slower
REGISTER ADDRESSING
Operand isheld in register named in
address field
EA = R
Limited number of registers
Very small address field needed
Shorter instructions
Faster instruction fetch
12.
REGISTER ADDRESSING
No memoryaccess
Very fast execution
Very limited address space
Multiple registers helps performance
Requires good assembly programming or
compiler writing
REGISTER INDIRECT ADDRESSING
C.f.indirect addressing
EA = [R]
Operand is in memory cell pointed to by
contents of register R
Large address space (2n)
One fewer memory access than indirect
addressing
INDEX ADDRESSING
EA =X + [R]
Address field hold two values
X = constant value (offset)
R = register that holds address of memory
locations
or vice versa
(Offset given as constant or in the index register)
Add 20(R1),R2 or Add 1000(R1),R2
RELATIVE ADDRESSING
A versionof displacement addressing
R = Program counter, PC
EA = X + (PC)
i.e. get operand from X bytes away from
current location pointed to by PC
c.f locality of reference & cache usage
19.
AUTO INCREMENT MODE
Theeffective address of the operand is the
contents of a register specified in the
instruction.
After accessing the operand, the contents of
this register are automatically incremented to
point to the next item in the list
EA=[Ri]; Increment Ri ---- (Ri)+
Eg: Add (R2)+,R0
20.
AUTO DECREMENT MODE
Thecontents of a register specified in the
instruction are first automatically
decremented and are then used as the
effective address of the operand
Decrement Ri; EA= [Ri] ----- -(Ri)
#3 “Ant Colony Optimization (ACO) studies artificial systems that take inspiration from the behavior of real ant colonies and which are used to solve discrete optimization problems.”