SlideShare ist ein Scribd-Unternehmen logo
1 von 35
Birla Vishwakarma Mahavidyalaya
ET Department
Arithmetic Instructions and
Logical Instructions
Under the Guidance :
Prof. Bhargav Goradiya,
H.O.D. ,ET department,BVM
Name E. No.
Vatsal Bodiwala 140083112002
Ashit Patel 140083112010
Jigar Sindha 140083112017
Vipul Thakor 140083112019
Rohit Vadgama 140083112020
 Addition
 Subtract
 Increment
 Decrement
 Any 8-bit number, or the contents of register,
or the contents of memory location can be
added to the contents of accumulator.
 The result (sum) is stored in the accumulator.
 No two other 8-bit registers can be added
directly.
 If the operand is memory location, its address
is specified by H-L pair.
Opcode Operand Description
ADD R
M
Add content of register or memory to
accumulator
Example: ADD B or ADD M
Example: ADC B or ADC M
Opcode Operand Description
ADC R
M
Add register or memory to
accumulator with
carry
Opcode Operand Description
ADI 8-Bit Data Add immediate to accumulator
Opcode Operand Description
ACI 8-Bit data The 8-bit data and the Carry Flag
(CY) are added to the
contents of accumulator.
Example: ADI 45 H
Example: ACI 45 H
Opcode Operand Description
DAD Register pair Add register pair to H-L pair
 The 16-bit contents of the register pair are
added to the contents of H-L pair.
 The result is stored in H-L pair.
 If the result is larger than 16 bits, then CY is
set.
 Example: DAD B
 Any 8-bit number, or the contents of register, or the
contents of memory location can be subtracted from the
contents of accumulator.
 The result is stored in the accumulator.
 Subtraction is performed in 2’s complement form.
 If the result is negative, it is stored in 2’s complement
form.
 No two other 8-bit registers can be subtracted directly.
 If the operand is memory location, its address is
specified by H-L pair.
Opcode Operand Description
SUB R
M
The contents of the register or
memory location are subtracted from
the contents of the accumulator.
Example: SUB B or SUB M
Opcode Operand Description
SBB R
M
The contents of the register or
memory location and Borrow Flag are
subtracted from the contents of the
accumulator.
Example: SBB B or SBB M
Opcode Operand Description
SUI 8-bit data The 8-bit data is subtracted from the
contents of the accumulator.
Example: SUI 5 H
Opcode Operand Description
SBI 8-bit data The 8-bit data and the Borrow Flag is
subtracted from the contents of the
accumulator.
Example: SBI 5 H
 The 8-bit contents of a register or a memory
location can be incremented or decremented by 1.
 The 16-bit contents of a register pair can be
incremented or decremented by 1.
 Increment or decrement can be performed on any
register or a memory location.
 If the operand is a memory location, its address is
specified by the contents of H-L pair.
Opcode Operand Description
INR R
M
The contents of register or memory
location are
incremented by 1.
Example: INR B or INR M
Opcode Operand Description
INX R The contents of register pair are
incremented by 1.
Example: INX H
Opcode Operand Description
DCR R
M
The contents of register or memory
location are
decremented by 1.
Example: DCR B or DCR M
Opcode Operand Description
DCX R The contents of register pair are
decremented by 1.
Example: DCX H
 These instructions perform various logical operations
with the content of accumulator.
 The logical operations are:
AND
OR
XOR
Rotate
Compare
Complement
 Any 8-bit data, or the contents of register, or
memory location can logically have
AND operation
OR operation
XOR operation
with the contents of accumulator.
 The result is stored in accumulator.
Opcode Operand Description
ANA R
M
Logical AND register or memory with
accumulator
 The contents of the accumulator are logically ANDed with the
contents of register or memory.
 The result is placed in the accumulator.
 If the operand is a memory location, its address is specified by
the contents of H-L pair.
 S, Z, P are modified to reflect the result of the operation.
 CY is reset and AC is set.
 Example: ANA B or ANA M.
Opcode Operand Description
ANI 8-bit data Logical AND immediate with
accumulator
 The contents of the accumulator are logically ANDed
with the 8-bit data.
 The result is placed in the accumulator.
 S, Z, P are modified to reflect the result.
 CY is reset, AC is set.
Example: ANI 86H.
Opcode Operand Description
ORA R
M
Logical OR register or memory with
accumulator
 The contents of the accumulator are logically ORed
with the contents of the register or memory.
 The result is placed in the accumulator.
 If the operand is a memory location, its address is
specified by the contents of H-L pair.
 S, Z, P are modified to reflect the result.
 CY and AC are reset.
Example: ORA B or ORA M.
Opcode Operand Description
ORI 8-bit data Logical OR immediate with
accumulator
The contents of the accumulator are logically ORed
with the 8-bit data.
 The result is placed in the accumulator.
 S, Z, P are modified to reflect the result.
 CY and AC are reset.
Example: ORI 86H.
Opcode Operand Description
XRA R
M
Logical XOR register or memory with
accumulator
The contents of the accumulator are XORed with the
contents of the register or memory.
The result is placed in the accumulator.
If the operand is a memory location, its address is
specified by the contents of H-L pair.
S, Z, P are modified to reflect the result of the
operation.
CY and AC are reset.
Example: XRA B or XRA M.
Opcode Operand Description
XRI 8-bit data XOR immediate with accumulator
The contents of the accumulator are XORed with the
8-bit data.
 The result is placed in the accumulator.
 S, Z, P are modified to reflect the result.
CY and AC are reset.
 Example: XRI 86H.
 Any 8-bit data, or the contents of register, or
memory location can be compares for:
Equality
Greater Than
Less Than
with the contents of accumulator.
 The result is reflected in status flags.
 The contents of the operand (register or
memory) are compared with the contents of
the accumulator.
 Both contents are preserved .
 The result of the comparison is shown by
setting the flags of the PSW as follows:
Opcode Operand Description
CMP R
M
Compare register or memory with
accumulator
 if (A) < (reg/mem): carry flag is set
 if (A) = (reg/mem): zero flag is set
 if (A) > (reg/mem): carry and zero flags are
reset.
Example: CMP B or CMP M
Opcode Operand Description
CMP R
M
Compare register or memory with
accumulator
 The 8-bit data is compared with the
contents of accumulator.
 The result of the comparison is shown by
setting the flags of the PSW as follows:
Opcode Operand Description
CPI 8-bit dat Compare immediate with accumulator
 if (A) < data: carry flag is set
 if (A) = data: zero flag is set
 if (A) > data: carry and zero flags are reset.
Example: CPI 89H
Opcode Operand Description
CPI 8-bit dat Compare immediate with accumulator
 Each bit in the accumulator can be shifted
either left or right to the next position.
Opcode Operand Description
RLC None Rotate accumulator left
Each binary bit of the accumulator is rotated left by one
position.
 Bit D7 is placed in the position of D0 as well
as in the Carry flag.
 CY is modified according to bit D7.
 S, Z, P, AC are not affected.
Example: RLC.
Opcode Operand Description
RRC None Rotate accumulator right
Each binary bit of the accumulator is rotated right by one position.
Bit D0 is placed in the position of D7 as well as in the Carry flag.
CY is modified according to bit D0.
S, Z, P, AC are not affected.
Example: RRC.
Opcode Operand Description
RAL None Rotate accumulator left through carry
Each binary bit of the accumulator is rotated left by one position
through the Carry flag.
 Bit D7 is placed in the Carry flag, and the Carry flag is placed in
the least significant position D0.
CY is modified according to bit D7.
 S, Z, P, AC are not affected.
Example: RAL.
Opcode Operand Description
RAR None Rotate accumulator right through
carry
Each binary bit of the accumulator is rotated right by one position
through the Carry flag.
 Bit D0 is placed in the Carry flag, and the Carry flag is placed in
the most significant position D7.
CY is modified according to bit D0.
S, Z, P, AC are not affected.
Example: RAR.
 The contents of accumulator can be
complemented.
 Each 0 is replaced by 1 and each 1 is replaced
by 0.
Opcode Operand Description
CMA None Complement accumulator
 The contents of the accumulator are complemented.
 No flags are affected.
Example: CMA.
Opcode Operand Description
CMC None Complement carry
 The Carry flag is complemented.
 No other flags are affected.
 Example: CMC.
Opcode Operand Description
STC None Set carry
The Carry flag is set to 1.
 No other flags are affected.
 Example: STC.
Arithmetic and logical instructions

Weitere ähnliche Inhalte

Was ist angesagt?

8086 assembly language
8086 assembly language8086 assembly language
8086 assembly languageMir Majid
 
Logical instruction of 8085
Logical instruction of 8085Logical instruction of 8085
Logical instruction of 8085vishalgohel12195
 
Architecture of 8085 microprocessor
Architecture of 8085 microprocessorArchitecture of 8085 microprocessor
Architecture of 8085 microprocessorAMAN SRIVASTAVA
 
80286 microprocessor
80286 microprocessor80286 microprocessor
80286 microprocessorAvin Mathew
 
Architecture of 8086 Microprocessor
Architecture of 8086 Microprocessor  Architecture of 8086 Microprocessor
Architecture of 8086 Microprocessor Mustapha Fatty
 
8086 modes
8086 modes8086 modes
8086 modesPDFSHARE
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 80869840596838
 
Interfacing of io device to 8085
Interfacing of io device to 8085Interfacing of io device to 8085
Interfacing of io device to 8085Nitin Ahire
 
LOGICAL OPERATIONS IN 8085 MICROPROCESSOR
LOGICAL OPERATIONS IN 8085 MICROPROCESSORLOGICAL OPERATIONS IN 8085 MICROPROCESSOR
LOGICAL OPERATIONS IN 8085 MICROPROCESSORRamaPrabha24
 
Demultiplexing of buses of 8085 microprocessor
Demultiplexing of buses of 8085 microprocessor Demultiplexing of buses of 8085 microprocessor
Demultiplexing of buses of 8085 microprocessor Rajal Patel
 
Minimum mode and Maximum mode Configuration in 8086
Minimum mode and Maximum mode Configuration in 8086Minimum mode and Maximum mode Configuration in 8086
Minimum mode and Maximum mode Configuration in 8086Jismy .K.Jose
 
Microprocessor 8085 complete
Microprocessor 8085 completeMicroprocessor 8085 complete
Microprocessor 8085 completeShubham Singh
 
Stack in 8085 microprocessor
Stack in 8085 microprocessorStack in 8085 microprocessor
Stack in 8085 microprocessorhepzijustin
 
Stacks & subroutines 1
Stacks & subroutines 1Stacks & subroutines 1
Stacks & subroutines 1deval patel
 
8237 dma controller
8237 dma controller8237 dma controller
8237 dma controllerTech_MX
 

Was ist angesagt? (20)

Programming with 8085
Programming with 8085Programming with 8085
Programming with 8085
 
DMA and DMA controller
DMA and DMA controllerDMA and DMA controller
DMA and DMA controller
 
8086 memory segmentation
8086 memory segmentation8086 memory segmentation
8086 memory segmentation
 
8086 assembly language
8086 assembly language8086 assembly language
8086 assembly language
 
8255 ppi
8255 ppi8255 ppi
8255 ppi
 
Logical instruction of 8085
Logical instruction of 8085Logical instruction of 8085
Logical instruction of 8085
 
Architecture of 8085 microprocessor
Architecture of 8085 microprocessorArchitecture of 8085 microprocessor
Architecture of 8085 microprocessor
 
80286 microprocessor
80286 microprocessor80286 microprocessor
80286 microprocessor
 
Architecture of 8086 Microprocessor
Architecture of 8086 Microprocessor  Architecture of 8086 Microprocessor
Architecture of 8086 Microprocessor
 
8086 modes
8086 modes8086 modes
8086 modes
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 8086
 
Interfacing of io device to 8085
Interfacing of io device to 8085Interfacing of io device to 8085
Interfacing of io device to 8085
 
pipelining
pipeliningpipelining
pipelining
 
LOGICAL OPERATIONS IN 8085 MICROPROCESSOR
LOGICAL OPERATIONS IN 8085 MICROPROCESSORLOGICAL OPERATIONS IN 8085 MICROPROCESSOR
LOGICAL OPERATIONS IN 8085 MICROPROCESSOR
 
Demultiplexing of buses of 8085 microprocessor
Demultiplexing of buses of 8085 microprocessor Demultiplexing of buses of 8085 microprocessor
Demultiplexing of buses of 8085 microprocessor
 
Minimum mode and Maximum mode Configuration in 8086
Minimum mode and Maximum mode Configuration in 8086Minimum mode and Maximum mode Configuration in 8086
Minimum mode and Maximum mode Configuration in 8086
 
Microprocessor 8085 complete
Microprocessor 8085 completeMicroprocessor 8085 complete
Microprocessor 8085 complete
 
Stack in 8085 microprocessor
Stack in 8085 microprocessorStack in 8085 microprocessor
Stack in 8085 microprocessor
 
Stacks & subroutines 1
Stacks & subroutines 1Stacks & subroutines 1
Stacks & subroutines 1
 
8237 dma controller
8237 dma controller8237 dma controller
8237 dma controller
 

Ähnlich wie Arithmetic and logical instructions

Logical instruction of 8085
Logical instruction of 8085 Logical instruction of 8085
Logical instruction of 8085 Nemish Bhojani
 
Instructionset8085 by NCIT SAROZ BISTA SIR
Instructionset8085 by NCIT SAROZ BISTA SIRInstructionset8085 by NCIT SAROZ BISTA SIR
Instructionset8085 by NCIT SAROZ BISTA SIRTHEE CAVE
 
Instruction set-of-8085
Instruction set-of-8085Instruction set-of-8085
Instruction set-of-8085saleForce
 
instruction-set-of-8085 (1).ppt
instruction-set-of-8085 (1).pptinstruction-set-of-8085 (1).ppt
instruction-set-of-8085 (1).pptssuserb448e2
 
itft-Instruction set-of-8085
itft-Instruction set-of-8085itft-Instruction set-of-8085
itft-Instruction set-of-8085Shifali Sharma
 
8085 instruction set
8085 instruction set8085 instruction set
8085 instruction setJLoknathDora
 
Microprocessor Basics CH-3
Microprocessor Basics CH-3Microprocessor Basics CH-3
Microprocessor Basics CH-3Neelam Kapoor
 
Types of instruction in 8085 microprocessor
Types of instruction in 8085 microprocessorTypes of instruction in 8085 microprocessor
Types of instruction in 8085 microprocessorsamarthpawar9890
 
Mpmc i nstruction_ppt1.6_-_arthamatic_logic
Mpmc i nstruction_ppt1.6_-_arthamatic_logicMpmc i nstruction_ppt1.6_-_arthamatic_logic
Mpmc i nstruction_ppt1.6_-_arthamatic_logickalpana ravinder
 
INTEL 8085 DATA FORMAT AND INSTRUCTIONS
INTEL 8085 DATA FORMAT AND INSTRUCTIONSINTEL 8085 DATA FORMAT AND INSTRUCTIONS
INTEL 8085 DATA FORMAT AND INSTRUCTIONSSwapnil Mishra
 
Chapter 3 instruction set-of-8085
Chapter 3 instruction set-of-8085Chapter 3 instruction set-of-8085
Chapter 3 instruction set-of-8085Shubham Singh
 
ARITHMETIC OPERATIONS IN 8085 MICROPROCESSOR
ARITHMETIC OPERATIONS IN 8085 MICROPROCESSORARITHMETIC OPERATIONS IN 8085 MICROPROCESSOR
ARITHMETIC OPERATIONS IN 8085 MICROPROCESSORRamaPrabha24
 
4. Instruction Set Of MP 8085.pptx
4. Instruction Set Of MP 8085.pptx4. Instruction Set Of MP 8085.pptx
4. Instruction Set Of MP 8085.pptxISMT College
 

Ähnlich wie Arithmetic and logical instructions (20)

Logical instruction of 8085
Logical instruction of 8085 Logical instruction of 8085
Logical instruction of 8085
 
Instructionset8085 by NCIT SAROZ BISTA SIR
Instructionset8085 by NCIT SAROZ BISTA SIRInstructionset8085 by NCIT SAROZ BISTA SIR
Instructionset8085 by NCIT SAROZ BISTA SIR
 
Instruction set-of-8085
Instruction set-of-8085Instruction set-of-8085
Instruction set-of-8085
 
instruction-set-of-8085 (1).ppt
instruction-set-of-8085 (1).pptinstruction-set-of-8085 (1).ppt
instruction-set-of-8085 (1).ppt
 
Instruction set of 8085
Instruction set of 8085Instruction set of 8085
Instruction set of 8085
 
8085 instructions details
8085 instructions details8085 instructions details
8085 instructions details
 
8085 instructions
8085 instructions8085 instructions
8085 instructions
 
itft-Instruction set-of-8085
itft-Instruction set-of-8085itft-Instruction set-of-8085
itft-Instruction set-of-8085
 
8085 Instructions.pdf
8085 Instructions.pdf8085 Instructions.pdf
8085 Instructions.pdf
 
8085 instruction set
8085 instruction set8085 instruction set
8085 instruction set
 
Microprocessor Basics CH-3
Microprocessor Basics CH-3Microprocessor Basics CH-3
Microprocessor Basics CH-3
 
Types of instruction in 8085 microprocessor
Types of instruction in 8085 microprocessorTypes of instruction in 8085 microprocessor
Types of instruction in 8085 microprocessor
 
Mpmc i nstruction_ppt1.6_-_arthamatic_logic
Mpmc i nstruction_ppt1.6_-_arthamatic_logicMpmc i nstruction_ppt1.6_-_arthamatic_logic
Mpmc i nstruction_ppt1.6_-_arthamatic_logic
 
INTEL 8085 DATA FORMAT AND INSTRUCTIONS
INTEL 8085 DATA FORMAT AND INSTRUCTIONSINTEL 8085 DATA FORMAT AND INSTRUCTIONS
INTEL 8085 DATA FORMAT AND INSTRUCTIONS
 
Chapter 3 instruction set-of-8085
Chapter 3 instruction set-of-8085Chapter 3 instruction set-of-8085
Chapter 3 instruction set-of-8085
 
ARITHMETIC OPERATIONS IN 8085 MICROPROCESSOR
ARITHMETIC OPERATIONS IN 8085 MICROPROCESSORARITHMETIC OPERATIONS IN 8085 MICROPROCESSOR
ARITHMETIC OPERATIONS IN 8085 MICROPROCESSOR
 
UNIT II.pptx
UNIT II.pptxUNIT II.pptx
UNIT II.pptx
 
8085 instructions
8085 instructions8085 instructions
8085 instructions
 
4. Instruction Set Of MP 8085.pptx
4. Instruction Set Of MP 8085.pptx4. Instruction Set Of MP 8085.pptx
4. Instruction Set Of MP 8085.pptx
 
Mpi
MpiMpi
Mpi
 

Mehr von BIRLA VISHVAKARMA MAHAVIDYALAY (14)

VLAN ON PACKET TRACER
VLAN ON PACKET TRACERVLAN ON PACKET TRACER
VLAN ON PACKET TRACER
 
VLAN ON PACKET TRACER
VLAN ON PACKET TRACERVLAN ON PACKET TRACER
VLAN ON PACKET TRACER
 
VLAN on packet Tracer
VLAN on packet TracerVLAN on packet Tracer
VLAN on packet Tracer
 
Stepper motor interfacing
Stepper motor interfacingStepper motor interfacing
Stepper motor interfacing
 
E.com
E.comE.com
E.com
 
Fhss project
Fhss projectFhss project
Fhss project
 
Group 11
Group 11Group 11
Group 11
 
Me presentation
Me presentationMe presentation
Me presentation
 
Gujarat technological universit1
Gujarat technological universit1Gujarat technological universit1
Gujarat technological universit1
 
Cse presentation
Cse presentationCse presentation
Cse presentation
 
Group no 11
Group no 11Group no 11
Group no 11
 
Avs presentation
Avs presentationAvs presentation
Avs presentation
 
Automatic room light controller with bidirectional visitor counter
Automatic room light controller with bidirectional visitor counterAutomatic room light controller with bidirectional visitor counter
Automatic room light controller with bidirectional visitor counter
 
Automaticroomlightcontroller[1]
Automaticroomlightcontroller[1]Automaticroomlightcontroller[1]
Automaticroomlightcontroller[1]
 

Kürzlich hochgeladen

Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)simmis5
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTbhaskargani46
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptDineshKumar4165
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756dollysharma2066
 
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
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdfSuman Jyoti
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdfKamal Acharya
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringmulugeta48
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...ranjana rawat
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptMsecMca
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfKamal Acharya
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . pptDineshKumar4165
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 

Kürzlich hochgeladen (20)

Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
NFPA 5000 2024 standard .
NFPA 5000 2024 standard                                  .NFPA 5000 2024 standard                                  .
NFPA 5000 2024 standard .
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
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
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 

Arithmetic and logical instructions

  • 1. Birla Vishwakarma Mahavidyalaya ET Department Arithmetic Instructions and Logical Instructions Under the Guidance : Prof. Bhargav Goradiya, H.O.D. ,ET department,BVM
  • 2. Name E. No. Vatsal Bodiwala 140083112002 Ashit Patel 140083112010 Jigar Sindha 140083112017 Vipul Thakor 140083112019 Rohit Vadgama 140083112020
  • 3.  Addition  Subtract  Increment  Decrement
  • 4.  Any 8-bit number, or the contents of register, or the contents of memory location can be added to the contents of accumulator.  The result (sum) is stored in the accumulator.  No two other 8-bit registers can be added directly.  If the operand is memory location, its address is specified by H-L pair.
  • 5. Opcode Operand Description ADD R M Add content of register or memory to accumulator Example: ADD B or ADD M Example: ADC B or ADC M Opcode Operand Description ADC R M Add register or memory to accumulator with carry
  • 6. Opcode Operand Description ADI 8-Bit Data Add immediate to accumulator Opcode Operand Description ACI 8-Bit data The 8-bit data and the Carry Flag (CY) are added to the contents of accumulator. Example: ADI 45 H Example: ACI 45 H
  • 7. Opcode Operand Description DAD Register pair Add register pair to H-L pair  The 16-bit contents of the register pair are added to the contents of H-L pair.  The result is stored in H-L pair.  If the result is larger than 16 bits, then CY is set.  Example: DAD B
  • 8.  Any 8-bit number, or the contents of register, or the contents of memory location can be subtracted from the contents of accumulator.  The result is stored in the accumulator.  Subtraction is performed in 2’s complement form.  If the result is negative, it is stored in 2’s complement form.  No two other 8-bit registers can be subtracted directly.  If the operand is memory location, its address is specified by H-L pair.
  • 9. Opcode Operand Description SUB R M The contents of the register or memory location are subtracted from the contents of the accumulator. Example: SUB B or SUB M Opcode Operand Description SBB R M The contents of the register or memory location and Borrow Flag are subtracted from the contents of the accumulator. Example: SBB B or SBB M
  • 10. Opcode Operand Description SUI 8-bit data The 8-bit data is subtracted from the contents of the accumulator. Example: SUI 5 H Opcode Operand Description SBI 8-bit data The 8-bit data and the Borrow Flag is subtracted from the contents of the accumulator. Example: SBI 5 H
  • 11.  The 8-bit contents of a register or a memory location can be incremented or decremented by 1.  The 16-bit contents of a register pair can be incremented or decremented by 1.  Increment or decrement can be performed on any register or a memory location.  If the operand is a memory location, its address is specified by the contents of H-L pair.
  • 12. Opcode Operand Description INR R M The contents of register or memory location are incremented by 1. Example: INR B or INR M Opcode Operand Description INX R The contents of register pair are incremented by 1. Example: INX H
  • 13. Opcode Operand Description DCR R M The contents of register or memory location are decremented by 1. Example: DCR B or DCR M Opcode Operand Description DCX R The contents of register pair are decremented by 1. Example: DCX H
  • 14.  These instructions perform various logical operations with the content of accumulator.  The logical operations are: AND OR XOR Rotate Compare Complement
  • 15.  Any 8-bit data, or the contents of register, or memory location can logically have AND operation OR operation XOR operation with the contents of accumulator.  The result is stored in accumulator.
  • 16. Opcode Operand Description ANA R M Logical AND register or memory with accumulator  The contents of the accumulator are logically ANDed with the contents of register or memory.  The result is placed in the accumulator.  If the operand is a memory location, its address is specified by the contents of H-L pair.  S, Z, P are modified to reflect the result of the operation.  CY is reset and AC is set.  Example: ANA B or ANA M.
  • 17. Opcode Operand Description ANI 8-bit data Logical AND immediate with accumulator  The contents of the accumulator are logically ANDed with the 8-bit data.  The result is placed in the accumulator.  S, Z, P are modified to reflect the result.  CY is reset, AC is set. Example: ANI 86H.
  • 18. Opcode Operand Description ORA R M Logical OR register or memory with accumulator  The contents of the accumulator are logically ORed with the contents of the register or memory.  The result is placed in the accumulator.  If the operand is a memory location, its address is specified by the contents of H-L pair.  S, Z, P are modified to reflect the result.  CY and AC are reset. Example: ORA B or ORA M.
  • 19. Opcode Operand Description ORI 8-bit data Logical OR immediate with accumulator The contents of the accumulator are logically ORed with the 8-bit data.  The result is placed in the accumulator.  S, Z, P are modified to reflect the result.  CY and AC are reset. Example: ORI 86H.
  • 20. Opcode Operand Description XRA R M Logical XOR register or memory with accumulator The contents of the accumulator are XORed with the contents of the register or memory. The result is placed in the accumulator. If the operand is a memory location, its address is specified by the contents of H-L pair. S, Z, P are modified to reflect the result of the operation. CY and AC are reset. Example: XRA B or XRA M.
  • 21. Opcode Operand Description XRI 8-bit data XOR immediate with accumulator The contents of the accumulator are XORed with the 8-bit data.  The result is placed in the accumulator.  S, Z, P are modified to reflect the result. CY and AC are reset.  Example: XRI 86H.
  • 22.  Any 8-bit data, or the contents of register, or memory location can be compares for: Equality Greater Than Less Than with the contents of accumulator.  The result is reflected in status flags.
  • 23.  The contents of the operand (register or memory) are compared with the contents of the accumulator.  Both contents are preserved .  The result of the comparison is shown by setting the flags of the PSW as follows: Opcode Operand Description CMP R M Compare register or memory with accumulator
  • 24.  if (A) < (reg/mem): carry flag is set  if (A) = (reg/mem): zero flag is set  if (A) > (reg/mem): carry and zero flags are reset. Example: CMP B or CMP M Opcode Operand Description CMP R M Compare register or memory with accumulator
  • 25.  The 8-bit data is compared with the contents of accumulator.  The result of the comparison is shown by setting the flags of the PSW as follows: Opcode Operand Description CPI 8-bit dat Compare immediate with accumulator
  • 26.  if (A) < data: carry flag is set  if (A) = data: zero flag is set  if (A) > data: carry and zero flags are reset. Example: CPI 89H Opcode Operand Description CPI 8-bit dat Compare immediate with accumulator
  • 27.  Each bit in the accumulator can be shifted either left or right to the next position. Opcode Operand Description RLC None Rotate accumulator left Each binary bit of the accumulator is rotated left by one position.
  • 28.  Bit D7 is placed in the position of D0 as well as in the Carry flag.  CY is modified according to bit D7.  S, Z, P, AC are not affected. Example: RLC.
  • 29. Opcode Operand Description RRC None Rotate accumulator right Each binary bit of the accumulator is rotated right by one position. Bit D0 is placed in the position of D7 as well as in the Carry flag. CY is modified according to bit D0. S, Z, P, AC are not affected. Example: RRC.
  • 30. Opcode Operand Description RAL None Rotate accumulator left through carry Each binary bit of the accumulator is rotated left by one position through the Carry flag.  Bit D7 is placed in the Carry flag, and the Carry flag is placed in the least significant position D0. CY is modified according to bit D7.  S, Z, P, AC are not affected. Example: RAL.
  • 31. Opcode Operand Description RAR None Rotate accumulator right through carry Each binary bit of the accumulator is rotated right by one position through the Carry flag.  Bit D0 is placed in the Carry flag, and the Carry flag is placed in the most significant position D7. CY is modified according to bit D0. S, Z, P, AC are not affected. Example: RAR.
  • 32.  The contents of accumulator can be complemented.  Each 0 is replaced by 1 and each 1 is replaced by 0.
  • 33. Opcode Operand Description CMA None Complement accumulator  The contents of the accumulator are complemented.  No flags are affected. Example: CMA. Opcode Operand Description CMC None Complement carry  The Carry flag is complemented.  No other flags are affected.  Example: CMC.
  • 34. Opcode Operand Description STC None Set carry The Carry flag is set to 1.  No other flags are affected.  Example: STC.