SlideShare una empresa de Scribd logo
1 de 25
TOPICS:-
Instruction and Instruction Sequencing
  •Register Transfer Notation(RTN)
  •Assembly Language Notation(APN)
  •Basic instruction type
  •Instruction execution & straight line sequencing
  •Branching
  •Condition codes
  •Generating memory address
Addressing   modes
  •Types  of addressing modes
  •Implementation of variables and constants
  •Indirection and pointer
  •Indexing and array
  •Relative addressing
  •Additional modes
Computer   program consist of sequence of small steps,
such as adding two numbers, testing for a particular
condition , reading a character from the keyword

Four   types of operation.

1)   Data transfers between the memory and the
     processor registers.
2)   Arithmetic and logical operations on data.
3)   Program sequencing and control.
4)   I/O Transfers
•Transfer of information from one location in the
computer to another.
•Possible locations that may be involved in such transfers
are memory locations, processor registers and registers
in the I/O subsystem.
•Example –

•   Add the contents of the register R1 and R2 and then
places their sum into register R3.
              R3[R1]+[R2]
   Right side denoted the value.
   Left side denoted the name of the location where the
value is to be placed.
•It   represent machine instructions and program.

•For   this, we use assembly language format.

•Example   :-
  1)     Move LOC ,R1
• The contents of LOC are unchanged by the execution of
this instruction but the old contents of register R1 are
overwritten.

2)        Add R1,R2,R3
Three types of basic instruction:-
1) 3 –Address instruction:-
       • Add A,B,C
       • A &B are called Source operands.
       • C is called Destination operand.
                  Operation Source1,Source2,Destination


         • 3-address instruction is too large to fit
           in one word for a reasonable word
           length.
2) 2-Address Instruction:-
        • Add A,B
        • [B][A]+[B]
        • A is source operand and B is destination
           operand
                 Operation Source, Destination



        •   A single 2-address instruction cannot be
            used to solve original problem A and B ,
            without destroying either of them ,and to
            place the sum in location C.
        •   Move B,C
                C[B]
3) 1-Adress Instruction:-
        • Add A
        • Accumulator[A]+Accumulator
                 Operation Destination


       •   Using 1-address instructions , the operation
           [C][A]+[B] can be performed by execution
           the sequence the instruction:-
       •      Load A
       •      Add B
       •      Store C
•Executing   a given instruction is a two-phase procedure:-

• 1) Instruction fetch:-
•Instruction fetched from the main memory location whose
address in the PC.
•This instruction placed in the IR in the processor.



•2)Instruction execute:-
•The instruction in IR is examined to determine which
operation is to be performed.
•The specified operation is performed by processor.

•Perform arithmetic and logic operation.

•Store the result in destination location.
•PC holds the address of the instruction to be execute
next.

•The   address of 1st instruction placed into PC, then

•The processor control circuits use the information in the
PC to fetch and execute instruction ,one at a time , in the
order of increasing addresses . It is called straight line
sequencing.

•During  each instruction PC incremented by 4 to point to
the next instruction
• It is loads a new value into the PC.
•Processor fetch and executes the instruction at the new
address , called branch target.
•It follows the branch instruction in sequential address
order .
•A conditional branch instruction causes a branch only if
a specified condition is satisfied.
•If the condition is not specified ,the PC is incremented.

•And the next instruction in sequential order is fetched
and executed.
•         Branch>0 LOOP
•The processor keep the track of information about the
result of various operation for use by subsequent
conditional branch instructions.

•This  is accomplished by recording the required
information in individual bits, often called condition code
flags.

•These  flags are usually grouped together in a special
processor register called condition code register or status
register.
•Four commonly used flags are:-
•N(negative):-Set to 1 if the result is negative; otherwise
cleared to 0

•Z(zero):-Set   to 1 if the result is 0;othrrwise cleared to 0

•V(overflow):-Setto 1 if the arithmetic overflow occurs ;
otherwise cleared to 0

•C(carry):-Setto 1 if a carry-out results from the
operation ; otherwise cleared to 0
•The N and Z flags are affected by instructions that
transfer data such as Move ,Load , or Store.

•TheInstruction Branch>0 tests one or more condition
codes.

•Insome computers ,the condition code flags are affected
automatically by instruction that perform arithmetic or
logic operation
•Theinstruction set of a computer typically provides a
number of such method, called addressing modes.
•Types of addressing modes:-        EA=effective address
        Name                  Assembler syntax   Addressing function
        Immediate             # value            Operand=value
        Register              Ri                 EA=Ri
        Absolute(Direct)      LOC                EA=LOC
        Indirect              (Ri) , (LOC)       EA=[Ri] ,EA=[LOC]
        Index                 X(Ri)              EA=[Ri]+X
        Base with Index       (Ri,Rj)            EA=[Ri]+[Rj]
        Base with Index and   X(Ri,Rj)           EA=[Ri]+[Rj]+X
        offset
        Relative              X(PC)              EA=[PC]+X
        Auto increment        (Ri+)              EA=[Ri] ;Increment Ri
        Auto decrement        -(Ri)              Decrement Ri
                                                 EA=[Ri];
•A  variable is represented by allocating a register or a
memory location to hold its value.
•Two addressing modes to access variables:-

   1) Register mode:-The operand is the contents of a
processor register .
•Operand is held in register named in address file

•EA = R

•Limited number of registers

•Very small address field needed

                     Shorter instructions
                     Faster instruction fetch
•Move   LOC,R1
2) Absolute mode:-

•The    operand is in a memory location.

•The address of this location is given explicitly in the
instruction .

•It   is also called Direct mode.

•Declaration    such as
•            Integer A,B
Address and data constants can be represented in
assembly level language using Immediate mode

•Immediate     mode:- The operand is given explicitly in the
instruction.

•Example   –    Move 200immediate ,Ro

•The common convention is to be used the sharp sign(#)
in front of the value of the use as in immediate operand.
•             Move #200, Ro
•The register or memory location that contains the
address of an operand is called a pointer.
•Indirection is the ability to reference something using a
name, reference, or container instead of the value itself.

•The most common form of indirection is the act of
manipulating a value through its memory address.

•For example, accessing a variable through the use of a
pointer.

•Indirection
           and use of pointers are important and
powerful concepts in programming.
•Indirectmode:-
• The effective address of the operand is the contents of
register or memory location whose address appears in
the instruction.

•Memory  cell pointed to by address field contains the
address of (pointer to) the operand.

•e.g.  ADD (A)
        Add contents of cell pointed to by contents of A
                     to accumulator
• Add (R2),R1
•Indexing provide the different kind of flexibility for
accessing operands.

•It   is useful in dealing with lists and array.

•IndexMode:-
•The effective address of the operand is generated by
adding a constant value to the contents of a register.
•The  register used may be special register provided for
this purpose or general –purpose register called index
register.
• X(Ri)



•   EA=X+[Ri]

•Where  X denoted the constant value contained in the
instruction,
•And Ri is the name of the register involved.
•Relative Mode:-
•The effective address is determined by the index mode using
the PC in the place of general purpose register Ri.

•           EA=[Ri]+PC
•i.e. get operand from Ri cells from current location pointed to
by PC
•The mode can be used access data operands.

•Most common used in to specify the target address in branch
instruction.
•          Branch>0 LOOP
•   Auto increment mode:- (Ri)+
•   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.

•   Auto Decrement mode:- -(Ri)
•   The contents of a register specified in the instruction are
    first automatically decremented.
•   After that used as the effective address of the operand.
Instruction Sequencing & Addressing Modes

Más contenido relacionado

La actualidad más candente

Memory organization (Computer architecture)
Memory organization (Computer architecture)Memory organization (Computer architecture)
Memory organization (Computer architecture)Sandesh Jonchhe
 
Input Output Organization
Input Output OrganizationInput Output Organization
Input Output OrganizationKamal Acharya
 
Instruction Formats
Instruction FormatsInstruction Formats
Instruction FormatsRaaviKapoor
 
Computer registers
Computer registersComputer registers
Computer registersDeepikaT13
 
Instruction set and instruction execution cycle
Instruction set and instruction execution cycleInstruction set and instruction execution cycle
Instruction set and instruction execution cycleMkaur01
 
Computer Organization and Architecture.
Computer Organization and Architecture.Computer Organization and Architecture.
Computer Organization and Architecture.CS_GDRCST
 
Computer architecture input output organization
Computer architecture input output organizationComputer architecture input output organization
Computer architecture input output organizationMazin Alwaaly
 
Superscalar processor
Superscalar processorSuperscalar processor
Superscalar processornoor ul ain
 
Computer Organisation & Architecture (chapter 1)
Computer Organisation & Architecture (chapter 1) Computer Organisation & Architecture (chapter 1)
Computer Organisation & Architecture (chapter 1) Subhasis Dash
 
Computer instruction
Computer instructionComputer instruction
Computer instructionSanjeev Patel
 
General register organization (computer organization)
General register organization  (computer organization)General register organization  (computer organization)
General register organization (computer organization)rishi ram khanal
 
Fetch decode-execute presentation
Fetch decode-execute presentationFetch decode-execute presentation
Fetch decode-execute presentationchantellemallia
 
Computer Organisation - Addressing Modes
Computer Organisation - Addressing ModesComputer Organisation - Addressing Modes
Computer Organisation - Addressing ModesArunaDevi63
 
Addressing Modes
Addressing ModesAddressing Modes
Addressing ModesMayank Garg
 
Computer architecture pipelining
Computer architecture pipeliningComputer architecture pipelining
Computer architecture pipeliningMazin Alwaaly
 

La actualidad más candente (20)

Memory Addressing
Memory AddressingMemory Addressing
Memory Addressing
 
Memory organization (Computer architecture)
Memory organization (Computer architecture)Memory organization (Computer architecture)
Memory organization (Computer architecture)
 
Input Output Organization
Input Output OrganizationInput Output Organization
Input Output Organization
 
Instruction Formats
Instruction FormatsInstruction Formats
Instruction Formats
 
Computer registers
Computer registersComputer registers
Computer registers
 
Instruction set and instruction execution cycle
Instruction set and instruction execution cycleInstruction set and instruction execution cycle
Instruction set and instruction execution cycle
 
Computer Organization and Architecture.
Computer Organization and Architecture.Computer Organization and Architecture.
Computer Organization and Architecture.
 
Computer architecture input output organization
Computer architecture input output organizationComputer architecture input output organization
Computer architecture input output organization
 
Superscalar processor
Superscalar processorSuperscalar processor
Superscalar processor
 
Computer Organisation & Architecture (chapter 1)
Computer Organisation & Architecture (chapter 1) Computer Organisation & Architecture (chapter 1)
Computer Organisation & Architecture (chapter 1)
 
Computer instruction
Computer instructionComputer instruction
Computer instruction
 
General register organization (computer organization)
General register organization  (computer organization)General register organization  (computer organization)
General register organization (computer organization)
 
Fetch decode-execute presentation
Fetch decode-execute presentationFetch decode-execute presentation
Fetch decode-execute presentation
 
Parallel processing
Parallel processingParallel processing
Parallel processing
 
Computer Organisation - Addressing Modes
Computer Organisation - Addressing ModesComputer Organisation - Addressing Modes
Computer Organisation - Addressing Modes
 
Addressing Modes
Addressing ModesAddressing Modes
Addressing Modes
 
Computer architecture pipelining
Computer architecture pipeliningComputer architecture pipelining
Computer architecture pipelining
 
Memory hierarchy
Memory hierarchyMemory hierarchy
Memory hierarchy
 
Basic Computer Organization and Design
Basic  Computer  Organization  and  DesignBasic  Computer  Organization  and  Design
Basic Computer Organization and Design
 
Bus aribration
Bus aribrationBus aribration
Bus aribration
 

Similar a Instruction Sequencing & Addressing Modes

Lec3 instructions branch carl hamcher
Lec3 instructions branch carl hamcher Lec3 instructions branch carl hamcher
Lec3 instructions branch carl hamcher Venkata Krishnakanth P
 
Program execution, straight line sequence and branching
Program execution, straight line sequence and branchingProgram execution, straight line sequence and branching
Program execution, straight line sequence and branchingJyotiprakashMishra18
 
LU3- 4 Instructions and Sequencing.pptx
LU3- 4 Instructions and Sequencing.pptxLU3- 4 Instructions and Sequencing.pptx
LU3- 4 Instructions and Sequencing.pptxAKumaraGuru
 
11 instruction sets addressing modes
11  instruction sets addressing modes 11  instruction sets addressing modes
11 instruction sets addressing modes Sher Shah Merkhel
 
11 instruction sets addressing modes
11  instruction sets addressing modes 11  instruction sets addressing modes
11 instruction sets addressing modes Kanika Thakur
 
11 instruction sets addressing modes
11  instruction sets addressing modes 11  instruction sets addressing modes
11 instruction sets addressing modes Seshu Chakravarthy
 
11 instruction sets addressing modes
11  instruction sets addressing modes 11  instruction sets addressing modes
11 instruction sets addressing modes Anwal Mirza
 
11 instruction sets addressing modes
11  instruction sets addressing modes 11  instruction sets addressing modes
11 instruction sets addressing modes Wasif Naeem
 
11_ Instruction Sets addressing modes .ppt
11_ Instruction Sets addressing modes .ppt11_ Instruction Sets addressing modes .ppt
11_ Instruction Sets addressing modes .pptSwarajKumarPradhan
 
11_ Instruction Sets addressing modes -1.ppt
11_ Instruction Sets addressing modes -1.ppt11_ Instruction Sets addressing modes -1.ppt
11_ Instruction Sets addressing modes -1.pptSuchikage
 
11 instruction sets addressing modes
11  instruction sets addressing modes 11  instruction sets addressing modes
11 instruction sets addressing modes dilip kumar
 
Computer Architecture and organization ppt.
Computer Architecture and organization ppt.Computer Architecture and organization ppt.
Computer Architecture and organization ppt.mali yogesh kumar
 
Ch13- Inst Addressing Modes & Formats.pdf
Ch13- Inst Addressing Modes & Formats.pdfCh13- Inst Addressing Modes & Formats.pdf
Ch13- Inst Addressing Modes & Formats.pdfsaimawarsi
 
instruction sets (1).pptx
instruction sets (1).pptxinstruction sets (1).pptx
instruction sets (1).pptxAmanMomin9
 

Similar a Instruction Sequencing & Addressing Modes (20)

Lec3 instructions branch carl hamcher
Lec3 instructions branch carl hamcher Lec3 instructions branch carl hamcher
Lec3 instructions branch carl hamcher
 
Program execution, straight line sequence and branching
Program execution, straight line sequence and branchingProgram execution, straight line sequence and branching
Program execution, straight line sequence and branching
 
LU3- 4 Instructions and Sequencing.pptx
LU3- 4 Instructions and Sequencing.pptxLU3- 4 Instructions and Sequencing.pptx
LU3- 4 Instructions and Sequencing.pptx
 
11 instruction sets addressing modes
11  instruction sets addressing modes 11  instruction sets addressing modes
11 instruction sets addressing modes
 
11 instruction sets addressing modes
11  instruction sets addressing modes 11  instruction sets addressing modes
11 instruction sets addressing modes
 
Anshika 1111.pptx
Anshika 1111.pptxAnshika 1111.pptx
Anshika 1111.pptx
 
11 instruction sets addressing modes
11  instruction sets addressing modes 11  instruction sets addressing modes
11 instruction sets addressing modes
 
11 instruction sets addressing modes
11  instruction sets addressing modes 11  instruction sets addressing modes
11 instruction sets addressing modes
 
11 instruction sets addressing modes
11  instruction sets addressing modes 11  instruction sets addressing modes
11 instruction sets addressing modes
 
11_ Instruction Sets addressing modes .ppt
11_ Instruction Sets addressing modes .ppt11_ Instruction Sets addressing modes .ppt
11_ Instruction Sets addressing modes .ppt
 
11_ Instruction Sets addressing modes -1.ppt
11_ Instruction Sets addressing modes -1.ppt11_ Instruction Sets addressing modes -1.ppt
11_ Instruction Sets addressing modes -1.ppt
 
CO_Chapter2.ppt
CO_Chapter2.pptCO_Chapter2.ppt
CO_Chapter2.ppt
 
11 instruction sets addressing modes
11  instruction sets addressing modes 11  instruction sets addressing modes
11 instruction sets addressing modes
 
Ch 11
Ch 11Ch 11
Ch 11
 
Computer Architecture and organization ppt.
Computer Architecture and organization ppt.Computer Architecture and organization ppt.
Computer Architecture and organization ppt.
 
Ch13- Inst Addressing Modes & Formats.pdf
Ch13- Inst Addressing Modes & Formats.pdfCh13- Inst Addressing Modes & Formats.pdf
Ch13- Inst Addressing Modes & Formats.pdf
 
module-3.pptx
module-3.pptxmodule-3.pptx
module-3.pptx
 
UNIT-3.pptx
UNIT-3.pptxUNIT-3.pptx
UNIT-3.pptx
 
instruction sets (1).pptx
instruction sets (1).pptxinstruction sets (1).pptx
instruction sets (1).pptx
 
Lecture 3 instruction set
Lecture 3  instruction setLecture 3  instruction set
Lecture 3 instruction set
 

Último

Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfErwinPantujan2
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfPatidar M
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationRosabel UA
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 

Último (20)

Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdf
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translation
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 

Instruction Sequencing & Addressing Modes

  • 1. TOPICS:- Instruction and Instruction Sequencing •Register Transfer Notation(RTN) •Assembly Language Notation(APN) •Basic instruction type •Instruction execution & straight line sequencing •Branching •Condition codes •Generating memory address
  • 2. Addressing modes •Types of addressing modes •Implementation of variables and constants •Indirection and pointer •Indexing and array •Relative addressing •Additional modes
  • 3. Computer program consist of sequence of small steps, such as adding two numbers, testing for a particular condition , reading a character from the keyword Four types of operation. 1) Data transfers between the memory and the processor registers. 2) Arithmetic and logical operations on data. 3) Program sequencing and control. 4) I/O Transfers
  • 4. •Transfer of information from one location in the computer to another. •Possible locations that may be involved in such transfers are memory locations, processor registers and registers in the I/O subsystem. •Example – • Add the contents of the register R1 and R2 and then places their sum into register R3. R3[R1]+[R2]  Right side denoted the value.  Left side denoted the name of the location where the value is to be placed.
  • 5. •It represent machine instructions and program. •For this, we use assembly language format. •Example :- 1) Move LOC ,R1 • The contents of LOC are unchanged by the execution of this instruction but the old contents of register R1 are overwritten. 2) Add R1,R2,R3
  • 6. Three types of basic instruction:- 1) 3 –Address instruction:- • Add A,B,C • A &B are called Source operands. • C is called Destination operand. Operation Source1,Source2,Destination • 3-address instruction is too large to fit in one word for a reasonable word length.
  • 7. 2) 2-Address Instruction:- • Add A,B • [B][A]+[B] • A is source operand and B is destination operand Operation Source, Destination • A single 2-address instruction cannot be used to solve original problem A and B , without destroying either of them ,and to place the sum in location C. • Move B,C C[B]
  • 8. 3) 1-Adress Instruction:- • Add A • Accumulator[A]+Accumulator Operation Destination • Using 1-address instructions , the operation [C][A]+[B] can be performed by execution the sequence the instruction:- • Load A • Add B • Store C
  • 9. •Executing a given instruction is a two-phase procedure:- • 1) Instruction fetch:- •Instruction fetched from the main memory location whose address in the PC. •This instruction placed in the IR in the processor. •2)Instruction execute:- •The instruction in IR is examined to determine which operation is to be performed. •The specified operation is performed by processor. •Perform arithmetic and logic operation. •Store the result in destination location.
  • 10. •PC holds the address of the instruction to be execute next. •The address of 1st instruction placed into PC, then •The processor control circuits use the information in the PC to fetch and execute instruction ,one at a time , in the order of increasing addresses . It is called straight line sequencing. •During each instruction PC incremented by 4 to point to the next instruction
  • 11. • It is loads a new value into the PC. •Processor fetch and executes the instruction at the new address , called branch target. •It follows the branch instruction in sequential address order . •A conditional branch instruction causes a branch only if a specified condition is satisfied. •If the condition is not specified ,the PC is incremented. •And the next instruction in sequential order is fetched and executed. • Branch>0 LOOP
  • 12. •The processor keep the track of information about the result of various operation for use by subsequent conditional branch instructions. •This is accomplished by recording the required information in individual bits, often called condition code flags. •These flags are usually grouped together in a special processor register called condition code register or status register.
  • 13. •Four commonly used flags are:- •N(negative):-Set to 1 if the result is negative; otherwise cleared to 0 •Z(zero):-Set to 1 if the result is 0;othrrwise cleared to 0 •V(overflow):-Setto 1 if the arithmetic overflow occurs ; otherwise cleared to 0 •C(carry):-Setto 1 if a carry-out results from the operation ; otherwise cleared to 0
  • 14. •The N and Z flags are affected by instructions that transfer data such as Move ,Load , or Store. •TheInstruction Branch>0 tests one or more condition codes. •Insome computers ,the condition code flags are affected automatically by instruction that perform arithmetic or logic operation
  • 15. •Theinstruction set of a computer typically provides a number of such method, called addressing modes. •Types of addressing modes:- EA=effective address Name Assembler syntax Addressing function Immediate # value Operand=value Register Ri EA=Ri Absolute(Direct) LOC EA=LOC Indirect (Ri) , (LOC) EA=[Ri] ,EA=[LOC] Index X(Ri) EA=[Ri]+X Base with Index (Ri,Rj) EA=[Ri]+[Rj] Base with Index and X(Ri,Rj) EA=[Ri]+[Rj]+X offset Relative X(PC) EA=[PC]+X Auto increment (Ri+) EA=[Ri] ;Increment Ri Auto decrement -(Ri) Decrement Ri EA=[Ri];
  • 16. •A variable is represented by allocating a register or a memory location to hold its value. •Two addressing modes to access variables:- 1) Register mode:-The operand is the contents of a processor register . •Operand is held in register named in address file •EA = R •Limited number of registers •Very small address field needed Shorter instructions Faster instruction fetch •Move LOC,R1
  • 17. 2) Absolute mode:- •The operand is in a memory location. •The address of this location is given explicitly in the instruction . •It is also called Direct mode. •Declaration such as • Integer A,B
  • 18. Address and data constants can be represented in assembly level language using Immediate mode •Immediate mode:- The operand is given explicitly in the instruction. •Example – Move 200immediate ,Ro •The common convention is to be used the sharp sign(#) in front of the value of the use as in immediate operand. • Move #200, Ro
  • 19. •The register or memory location that contains the address of an operand is called a pointer. •Indirection is the ability to reference something using a name, reference, or container instead of the value itself. •The most common form of indirection is the act of manipulating a value through its memory address. •For example, accessing a variable through the use of a pointer. •Indirection and use of pointers are important and powerful concepts in programming.
  • 20. •Indirectmode:- • The effective address of the operand is the contents of register or memory location whose address appears in the instruction. •Memory cell pointed to by address field contains the address of (pointer to) the operand. •e.g. ADD (A) Add contents of cell pointed to by contents of A to accumulator • Add (R2),R1
  • 21. •Indexing provide the different kind of flexibility for accessing operands. •It is useful in dealing with lists and array. •IndexMode:- •The effective address of the operand is generated by adding a constant value to the contents of a register.
  • 22. •The register used may be special register provided for this purpose or general –purpose register called index register. • X(Ri) • EA=X+[Ri] •Where X denoted the constant value contained in the instruction, •And Ri is the name of the register involved.
  • 23. •Relative Mode:- •The effective address is determined by the index mode using the PC in the place of general purpose register Ri. • EA=[Ri]+PC •i.e. get operand from Ri cells from current location pointed to by PC •The mode can be used access data operands. •Most common used in to specify the target address in branch instruction. • Branch>0 LOOP
  • 24. Auto increment mode:- (Ri)+ • 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. • Auto Decrement mode:- -(Ri) • The contents of a register specified in the instruction are first automatically decremented. • After that used as the effective address of the operand.