SlideShare a Scribd company logo
1 of 14
CS304PC:Computer Organization
and Architecture (R18 II(I sem))
Department of computer science and engineering
(AI/ML)
Session 13
by
Asst.Prof.M.Gokilavani
VITS
1/12/2023 Department of CSE (AI/ML) 1
TEXTBOOK:
• 1. Computer System Architecture – M. Moris Mano, Third Edition,
Pearson/PHI.
REFERENCES:
• Computer Organization – Car Hamacher, Zvonks Vranesic, Safea
Zaky, Vth Edition, McGraw Hill.
• Computer Organization and Architecture – William Stallings Sixth
Edition, Pearson/PHI.
• Structured Computer Organization – Andrew S. Tanenbaum, 4th
Edition, PHI/Pearson.
1/12/2023 Department of CSE (AI/ML) 2
Unit II
Microprogrammed Control: Control memory, Address sequencing,
micro program example, Design of Control unit .
Central Processing Unit : General Register Organization, Stack
organization, Instruction formats, Addressing modes, Data Transfer and
Manipulation, Program Control.
1/12/2023 Department of CSE (AI/ML) 3
Topics covered in session 13
1/12/2023 Department of CSE (AI/ML) 4
• General Register Organization
• Instruction formats
• Addressing modes
• Data Transfer and Manipulation
• Program Control.
Addressing modes
 The addressing mode specifies a rule for interpreting or modifying the address
field of the instruction before the operand is referenced.
 Computers use addressing mode techniques for the purpose of
accommodating one or both of the following provisions:
1. To give programming versatility to the user by providing such facilities as
pointers to memory, counters for loop control, indexing of data, and
program relocation.
2. To reduce the number of bits in the addressing field of the instruction.
 The control unit of a computer is designed to go through an instruction cycle
that is divided into three major phases:
1.Fetch the instruction from memory.
2.Decode the instruction.
3.Execute the instruction.
1/12/2023 Department of CSE (AI/ML) 5
Types of Address Modes
• Implied mode
• Immediate mode
• Register mode
• Autoincrement and Autodecrement mode
• Direct Address mode
• Indirect Address mode
• Relative address mode
• Indexing addressing mode
• Base register Addressing mode
1/12/2023 Department of CSE (AI/ML) 6
Types of Address Modes
i. Implied mode:
• In this mode the operands are specified implicitly in the definition of the
instruction. For example, the instruction "complement accumulator" is an
implied-mode instruction because the operand in the accumulator register is
implied in the definition of the instruction.
• In fact, all register reference instructions that use an accumulator are implied-
mode instructions.
• Zero address instructions in a stack-organized computer are implied-mode
instructions since the operands are implied to be on top of the stack.
1/12/2023 Department of CSE (AI/ML) 7
ii. Immediate mode: An immediate mode instruction has an operand
field rather than an address field.
• The operand field contains the actual operand to be used in
conjunction with the operation specified in the instruction.
• Immediate-mode instructions are useful for initializing registers to a
constant value.
iii. Register Mode: In this mode the operands are in registers that reside
within the CPU. The particular register is selected from a register field in the
instruction. A k - bit field can specify any one of 2^k registers.
• Register Indirect Mode: In this mode the instruction specifies a register in the
CPU whose contents give the address of the operand in memory.
• The advantage of a register indirect mode instruction is that the address
field of the instruction uses fewer bits to select a register than would have been
required to specify a memory address directly.
1/12/2023 Department of CSE (AI/ML) 8
iv. Autoincrement and Autodecrement: This is similar to the register
indirect mode except that the register is incremented or decremented after
(or before) its value is used to access memory.
• When the address stored in the register refers to a table of data in
memory, it is necessary to increment or decrement the register after every
access to the table.
• The address field of an instruction is used by the control unit in the CPU
to obtain the operand from memory.
• The effective address is defined to be the memory address obtained from
the computation dictated by the given addressing mode.
• The effective address is the address of the operand in a computational-
type instruction. It is the address where control branches in response to a
branch-type instruction.
1/12/2023 Department of CSE (AI/ML) 9
v. Direct Address mode: In this mode the effective address is equal to the
address part of the instruction.
• The operand resides in memory and its address is given directly by the
address field of the instruction.
• In a branch-type instruction the address field specifies the actual branch
address.
vi. Indirect address mode: In this mode the address field of the
instruction gives the address where the effective address is stored in
memory. Control fetches the instruction from memory and uses its address
part to access memory again to read the effective address.
• The effective address in these modes is obtained from the following
computation: effective address = address part of instruction + content of
CPU register.
1/12/2023 Department of CSE (AI/ML) 10
vii. Relative address mode: In this mode the content of the program counter
is added to the address part of the instruction in order to obtain the effective
address.
• The address part of the instruction is usually a signed number (in 2's
complement representation) which can be either positive or negative.
• When this number is added to the content of the program counter, the result
produces an effective address whose position in memory is relative to the
address of the next instruction.
• Example: Assume that the program counter contains the number 825, and
the address part of the instruction contains the number 24. The instruction at
location 825 is read from memory during the fetch phase and the program
counter is then incremented by one to 826. The effective address
computation for the relative address mode is 826 + 24 = 850.
1/12/2023 Department of CSE (AI/ML) 11
viii. Indexing addressing mode:
 In this mode the content of an index register is added to the address part of
the instruction to obtain the effective address.
 The index register is a special CPU register that contains an index value.
The address field of the instruction defines the beginning address of a data
array in memory.
 Each operand in the array is stored in memory relative to the beginning
address.
 The distance between the beginning address and the address of the
operand is the index value stored in the index register.
 Any operand in the array can be accessed with the same instruction
provided that the index register contains the correct index value. The
index register can be incremented to facilitate access to consecutive
operands.
1/12/2023 Department of CSE (AI/ML) 12
ix. Base Register addressing mode:
• In this mode the content of a base register is added to the address part of the
instruction to obtain the effective address.
• This is similar to the indexed addressing mode except that the register is now
called a base register instead of an index register. The difference between the
two modes is in the way they are used rather than in the way that they are
computed.
• An index register is assumed to hold an index number that is relative to the
address part of the instruction.
• A base register is assumed to hold a base address and the address field of the
instruction gives a displacement relative to this base address.
• With a base register, the displacement values of instructions do not have to
change. Only the value of the base register requires updating to reflect the
beginning of a new memory segment.
1/12/2023 Department of CSE (AI/ML) 13
Topics to be covered in next session 14
• Data transfer and Manipulation
1/12/2023 Department of CSE (AI/ML) 14
Thank you!!!

More Related Content

Similar to CS304PC:Computer Organization and Architecture Session 13 Addressing modes.pptx

Computer Organization and Design.pptx
Computer Organization and Design.pptxComputer Organization and Design.pptx
Computer Organization and Design.pptxSherinRappai
 
Addressing modes
Addressing modesAddressing modes
Addressing modesSelvi Suba
 
CS304PC:Computer Organization and Architecture Session 8 Address Sequencing.pptx
CS304PC:Computer Organization and Architecture Session 8 Address Sequencing.pptxCS304PC:Computer Organization and Architecture Session 8 Address Sequencing.pptx
CS304PC:Computer Organization and Architecture Session 8 Address Sequencing.pptxAsst.prof M.Gokilavani
 
Addressing Modes.pptx
Addressing Modes.pptxAddressing Modes.pptx
Addressing Modes.pptxssuser1f2c12
 
ADDRESSING MODES.pptx
ADDRESSING MODES.pptxADDRESSING MODES.pptx
ADDRESSING MODES.pptxKajalOberoi1
 
Addressing modes Breifly
Addressing modes BreiflyAddressing modes Breifly
Addressing modes BreiflyTahir Jalali
 
CS304PC:Computer Organization and Architecture Session 12 Instruction Format...
CS304PC:Computer Organization and Architecture  Session 12 Instruction Format...CS304PC:Computer Organization and Architecture  Session 12 Instruction Format...
CS304PC:Computer Organization and Architecture Session 12 Instruction Format...Asst.prof M.Gokilavani
 
Computer org Architecture module2 ppt.pdf
Computer org Architecture module2 ppt.pdfComputer org Architecture module2 ppt.pdf
Computer org Architecture module2 ppt.pdfTSANKARARAO
 
Процессорын архитектур
Процессорын архитектурПроцессорын архитектур
Процессорын архитектурMuuluu
 

Similar to CS304PC:Computer Organization and Architecture Session 13 Addressing modes.pptx (20)

Addressing Modes
Addressing ModesAddressing Modes
Addressing Modes
 
Computer Organization and Design.pptx
Computer Organization and Design.pptxComputer Organization and Design.pptx
Computer Organization and Design.pptx
 
Addressing modes
Addressing modesAddressing modes
Addressing modes
 
CS304PC:Computer Organization and Architecture Session 8 Address Sequencing.pptx
CS304PC:Computer Organization and Architecture Session 8 Address Sequencing.pptxCS304PC:Computer Organization and Architecture Session 8 Address Sequencing.pptx
CS304PC:Computer Organization and Architecture Session 8 Address Sequencing.pptx
 
Cache Memory.pptx
Cache Memory.pptxCache Memory.pptx
Cache Memory.pptx
 
Addressing Modes.pptx
Addressing Modes.pptxAddressing Modes.pptx
Addressing Modes.pptx
 
Instruction Codes.pptx
Instruction Codes.pptxInstruction Codes.pptx
Instruction Codes.pptx
 
ADDRESSING MODES.pptx
ADDRESSING MODES.pptxADDRESSING MODES.pptx
ADDRESSING MODES.pptx
 
Addressing modes Breifly
Addressing modes BreiflyAddressing modes Breifly
Addressing modes Breifly
 
ADDRESSING MODE
ADDRESSING MODEADDRESSING MODE
ADDRESSING MODE
 
Memory Addressing
Memory AddressingMemory Addressing
Memory Addressing
 
addressing modes
addressing modesaddressing modes
addressing modes
 
ADDRESSING MODES
ADDRESSING MODESADDRESSING MODES
ADDRESSING MODES
 
ADDRESSING MODES
ADDRESSING MODESADDRESSING MODES
ADDRESSING MODES
 
Cao
CaoCao
Cao
 
COA.pptx
COA.pptxCOA.pptx
COA.pptx
 
CS304PC:Computer Organization and Architecture Session 12 Instruction Format...
CS304PC:Computer Organization and Architecture  Session 12 Instruction Format...CS304PC:Computer Organization and Architecture  Session 12 Instruction Format...
CS304PC:Computer Organization and Architecture Session 12 Instruction Format...
 
Arithmetic & Logic Unit
Arithmetic & Logic UnitArithmetic & Logic Unit
Arithmetic & Logic Unit
 
Computer org Architecture module2 ppt.pdf
Computer org Architecture module2 ppt.pdfComputer org Architecture module2 ppt.pdf
Computer org Architecture module2 ppt.pdf
 
Процессорын архитектур
Процессорын архитектурПроцессорын архитектур
Процессорын архитектур
 

More from Asst.prof M.Gokilavani

CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfAsst.prof M.Gokilavani
 
IT8073_Information Security_UNIT I _.pdf
IT8073_Information Security_UNIT I _.pdfIT8073_Information Security_UNIT I _.pdf
IT8073_Information Security_UNIT I _.pdfAsst.prof M.Gokilavani
 
IT8073 _Information Security _UNIT I Full notes
IT8073 _Information Security _UNIT I Full notesIT8073 _Information Security _UNIT I Full notes
IT8073 _Information Security _UNIT I Full notesAsst.prof M.Gokilavani
 
GE3151 PSPP UNIT IV QUESTION BANK.docx.pdf
GE3151 PSPP UNIT IV QUESTION BANK.docx.pdfGE3151 PSPP UNIT IV QUESTION BANK.docx.pdf
GE3151 PSPP UNIT IV QUESTION BANK.docx.pdfAsst.prof M.Gokilavani
 
GE3151 PSPP UNIT III QUESTION BANK.docx.pdf
GE3151 PSPP UNIT III QUESTION BANK.docx.pdfGE3151 PSPP UNIT III QUESTION BANK.docx.pdf
GE3151 PSPP UNIT III QUESTION BANK.docx.pdfAsst.prof M.Gokilavani
 
GE3151 PSPP All unit question bank.pdf
GE3151 PSPP All unit question bank.pdfGE3151 PSPP All unit question bank.pdf
GE3151 PSPP All unit question bank.pdfAsst.prof M.Gokilavani
 
AI3391 Artificial intelligence Unit IV Notes _ merged.pdf
AI3391 Artificial intelligence Unit IV Notes _ merged.pdfAI3391 Artificial intelligence Unit IV Notes _ merged.pdf
AI3391 Artificial intelligence Unit IV Notes _ merged.pdfAsst.prof M.Gokilavani
 
AI3391 Artificial intelligence Session 29 Forward and backward chaining.pdf
AI3391 Artificial intelligence Session 29 Forward and backward chaining.pdfAI3391 Artificial intelligence Session 29 Forward and backward chaining.pdf
AI3391 Artificial intelligence Session 29 Forward and backward chaining.pdfAsst.prof M.Gokilavani
 
AI3391 Artificial intelligence Session 28 Resolution.pptx
AI3391 Artificial intelligence Session 28 Resolution.pptxAI3391 Artificial intelligence Session 28 Resolution.pptx
AI3391 Artificial intelligence Session 28 Resolution.pptxAsst.prof M.Gokilavani
 
AI3391 Artificial intelligence session 27 inference and unification.pptx
AI3391 Artificial intelligence session 27 inference and unification.pptxAI3391 Artificial intelligence session 27 inference and unification.pptx
AI3391 Artificial intelligence session 27 inference and unification.pptxAsst.prof M.Gokilavani
 
AI3391 Artificial Intelligence Session 26 First order logic.pptx
AI3391 Artificial Intelligence Session 26 First order logic.pptxAI3391 Artificial Intelligence Session 26 First order logic.pptx
AI3391 Artificial Intelligence Session 26 First order logic.pptxAsst.prof M.Gokilavani
 

More from Asst.prof M.Gokilavani (20)

CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
 
IT8073_Information Security_UNIT I _.pdf
IT8073_Information Security_UNIT I _.pdfIT8073_Information Security_UNIT I _.pdf
IT8073_Information Security_UNIT I _.pdf
 
IT8073 _Information Security _UNIT I Full notes
IT8073 _Information Security _UNIT I Full notesIT8073 _Information Security _UNIT I Full notes
IT8073 _Information Security _UNIT I Full notes
 
GE3151 PSPP UNIT IV QUESTION BANK.docx.pdf
GE3151 PSPP UNIT IV QUESTION BANK.docx.pdfGE3151 PSPP UNIT IV QUESTION BANK.docx.pdf
GE3151 PSPP UNIT IV QUESTION BANK.docx.pdf
 
GE3151 PSPP UNIT III QUESTION BANK.docx.pdf
GE3151 PSPP UNIT III QUESTION BANK.docx.pdfGE3151 PSPP UNIT III QUESTION BANK.docx.pdf
GE3151 PSPP UNIT III QUESTION BANK.docx.pdf
 
GE3151 UNIT II Study material .pdf
GE3151 UNIT II Study material .pdfGE3151 UNIT II Study material .pdf
GE3151 UNIT II Study material .pdf
 
GE3151 PSPP All unit question bank.pdf
GE3151 PSPP All unit question bank.pdfGE3151 PSPP All unit question bank.pdf
GE3151 PSPP All unit question bank.pdf
 
GE3151_PSPP_All unit _Notes
GE3151_PSPP_All unit _NotesGE3151_PSPP_All unit _Notes
GE3151_PSPP_All unit _Notes
 
GE3151_PSPP_UNIT_5_Notes
GE3151_PSPP_UNIT_5_NotesGE3151_PSPP_UNIT_5_Notes
GE3151_PSPP_UNIT_5_Notes
 
GE3151_PSPP_UNIT_4_Notes
GE3151_PSPP_UNIT_4_NotesGE3151_PSPP_UNIT_4_Notes
GE3151_PSPP_UNIT_4_Notes
 
GE3151_PSPP_UNIT_3_Notes
GE3151_PSPP_UNIT_3_NotesGE3151_PSPP_UNIT_3_Notes
GE3151_PSPP_UNIT_3_Notes
 
GE3151_PSPP_UNIT_2_Notes
GE3151_PSPP_UNIT_2_NotesGE3151_PSPP_UNIT_2_Notes
GE3151_PSPP_UNIT_2_Notes
 
AI3391 Artificial intelligence Unit IV Notes _ merged.pdf
AI3391 Artificial intelligence Unit IV Notes _ merged.pdfAI3391 Artificial intelligence Unit IV Notes _ merged.pdf
AI3391 Artificial intelligence Unit IV Notes _ merged.pdf
 
AI3391 Artificial intelligence Session 29 Forward and backward chaining.pdf
AI3391 Artificial intelligence Session 29 Forward and backward chaining.pdfAI3391 Artificial intelligence Session 29 Forward and backward chaining.pdf
AI3391 Artificial intelligence Session 29 Forward and backward chaining.pdf
 
AI3391 Artificial intelligence Session 28 Resolution.pptx
AI3391 Artificial intelligence Session 28 Resolution.pptxAI3391 Artificial intelligence Session 28 Resolution.pptx
AI3391 Artificial intelligence Session 28 Resolution.pptx
 
AI3391 Artificial intelligence session 27 inference and unification.pptx
AI3391 Artificial intelligence session 27 inference and unification.pptxAI3391 Artificial intelligence session 27 inference and unification.pptx
AI3391 Artificial intelligence session 27 inference and unification.pptx
 
AI3391 Artificial Intelligence Session 26 First order logic.pptx
AI3391 Artificial Intelligence Session 26 First order logic.pptxAI3391 Artificial Intelligence Session 26 First order logic.pptx
AI3391 Artificial Intelligence Session 26 First order logic.pptx
 

Recently uploaded

(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZTE
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAbhinavSharma374939
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 

Recently uploaded (20)

(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog Converter
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 

CS304PC:Computer Organization and Architecture Session 13 Addressing modes.pptx

  • 1. CS304PC:Computer Organization and Architecture (R18 II(I sem)) Department of computer science and engineering (AI/ML) Session 13 by Asst.Prof.M.Gokilavani VITS 1/12/2023 Department of CSE (AI/ML) 1
  • 2. TEXTBOOK: • 1. Computer System Architecture – M. Moris Mano, Third Edition, Pearson/PHI. REFERENCES: • Computer Organization – Car Hamacher, Zvonks Vranesic, Safea Zaky, Vth Edition, McGraw Hill. • Computer Organization and Architecture – William Stallings Sixth Edition, Pearson/PHI. • Structured Computer Organization – Andrew S. Tanenbaum, 4th Edition, PHI/Pearson. 1/12/2023 Department of CSE (AI/ML) 2
  • 3. Unit II Microprogrammed Control: Control memory, Address sequencing, micro program example, Design of Control unit . Central Processing Unit : General Register Organization, Stack organization, Instruction formats, Addressing modes, Data Transfer and Manipulation, Program Control. 1/12/2023 Department of CSE (AI/ML) 3
  • 4. Topics covered in session 13 1/12/2023 Department of CSE (AI/ML) 4 • General Register Organization • Instruction formats • Addressing modes • Data Transfer and Manipulation • Program Control.
  • 5. Addressing modes  The addressing mode specifies a rule for interpreting or modifying the address field of the instruction before the operand is referenced.  Computers use addressing mode techniques for the purpose of accommodating one or both of the following provisions: 1. To give programming versatility to the user by providing such facilities as pointers to memory, counters for loop control, indexing of data, and program relocation. 2. To reduce the number of bits in the addressing field of the instruction.  The control unit of a computer is designed to go through an instruction cycle that is divided into three major phases: 1.Fetch the instruction from memory. 2.Decode the instruction. 3.Execute the instruction. 1/12/2023 Department of CSE (AI/ML) 5
  • 6. Types of Address Modes • Implied mode • Immediate mode • Register mode • Autoincrement and Autodecrement mode • Direct Address mode • Indirect Address mode • Relative address mode • Indexing addressing mode • Base register Addressing mode 1/12/2023 Department of CSE (AI/ML) 6
  • 7. Types of Address Modes i. Implied mode: • In this mode the operands are specified implicitly in the definition of the instruction. For example, the instruction "complement accumulator" is an implied-mode instruction because the operand in the accumulator register is implied in the definition of the instruction. • In fact, all register reference instructions that use an accumulator are implied- mode instructions. • Zero address instructions in a stack-organized computer are implied-mode instructions since the operands are implied to be on top of the stack. 1/12/2023 Department of CSE (AI/ML) 7
  • 8. ii. Immediate mode: An immediate mode instruction has an operand field rather than an address field. • The operand field contains the actual operand to be used in conjunction with the operation specified in the instruction. • Immediate-mode instructions are useful for initializing registers to a constant value. iii. Register Mode: In this mode the operands are in registers that reside within the CPU. The particular register is selected from a register field in the instruction. A k - bit field can specify any one of 2^k registers. • Register Indirect Mode: In this mode the instruction specifies a register in the CPU whose contents give the address of the operand in memory. • The advantage of a register indirect mode instruction is that the address field of the instruction uses fewer bits to select a register than would have been required to specify a memory address directly. 1/12/2023 Department of CSE (AI/ML) 8
  • 9. iv. Autoincrement and Autodecrement: This is similar to the register indirect mode except that the register is incremented or decremented after (or before) its value is used to access memory. • When the address stored in the register refers to a table of data in memory, it is necessary to increment or decrement the register after every access to the table. • The address field of an instruction is used by the control unit in the CPU to obtain the operand from memory. • The effective address is defined to be the memory address obtained from the computation dictated by the given addressing mode. • The effective address is the address of the operand in a computational- type instruction. It is the address where control branches in response to a branch-type instruction. 1/12/2023 Department of CSE (AI/ML) 9
  • 10. v. Direct Address mode: In this mode the effective address is equal to the address part of the instruction. • The operand resides in memory and its address is given directly by the address field of the instruction. • In a branch-type instruction the address field specifies the actual branch address. vi. Indirect address mode: In this mode the address field of the instruction gives the address where the effective address is stored in memory. Control fetches the instruction from memory and uses its address part to access memory again to read the effective address. • The effective address in these modes is obtained from the following computation: effective address = address part of instruction + content of CPU register. 1/12/2023 Department of CSE (AI/ML) 10
  • 11. vii. Relative address mode: In this mode the content of the program counter is added to the address part of the instruction in order to obtain the effective address. • The address part of the instruction is usually a signed number (in 2's complement representation) which can be either positive or negative. • When this number is added to the content of the program counter, the result produces an effective address whose position in memory is relative to the address of the next instruction. • Example: Assume that the program counter contains the number 825, and the address part of the instruction contains the number 24. The instruction at location 825 is read from memory during the fetch phase and the program counter is then incremented by one to 826. The effective address computation for the relative address mode is 826 + 24 = 850. 1/12/2023 Department of CSE (AI/ML) 11
  • 12. viii. Indexing addressing mode:  In this mode the content of an index register is added to the address part of the instruction to obtain the effective address.  The index register is a special CPU register that contains an index value. The address field of the instruction defines the beginning address of a data array in memory.  Each operand in the array is stored in memory relative to the beginning address.  The distance between the beginning address and the address of the operand is the index value stored in the index register.  Any operand in the array can be accessed with the same instruction provided that the index register contains the correct index value. The index register can be incremented to facilitate access to consecutive operands. 1/12/2023 Department of CSE (AI/ML) 12
  • 13. ix. Base Register addressing mode: • In this mode the content of a base register is added to the address part of the instruction to obtain the effective address. • This is similar to the indexed addressing mode except that the register is now called a base register instead of an index register. The difference between the two modes is in the way they are used rather than in the way that they are computed. • An index register is assumed to hold an index number that is relative to the address part of the instruction. • A base register is assumed to hold a base address and the address field of the instruction gives a displacement relative to this base address. • With a base register, the displacement values of instructions do not have to change. Only the value of the base register requires updating to reflect the beginning of a new memory segment. 1/12/2023 Department of CSE (AI/ML) 13
  • 14. Topics to be covered in next session 14 • Data transfer and Manipulation 1/12/2023 Department of CSE (AI/ML) 14 Thank you!!!