













Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
computer science architecture and organization
Typology: Exams
1 / 21
This page cannot be seen from the preview
Don't miss anything!














Mohammad Asif Iqbal Assistant Professor, Deptt of ECE, JETGI, Barabanki
ADRESSING MODES
DIFFERENT TYPES OF ADDRESSING MODE? Immediate Addressing Direct Addressing Indirect Addressing Register Addressing Register Indirect Addressing Relative Addressing Indexed Addressing
IMMEDIATE ADDRESSING Operand is given 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
DIRECT ADDRESSING DIAGRAM
INDIRECT ADDRESSING Memory cell pointed 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
INDIRECT ADDRESSING DIAGRAM
REGISTER ADDRESSING Operand is held in register named in address field EA = R Limited number of registers Very small address field needed Shorter instructions Faster instruction fetch
REGISTER ADDRESSING DIAGRAM
REGISTER INDIRECT ADDRESSING C.f. indirect addressing EA = [R] Operand is in memory cell pointed to by contents of register R Large address space ( 2 n) 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 (R 1 ),R 2 or Add 1000 (R 1 ),R 2
INDEX ADDRESSING DIAGRAM
AUTO INCREMENT MODE The effective 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 (R 2 )+,R 0
AUTO DECREMENT MODE The contents 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)