0% found this document useful (0 votes)
50 views4 pages

Understanding Addressing Modes in Computing

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views4 pages

Understanding Addressing Modes in Computing

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

ADDRESSING MODES

Submitted by:

Name: T Naga Suresh


Regd. No: 23PA1A04G9
College: Vishnu Institute of Technology

1. Introduction
In computer architecture, an addressing mode defines the method by which the operand of an
instruction is specified. Every instruction requires data (operands) for execution, and the CPU
must know where to find these operands — either in memory, registers, or as immediate
values.

Hence, Addressing Modes provide flexibility in programming and help the processor to locate
the data or operands efficiently. The choice of addressing mode affects the speed, efficiency,
and size of the instruction.

The main purposes of addressing modes are:

 To provide different ways of accessing data.


 To simplify the instruction set.
 To support the use of variables, constants, and arrays efficiently.

2. Basic Concept of Addressing


An instruction generally consists of two parts:

1. Operation Code (Opcode): Specifies the operation to be performed.


2. Address Field: Specifies where the operand is located.

Addressing modes determine how this address field is interpreted.


Depending on the addressing mode, the operand may be:

 Present inside the instruction itself, or


 Stored in a memory location, or
 Stored in a processor register.
3. Types of Addressing Modes
There are several types of addressing modes commonly used in computer systems.

3.1 Immediate Addressing Mode

 The operand is given directly within the instruction itself.


 No memory reference is required to fetch the operand.

Example:
MOV A, #25 → Here, 25 is the immediate data loaded into register A.

Advantage: Fast execution because no memory access is required.


Disadvantage: Operand value is fixed; cannot be changed during program execution.

3.2 Direct Addressing Mode

 The address field of the instruction contains the actual memory address of the operand.
 The CPU directly accesses that memory location to fetch the operand.

Example:
MOV A, 2050 → Content of memory location 2050 is moved to A.

Advantage: Simple and easy to understand.


Disadvantage: Limited by the address field size; less flexible.

3.3 Indirect Addressing Mode

 The address field of the instruction contains the address of a memory location that holds
the actual address of the operand.
 This means two memory accesses are required — one to get the effective address, and
another to fetch the operand.

Example:
MOV A, @R0 → The register R0 contains the memory address where the operand is stored.

Advantage: Provides flexibility and allows dynamic data access.


Disadvantage: Slower because of extra memory access.
3.4 Register Addressing Mode

 The operand is stored in a register, and the instruction specifies the register name.
 No memory access is needed.

Example:
ADD A, B → Adds the content of register B to register A.

Advantage: Fastest mode of operation.


Disadvantage: Limited number of registers restricts flexibility.

3.5 Register Indirect Addressing Mode

 The instruction specifies a register that holds the memory address of the operand.
 The CPU uses the address from that register to fetch the operand from memory.

Example:
MOV A, (R1) → Move the data from the memory location pointed to by R1 into A.

Advantage: Useful for accessing arrays and tables.


Disadvantage: Slightly slower than register mode due to memory access.

3.6 Indexed Addressing Mode

 The effective address of the operand is obtained by adding a constant value (index) to
the contents of an index register.
 Used mainly in accessing elements of arrays and tables.

Example:
MOV A, 2000(X) → Effective address = 2000 + content of X.

Advantage: Supports easy array and loop processing.


Disadvantage: Slightly complex address calculation.

4. Comparison of Addressing Modes


Addressing Mode Operand Location Speed Use Case
Immediate Within instruction Fastest Constants
Direct Memory (fixed address) Moderate Simple data access
Addressing Mode Operand Location Speed Use Case
Indirect Memory (pointer) Slow Dynamic data access
Register CPU register Fastest Temporary data
Register Indirect Memory via register Moderate Arrays, tables
Indexed Base + offset Moderate Sequential data

5. Conclusion
Addressing modes play a vital role in defining how data is accessed during instruction
execution. Each mode offers a trade-off between speed, flexibility, and complexity.

Immediate and Register modes provide fast access, while Indirect and Indexed modes support
dynamic and structured data handling.
A proper understanding of addressing modes helps in writing efficient assembly programs and
designing advanced processor architectures.

Submitted by:
T Naga Suresh
Regd. No: 23PA1A04G9
Vishnu Institute of Technology

You might also like