0% found this document useful (0 votes)
11 views11 pages

COA Report

Uploaded by

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

COA Report

Uploaded by

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

DAYANANDA SAGAR ACADEMY OF TECHNOLOGY & MANAGEMENT

(An Autonomous Institute under VTU, Belagavi)

DEPARTMENT OF ELECTRONICS AND COMMUNICATION

2024-25

COMPUTER ORGANIZATION AND ARCHITECHTURE (23CECE35)

Continuous Comprehensive Assessment – 1

TOPIC : Addressing Modes

Pedagogy : Quiz using Mentimeter

Submitted By:

Harshitha S.R (1DT23EC031)

Harshavardha (1DT23EC032)

Hemanth Kumar (1DT23EC033)

Hrishikesh (1DT23EC034)

SUBMITED TO:
DR SUMAIYAMN
Asst. Prof, Dept. of
E&CE,DSATM,
Bengaluru
ADDRESSING MODES

INTRODUCTION:
The various formats of representing operand in an instruction or location of an operand is
called as
“Addressing Mode”. The different types of Addressing Modes are
a) Register Addressing
b) Direct Addressing
c) Immediate Addressing
d) Indirect Addressing
e) Index Addressing
f) Relative Addressing
g) Auto Increment Addressing
h) Auto Decrement Addressing

a) Register Addressing:
In this mode operands are stored in the registers of CPU. The name of the register is directly
specified in the instruction.

Ex: MOVE R1, R2

Where R1 and R2 are the Source and Destination registers respectively. This instruction
transfers 32 bits of
data from R1 register into R2 register. This instruction does not refer memory
for operands. The operands are directly available in the registers.
b) Direct Addressing:
It is also called as Absolute Addressing Mode. In this addressing mode operands are stored in
the
memory locations. The name of the memory location is directly specified in the instruction.

Ex: MOVE LOCA, R1:

Where LOCA is the memory location and R1 is the Register.


This instruction transfers 32 bits of data from memory location X into the General Purpose

c) Immediate Addressing:
In this Addressing Mode operands are directly specified in the instruction. The source field is
used to
represent the operands. The operands are represented by # (hash) sign
Ex: MOVE #23, R0

d) Indirect Addressing:
In this Addressing Mode effective address of an operand is stored in the memory location or
General Purpose Register. The memory locations or GPRS are used as the memory pointer.
Ex: ADD(R20),R0
Memory pointer: It stores the address of the memory location.
There are two types Indirect Addressing
i. Indirect through GPRS
ii. Indirect through memory location

e) Index Addressing Mode


In this addressing mode, the effective address of an operand is computed by adding constant
value with
the contents of Index Register and any one of the General Purpose Register namely R0 to Rn-
1 can be used as the Index Register. The constant value is directly specified in the instruction.
Ex = X +(Ri)
Example:
X (Ri , Rj) Where X is the constant value and RI and RJ are the General Purpose Registers
used to store the addresses of the operands. It can be represented as
EA = (Ri) + (Rj) + X
f) Relative Addressing Mode:
In this Addressing Mode EA of an operand is computed by the Index Addressing Mode. This
Addressing Mode uses PC (Program Counter) to store the EA of the next instruction instead
of GPR.
The symbolic representation of this mode is X (PC).
Ex= X + (PC).
This Addressing Mode is useful to calculate the EA of the target memory location

g) Auto Increment Addressing Mode:


In this Addressing Mode, EA of an operand is stored in the one of the GPRsof the CPU.
ThisAddressing Mode increment the contents of memory register by 4 memory locations
after operand access.
The symbolic representation is(RI)+ Where Ri is the one of the GPR.
Ex: MOVE (R1) +, R2
This instruction transfer’s data from the memory location whose address is stored in R1
into R3 register.

h) Auto Decrement Addressing Mode:


In this Addressing mode, EA of an operand is stored in the one of the GPRsof the CPU. This
Addressing Mode decrements the contents of memory register by 4 memory locations and
then
transfers the data to destination.
The symbolic representation is
-(RI) Where Ri is the one of the GPR.
Ex: MOVE - (R1), R2
This instruction first decrements the contents of R1 by 4 memory locations and
then transfer’s data.
PEDAGOGY : QUIZ USING MENTIMETER

1. What is an addressing mode in computer architecture?


a) A method of storing instructions
b) A way to represent operands or their locations in an instruction
c) A type of memory management
d) None of the above

Answer: b) A way to represent operands or their locations in an instruction

2. In which addressing mode are operands stored directly in CPU registers?


a) Immediate Addressing
b) Direct Addressing
c) Register Addressing
d) Indirect Addressing

Answer: c) Register Addressing

3. Which of the following is an example of Immediate Addressing Mode?


a) MOVE R1, R2
b) MOVE LOCA, R1
c) MOVE #23, R0
d) ADD (R1), R0

Answer: c) MOVE #23, R0

4. What does Auto Increment Addressing Mode do after accessing an operand?


a) Decrements the register by 4
b) Leaves the register unchanged
c) Increments the register by 4
d) Clears the register

Answer: c) Increments the register by 4

5. What is the purpose of the EQU directive?


a) To allocate memory
b) To terminate a program
c) To assign a numerical value to a symbolic name
d) To load an operand into a register

Answer: c) To assign a numerical value to a symbolic name

6. Which directive is used to assign starting addresses for instructions or operands?


a) EQU
b) ORIGIN (ORG)
c) END
d) DATA WORD

Answer: b) ORIGIN (ORG


7. What principle does a stack operate on?
a) FIFO (First In First Out)
b) LIFO (Last In First Out)
c) FILO (First In Last Out)
d) None of the above

Answer: b) LIFO (Last In First Out)

8. Which instruction is used for a PUSH operation in a stack?


a) MOV (SP), ITEM
b) MOV NEWITEM, (SP)
c) ADD #4, SP
d) SUBTRACT #4, SP

Answer: b) MOV NEWITEM, (SP)

9. Where is the ASCII value of a character pressed on the keyboard stored?


a) DATAOUT register
b) Processor register
c) DATAIN register
d) Memory location

Answer: c) DATAIN register

10. What is the format of a multiplication instruction in assembly language?


a) opcode destination, source operand
b) opcode source operand, destination operand
c) destination operand, source operand
d) opcode operand

Answer: b) opcode source operand, destination operand

11. Which logical instruction is used to complement binary bits?


a) OR
b) AND
c) NOT
d) XOR

Answer: c) NOT

12. What fills the vacant positions on the right during a Logical Shift Left operation?
a) Ones
b) Zeros
c) Carry bits
d) Previous values

Answer: b) Zeros

13. What happens during a Rotate Right with Carry operation?


a) Most Significant Bit is transferred to the Least Significant Bit
b) Least Significant Bit is transferred to carry and then to the Most Significant Bit
c) All bits are shifted to the left
d) Zeros are filled in the vacant positions

Answer: b) Least Significant Bit is transferred to carry and then to the Most Significant Bit

14. What is a subroutine in programming?


a) A loop within a program
b) A small task performed by the CPU
c) A function that performs a specific task and can be reused
d) A method for memory allocation

Answer: c) A function that performs a specific task and can be reused

15. What does the instruction CALL LISTADD do?


a) Adds two numbers
b) Terminates the program
c) Calls the subroutine LISTADD
d) Moves data to the accumulator

Answer: c) Calls the subroutine list add


Conclusion:
Addressing modes in computer architecture play a crucial role in defining how operands are
accessed during instruction execution. Here’s a concise conclusion:
1. Flexibility in Operand Access: Addressing modes provide various ways to specify operands,
enhancing flexibility in programming and hardware design.

2. Efficiency: They optimize code size and execution speed by enabling direct, indirect, or
indexed data access, depending on the situation.

3. Support for Complex Operations: Complex data structures like arrays, pointers, and tables
are efficiently handled using specific addressing modes such as indexed or base-relative.

4. Adaptability: Addressing modes cater to different computational needs, from simple


arithmetic operations to complex memory management.

5. Enhanced Programming Capability: They reduce programmer effort by offering versatile


instruction formats tailored to various applications.

In conclusion, addressing modes are foundational to processor functionality, enabling


efficient and diverse ways to interact with memory and registers, ultimately improving
computational performance and programming simplicity.

You might also like