You are on page 1of 14

B.

Tech, CSE IV Sem, II Year

CS 404: Computer Org. & Architecture


Activity I

Direct & Indirect Addressing Mode

Mr. Arun Agrawal


Prof. ,Department Of Computer Science & Engineering
CS403 1
Team Members
NAME ROLL NO

Ram Kumar Singh Bhadoriya 0905CS211136


Ram Pratap Singh Tomar 0905CS211137
Raman Thakur 0905CS211138
Reetu Singh 0905CS211139

CS403 2
Outlines

• What is addressing mode


• Direct addressing mode
• Advantages, disadvantages & use of direct addressing mode
• In-direct addressing mode
• Advantages, disadvantages & use of in-direct addressing mode
• References
• Thank you

CS403
1
What is addressing mode ?
The term addressing modes refers to the way in which the operand of an
instruction is specified. The addressing mode specifies a rule for interpreting or
modifying the address field of the instruction before the operand is actually
executed.

Instruction Format
Different types of Addressing Modes
• Implied Mode
• Immediate Mode
• Register Mode
• Register Indirect Mode
• Auto decrement Mode
• Auto increment Mode
• Direct Address Mode
• Indirect Address Mode
• Indexed Addressing Mode

CS403 5
Direct addressing mode

The Direct addressing mode is one that contains the actual address of the data. It is
so called because the operand field directly specifies the memory location where the
data is residing. In the direct addressing mode, the address is first read through
instruction and then the data is read. The direct addressing mode is also known as
the absolute addressing mode.
Direct addressing mode
Diagram

CS403 7
Advantages, disadvantages & use of direct
addressing mode

Advantage
Simple since no computation of is required, we are directly getting the address
of the data.
Disadvantage
If the instruction’s size is fixed then the size of addresses can’t exceed the
given limit.
Use
For accessing the variables since they are mostly stored in the memory.

8
In-direct addressing mode

The Indirect addressing mode is one in which the address field contains the
effective address of the memory location where the actual data is present.
Therefore, a dual memory reference is needed to access the data in indirect
addressing mode. This will increase the extra calculation to fetch the actual data.

CS403 9
In-direct addressing mode

Diagram

10
In-direct addressing mode

The indirect addressing mode may be further classified into two categories,
namely, memory indirect addressing mode and register indirect addressing
mode

Register Indirect : In this mode effective address is in the register, and


corresponding register name will be maintained in the address field of an
instruction.
Here one register reference ,one memory reference is required to access the data.

Memory Indirect : In this mode effective address is in the memory, and


corresponding memory address will be maintained in the address field of an
instruction.
Here two memory reference is required to access the data.

11
Advantages, disadvantages & use of In-direct
addressing mode

Advantages
In register indirect addressing mode is useful if a series of data is to be
assigned to that address, with the help of this quality the number of
instructions decreases as a result of which performance increases.
Disadvantage
More computation is required since to access the data one has to go through
two addresses.
Use
For implementation of pointers and for data passing.

12
References

1. Educational videos of Gate Smashers.

2. Geeks for Geeks.

3. Class notes.

13
14

You might also like