SlideShare una empresa de Scribd logo
1 de 9
Arithmetic instructions ADD,SUB,DIV,MUL,INC,DEC
ADD & SUB ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
ADD Example mov a, #3Fh add a, #D3h ,[object Object],0011 1111 1101 0011 0001 0010 C = 1 AC = 1 OV = 0
Subtract   Example : SUBB A, #0x4F   ;A    A – 4F – C Notice that   There is  no  subtraction WITHOUT borrow.  Therefore, if a subtraction without borrow is desired,  it is necessary to  clear the C  flag. Example : Clr  c SUBB A, #0x4F ;A    A – 4F SUBB A, byte subtract with borrow
Increment & Decrement ,[object Object],[object Object],INC A increment A INC byte increment byte in memory INC DPTR increment data pointer DEC A decrement accumulator DEC byte decrement byte
SIGNIFICANCE OF carry flag ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Multiply When multiplying two 8-bit numbers, the size of the maximum product is 16-bits FF x FF = FE01 (255 x 255 = 65025) MUL AB   ;   BA    A * B Note :  B  gets the  High  byte A  gets the  Low  byte
Division ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Decimal Adjust DA a   ; decimal adjust a Used to facilitate BCD addition.  Adds “6” to either high or low nibble after an addition  to create a valid BCD number. Example : mov a, #23h mov b, #29h add a, b; a    23h + 29h =  4Ch(wanted 52)   DA a  ; a    a + 6 = 52

Más contenido relacionado

La actualidad más candente

Verilog coding of demux 8 x1
Verilog coding of demux  8 x1Verilog coding of demux  8 x1
Verilog coding of demux 8 x1Rakesh kumar jha
 
Nand and nor as a universal gates
Nand and nor as a universal gatesNand and nor as a universal gates
Nand and nor as a universal gatesKaushal Shah
 
BCD,GRAY and EXCESS 3 codes
BCD,GRAY and EXCESS 3 codesBCD,GRAY and EXCESS 3 codes
BCD,GRAY and EXCESS 3 codesstudent
 
Arithmetic and logical instructions set
Arithmetic and logical instructions setArithmetic and logical instructions set
Arithmetic and logical instructions setRobert Almazan
 
Microprocessor 8086-lab-mannual
Microprocessor 8086-lab-mannualMicroprocessor 8086-lab-mannual
Microprocessor 8086-lab-mannualyeshwant gadave
 
Error detection & correction codes
Error detection & correction codesError detection & correction codes
Error detection & correction codesRevathi Subramaniam
 
Program control instructions
Program control instructionsProgram control instructions
Program control instructionsDr. Girish GS
 
binary arithmetic rules
binary arithmetic rulesbinary arithmetic rules
binary arithmetic rulesstudent
 
Floating point arithmetic operations (1)
Floating point arithmetic operations (1)Floating point arithmetic operations (1)
Floating point arithmetic operations (1)cs19club
 
multiplexers and demultiplexers
 multiplexers and demultiplexers multiplexers and demultiplexers
multiplexers and demultiplexersUnsa Shakir
 
8051 Microcontroller ppt
8051 Microcontroller ppt8051 Microcontroller ppt
8051 Microcontroller pptRahul Kumar
 

La actualidad más candente (20)

Assembly 8086
Assembly 8086Assembly 8086
Assembly 8086
 
STLD-Combinational logic design
STLD-Combinational  logic design STLD-Combinational  logic design
STLD-Combinational logic design
 
Assignment on alp
Assignment on alpAssignment on alp
Assignment on alp
 
Adc interfacing
Adc interfacingAdc interfacing
Adc interfacing
 
Verilog coding of demux 8 x1
Verilog coding of demux  8 x1Verilog coding of demux  8 x1
Verilog coding of demux 8 x1
 
Nand and nor as a universal gates
Nand and nor as a universal gatesNand and nor as a universal gates
Nand and nor as a universal gates
 
BCD,GRAY and EXCESS 3 codes
BCD,GRAY and EXCESS 3 codesBCD,GRAY and EXCESS 3 codes
BCD,GRAY and EXCESS 3 codes
 
Assembly language
Assembly languageAssembly language
Assembly language
 
8155 PPI
8155 PPI8155 PPI
8155 PPI
 
Memory Reference Instructions
Memory Reference InstructionsMemory Reference Instructions
Memory Reference Instructions
 
Arithmetic and logical instructions set
Arithmetic and logical instructions setArithmetic and logical instructions set
Arithmetic and logical instructions set
 
Microprocessor 8086-lab-mannual
Microprocessor 8086-lab-mannualMicroprocessor 8086-lab-mannual
Microprocessor 8086-lab-mannual
 
Logic Micro Operation
Logic Micro OperationLogic Micro Operation
Logic Micro Operation
 
Error detection & correction codes
Error detection & correction codesError detection & correction codes
Error detection & correction codes
 
Program control instructions
Program control instructionsProgram control instructions
Program control instructions
 
Serial Communication in 8051
Serial Communication in 8051Serial Communication in 8051
Serial Communication in 8051
 
binary arithmetic rules
binary arithmetic rulesbinary arithmetic rules
binary arithmetic rules
 
Floating point arithmetic operations (1)
Floating point arithmetic operations (1)Floating point arithmetic operations (1)
Floating point arithmetic operations (1)
 
multiplexers and demultiplexers
 multiplexers and demultiplexers multiplexers and demultiplexers
multiplexers and demultiplexers
 
8051 Microcontroller ppt
8051 Microcontroller ppt8051 Microcontroller ppt
8051 Microcontroller ppt
 

Destacado

Arithmetic & logical operations in 8051
Arithmetic & logical operations in 8051Arithmetic & logical operations in 8051
Arithmetic & logical operations in 8051Jay Patel
 
1.arithmetic & logical operations
1.arithmetic & logical operations1.arithmetic & logical operations
1.arithmetic & logical operationsmukesh bhardwaj
 
Arithmetic instructions
Arithmetic instructionsArithmetic instructions
Arithmetic instructionsRobert Almazan
 
8051 Microcontroller Notes
8051 Microcontroller Notes8051 Microcontroller Notes
8051 Microcontroller NotesDr.YNM
 
Addressing mode of 8051
Addressing mode of 8051Addressing mode of 8051
Addressing mode of 8051Nitin Ahire
 
Addressing modes of 8051
Addressing modes of 8051Addressing modes of 8051
Addressing modes of 8051SARITHA REDDY
 
Abelardo Alaan profile
Abelardo Alaan profileAbelardo Alaan profile
Abelardo Alaan profileAbelardo Alaan
 
logic shift and rotate instruction
logic shift and rotate instructionlogic shift and rotate instruction
logic shift and rotate instructionJiaahRajpout123
 
Software AND its Types & CASE toolS
Software  AND     its   Types   &    CASE toolSSoftware  AND     its   Types   &    CASE toolS
Software AND its Types & CASE toolSkashif Shafqat
 
8051 micro controllers Instruction set
8051 micro controllers Instruction set 8051 micro controllers Instruction set
8051 micro controllers Instruction set Nitin Ahire
 
Logic, shift and rotate instruction
Logic, shift and rotate instructionLogic, shift and rotate instruction
Logic, shift and rotate instructionkashif Shafqat
 
8051 experiments1
8051 experiments18051 experiments1
8051 experiments1tt_aljobory
 

Destacado (16)

Arithmetic & logical operations in 8051
Arithmetic & logical operations in 8051Arithmetic & logical operations in 8051
Arithmetic & logical operations in 8051
 
1.arithmetic & logical operations
1.arithmetic & logical operations1.arithmetic & logical operations
1.arithmetic & logical operations
 
Arithmetic instructions
Arithmetic instructionsArithmetic instructions
Arithmetic instructions
 
8051 Microcontroller Notes
8051 Microcontroller Notes8051 Microcontroller Notes
8051 Microcontroller Notes
 
8051 instruction set
8051 instruction set8051 instruction set
8051 instruction set
 
Addressing mode of 8051
Addressing mode of 8051Addressing mode of 8051
Addressing mode of 8051
 
Addressing modes of 8051
Addressing modes of 8051Addressing modes of 8051
Addressing modes of 8051
 
Abelardo Alaan profile
Abelardo Alaan profileAbelardo Alaan profile
Abelardo Alaan profile
 
logic shift and rotate instruction
logic shift and rotate instructionlogic shift and rotate instruction
logic shift and rotate instruction
 
Shift rotate
Shift rotateShift rotate
Shift rotate
 
Software AND its Types & CASE toolS
Software  AND     its   Types   &    CASE toolSSoftware  AND     its   Types   &    CASE toolS
Software AND its Types & CASE toolS
 
Assembly Language -I
Assembly Language -IAssembly Language -I
Assembly Language -I
 
[ASM]Lab7
[ASM]Lab7[ASM]Lab7
[ASM]Lab7
 
8051 micro controllers Instruction set
8051 micro controllers Instruction set 8051 micro controllers Instruction set
8051 micro controllers Instruction set
 
Logic, shift and rotate instruction
Logic, shift and rotate instructionLogic, shift and rotate instruction
Logic, shift and rotate instruction
 
8051 experiments1
8051 experiments18051 experiments1
8051 experiments1
 

Similar a arithmetic ins in 8051

Bcd and ascii arithmetic instructions
Bcd and ascii arithmetic instructionsBcd and ascii arithmetic instructions
Bcd and ascii arithmetic instructionsDr. Girish GS
 
Ascii arithmetic instructions
Ascii arithmetic instructionsAscii arithmetic instructions
Ascii arithmetic instructionsDr. Girish GS
 
Bcd arithmetic instructions
Bcd arithmetic instructionsBcd arithmetic instructions
Bcd arithmetic instructionsDr. Girish GS
 
Chapter 07 Digital Alrithmetic and Arithmetic Circuits
Chapter 07 Digital Alrithmetic and Arithmetic CircuitsChapter 07 Digital Alrithmetic and Arithmetic Circuits
Chapter 07 Digital Alrithmetic and Arithmetic CircuitsSSE_AndyLi
 
Ascii adjust & decimal adjust
Ascii adjust & decimal adjustAscii adjust & decimal adjust
Ascii adjust & decimal adjustTech_MX
 
FYBSC IT Digital Electronics Unit III Chapter II Arithmetic Circuits
FYBSC IT Digital Electronics Unit III Chapter II Arithmetic CircuitsFYBSC IT Digital Electronics Unit III Chapter II Arithmetic Circuits
FYBSC IT Digital Electronics Unit III Chapter II Arithmetic CircuitsArti Parab Academics
 
Instruction 4.pptx
Instruction 4.pptxInstruction 4.pptx
Instruction 4.pptxHebaEng
 
Code Conversion in 8085 Microprocessor
Code Conversion in 8085 MicroprocessorCode Conversion in 8085 Microprocessor
Code Conversion in 8085 MicroprocessorMOHIT AGARWAL
 
8086 instructions
8086 instructions8086 instructions
8086 instructionsRavi Anand
 
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
 

Similar a arithmetic ins in 8051 (20)

Hemanth143
Hemanth143 Hemanth143
Hemanth143
 
Al2ed chapter11
Al2ed chapter11Al2ed chapter11
Al2ed chapter11
 
Class4
Class4Class4
Class4
 
6 arithmetic logic inst and prog
6 arithmetic logic inst and prog6 arithmetic logic inst and prog
6 arithmetic logic inst and prog
 
Module 2 (1).pptx
Module 2 (1).pptxModule 2 (1).pptx
Module 2 (1).pptx
 
Mod-2.pptx
Mod-2.pptxMod-2.pptx
Mod-2.pptx
 
Bcd and ascii arithmetic instructions
Bcd and ascii arithmetic instructionsBcd and ascii arithmetic instructions
Bcd and ascii arithmetic instructions
 
Ascii arithmetic instructions
Ascii arithmetic instructionsAscii arithmetic instructions
Ascii arithmetic instructions
 
Bcd arithmetic instructions
Bcd arithmetic instructionsBcd arithmetic instructions
Bcd arithmetic instructions
 
Chapter 07 Digital Alrithmetic and Arithmetic Circuits
Chapter 07 Digital Alrithmetic and Arithmetic CircuitsChapter 07 Digital Alrithmetic and Arithmetic Circuits
Chapter 07 Digital Alrithmetic and Arithmetic Circuits
 
Ascii adjust & decimal adjust
Ascii adjust & decimal adjustAscii adjust & decimal adjust
Ascii adjust & decimal adjust
 
FYBSC IT Digital Electronics Unit III Chapter II Arithmetic Circuits
FYBSC IT Digital Electronics Unit III Chapter II Arithmetic CircuitsFYBSC IT Digital Electronics Unit III Chapter II Arithmetic Circuits
FYBSC IT Digital Electronics Unit III Chapter II Arithmetic Circuits
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 8086
 
Digital Logic Design
Digital Logic Design Digital Logic Design
Digital Logic Design
 
Instruction 4.pptx
Instruction 4.pptxInstruction 4.pptx
Instruction 4.pptx
 
Arithmetic instrctions
Arithmetic instrctionsArithmetic instrctions
Arithmetic instrctions
 
Code Conversion in 8085 Microprocessor
Code Conversion in 8085 MicroprocessorCode Conversion in 8085 Microprocessor
Code Conversion in 8085 Microprocessor
 
8086 instructions
8086 instructions8086 instructions
8086 instructions
 
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
 

Más de VJ Aiswaryadevi (15)

8051
80518051
8051
 
memory 8051
memory  8051memory  8051
memory 8051
 
logical 8051
logical 8051logical 8051
logical 8051
 
interrupts
interruptsinterrupts
interrupts
 
mup
mupmup
mup
 
branch ins 8051
branch ins 8051branch ins 8051
branch ins 8051
 
boolean 8051
boolean 8051boolean 8051
boolean 8051
 
8051 archi
8051 archi8051 archi
8051 archi
 
8051 microprocessor
8051 microprocessor8051 microprocessor
8051 microprocessor
 
8051 microprocessor
8051 microprocessor8051 microprocessor
8051 microprocessor
 
Groupware
GroupwareGroupware
Groupware
 
Db
DbDb
Db
 
302 B+Tree Ind Hash
302 B+Tree Ind Hash302 B+Tree Ind Hash
302 B+Tree Ind Hash
 
storage media
storage mediastorage media
storage media
 
B Trees
B TreesB Trees
B Trees
 

Último

Q4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxQ4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxnelietumpap1
 
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
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
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
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
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.
 

Último (20)

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
 
Q4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxQ4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptx
 
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
 
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
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
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
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
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
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
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
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
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...
 

arithmetic ins in 8051

  • 2.
  • 3.
  • 4. Subtract Example : SUBB A, #0x4F ;A  A – 4F – C Notice that There is no subtraction WITHOUT borrow. Therefore, if a subtraction without borrow is desired, it is necessary to clear the C flag. Example : Clr c SUBB A, #0x4F ;A  A – 4F SUBB A, byte subtract with borrow
  • 5.
  • 6.
  • 7. Multiply When multiplying two 8-bit numbers, the size of the maximum product is 16-bits FF x FF = FE01 (255 x 255 = 65025) MUL AB ; BA  A * B Note : B gets the High byte A gets the Low byte
  • 8.
  • 9. Decimal Adjust DA a ; decimal adjust a Used to facilitate BCD addition. Adds “6” to either high or low nibble after an addition to create a valid BCD number. Example : mov a, #23h mov b, #29h add a, b; a  23h + 29h = 4Ch(wanted 52) DA a ; a  a + 6 = 52