A R U N A D E V I P .
A S S I S T A N T P R O F E S S O R , D E P T . O F C S
V . V . V A N N I A P E R U M A L C O L L E G E F O R W O M E N
Computer Organisation
Addressing Modes
Addressing Modes
 It specifies a rule for
 interpreting or modifying the address field of the
instruction before the operand is actually
referenced.
Purpose of Addressing Mode
• Give programmers the facility of using pointers,
counters and indexing of data.
• To reduce the number of bits in the addressing
field of the instruction.
Advantages of Addressing Modes
 It gives experienced programmers the flexibility of
writing assembly language
 Reduced no. of instruction
 Efficient execution time
Types of Addressing Mode
 Immediate
 Direct
 Indirect
 Register
 Register Indirect
 Displacement (Indexed)
Immediate Addressing
 Operand part of instruction itself.
 Address field of the instruction is specified by the
operand
 No memory reference
 Fast execution
 Ex. ADD 5
Diagram
 Instruction
OperandOpcode
Direct Addressing
 Address field contains 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
Direct Addressing
Indirect Addressing
 Memory cell pointed to by address field contains the
address of (pointer to) the operand
 Large address space
 Slower since multiple memory access needed
 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
Indirect Addressing
Address AOpcode
Memory
Operand
Pointer to operand
Register Addressing
 Operand is held in register named in address field
 Needs no Memory Reference
 Very fast Execution
 EA = R
 Limited number of registers
 Requires good Assembly Programming
 Very small address field needed
 Shorter instructions
 Faster instruction fetch
Register Addressing Diagram
Register Address ROpcode
Registers
Operand
Register Indirect Addressing
 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
Register Indirect Diagram
Register Address ROpcode
Instruction
Memory
OperandPointer to Operand
Registers
Conclusion
 All these addressing modes helps
programmer write efficient piece of code.
 Helps in better understanding of instruction
 Promotes faster instruction execution

Computer Organisation - Addressing Modes

  • 1.
    A R UN A D E V I P . A S S I S T A N T P R O F E S S O R , D E P T . O F C S V . V . V A N N I A P E R U M A L C O L L E G E F O R W O M E N Computer Organisation Addressing Modes
  • 2.
    Addressing Modes  Itspecifies a rule for  interpreting or modifying the address field of the instruction before the operand is actually referenced.
  • 3.
    Purpose of AddressingMode • Give programmers the facility of using pointers, counters and indexing of data. • To reduce the number of bits in the addressing field of the instruction.
  • 4.
    Advantages of AddressingModes  It gives experienced programmers the flexibility of writing assembly language  Reduced no. of instruction  Efficient execution time
  • 5.
    Types of AddressingMode  Immediate  Direct  Indirect  Register  Register Indirect  Displacement (Indexed)
  • 6.
    Immediate Addressing  Operandpart of instruction itself.  Address field of the instruction is specified by the operand  No memory reference  Fast execution  Ex. ADD 5
  • 7.
  • 8.
    Direct Addressing  Addressfield contains 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
  • 9.
  • 10.
    Indirect Addressing  Memorycell pointed to by address field contains the address of (pointer to) the operand  Large address space  Slower since multiple memory access needed  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
  • 11.
  • 12.
    Register Addressing  Operandis held in register named in address field  Needs no Memory Reference  Very fast Execution  EA = R  Limited number of registers  Requires good Assembly Programming  Very small address field needed  Shorter instructions  Faster instruction fetch
  • 13.
    Register Addressing Diagram RegisterAddress ROpcode Registers Operand
  • 14.
    Register Indirect Addressing 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
  • 15.
    Register Indirect Diagram RegisterAddress ROpcode Instruction Memory OperandPointer to Operand Registers
  • 16.
    Conclusion  All theseaddressing modes helps programmer write efficient piece of code.  Helps in better understanding of instruction  Promotes faster instruction execution