SlideShare a Scribd company logo
1 of 11
Based on slides by:Charles Kime & Thomas Kaminski
© 2004 Pearson Education, Inc.
ECE/CS 352: Digital System Fundamentals
Lecture 3 – Binary
Arithmetic
Chapter 1 2
Outline
 Single Bit Addition with Carry
 Multiple Bit Addition
 Single Bit Subtraction with Borrow
 Multiple Bit Subtraction
 Multiplication
Chapter 1 3
Single Bit Binary Addition with Carry
Given two binary digits (X,Y), a carry in (Z) we get the
following sum (S) and carry (C):
Carry in (Z) of 0:
Carry in (Z) of 1: Z 1 1 1 1
X 0 0 1 1
+ Y + 0 + 1 + 0 + 1
C S 0 1 1 0 1 0 1 1
Z 0 0 0 0
X 0 0 1 1
+ Y + 0 + 1 + 0 + 1
C S 0 0 0 1 0 1 1 0
Chapter 1 4
 Extending this to a multiple bit
examples:
Multiple Bit Binary Addition
0
0
0
0
0
1
1
0
0
0
0
1
0
1
1
1
Carries
Augend
Addend
Sum
0
0
1
1
Chapter 1 5
 Extending this to a multiple bit
examples:
Multiple Bit Binary Addition
0
1
1
0
1
1
0
1
1
1
0
1
0
1
1
0
Carries
Augend
Addend
Sum
0
0
1
1
1
Chapter 1 6
 Given two binary digits (X,Y), a borrow in (Z) we
get the following difference (S) and borrow (B):
 Borrow in (Z) of 0:
 Borrow in (Z) of 1:
Single Bit Binary Subtraction with Borrow
Z 1 1 1 1
X 0 0 1 1
- Y -0 -1 -0 -1
BS 11 1 0 0 0 1 1
Z 0 0 0 0
X 0 0 1 1
- Y -0 -1 -0 -1
BS 0 0 1 1 0 1 0 0
Chapter 1 7
 Extending this to a multiple bit example:
 Notes:
• The 0 is a Borrow-In to the least significant bit.
• If the Subtrahend > the Minuend, interchange and append a – to the
result.
Multiple Bit Binary Subtraction
0
0
0
0
1
1
0
1
1
0
0
1
0
1
0
0
Borrows
Minuend
Subtrahend
Difference
0
0
0
0
Chapter 1 8
 Extending this to a multiple bit examples:
 Notes: The 0 is a Borrow-In to the least significant
bit. If the Subtrahend > the Minuend, interchange
and append a – to the result.
Multiple Bit Binary Subtraction
1
1
0
0
1
1
0
1
1
0
0
1
1
0
0
0
Borrows
Minuend
Subtrahend
Difference
0
0
1
1
Chapter 1 9
Binary Multiplication
The binary multiplication table is simple:
0  0 = 0 | 1  0 = 0 | 0  1 = 0 | 1  1 = 1
Extending multiplication to multiple digits:
Multiplicand 1011
Multiplier x 101
Partial Products 1011
0000 -
1011 - -
Product 110111
Chapter 1 10
Summary
 Single Bit Addition with Carry
 Multiple Bit Addition
 Single Bit Subtraction with Borrow
 Multiple Bit Subtraction
 Multiplication
Chapter 1 11
Terms of Use
 © 2004 by Pearson Education,Inc. All rights reserved.
 The following terms of use apply in addition to the standard
Pearson Education Legal Notice.
 Permission is given to incorporate these materials into classroom
presentations and handouts only to instructors adopting Logic and
Computer Design Fundamentals as the course text.
 Permission is granted to the instructors adopting the book to post
these materials on a protected website or protected ftp site in
original or modified form. All other website or ftp postings,
including those offering the materials for a fee, are prohibited.
 You may not remove or in any way alter this Terms of Use notice
or any trademark, copyright, or other proprietary notice,
including the copyright watermark on each slide.
 Return to Title Page

More Related Content

Similar to lec03_binary_arithmetic lecture solution

Binary Arithmetic
Binary ArithmeticBinary Arithmetic
Binary Arithmetic
gavhays
 
2.1 data represent on cpu
2.1 data represent on cpu2.1 data represent on cpu
2.1 data represent on cpu
Wan Afirah
 
100_2_digitalSystem_Chap1 (2).ppt
100_2_digitalSystem_Chap1 (2).ppt100_2_digitalSystem_Chap1 (2).ppt
100_2_digitalSystem_Chap1 (2).ppt
namraashraf56
 

Similar to lec03_binary_arithmetic lecture solution (20)

Number codes
Number codesNumber codes
Number codes
 
LOGIC GATES - SARTHAK YADAV
LOGIC GATES - SARTHAK YADAVLOGIC GATES - SARTHAK YADAV
LOGIC GATES - SARTHAK YADAV
 
Binary Arithmetic
Binary ArithmeticBinary Arithmetic
Binary Arithmetic
 
Number system
Number systemNumber system
Number system
 
Number system
Number systemNumber system
Number system
 
Number codes students
Number codes studentsNumber codes students
Number codes students
 
Number system arithmetic
Number system arithmetic Number system arithmetic
Number system arithmetic
 
Number system
Number systemNumber system
Number system
 
binary arithmetic conversion.pptx
binary arithmetic conversion.pptxbinary arithmetic conversion.pptx
binary arithmetic conversion.pptx
 
2.1 data represent on cpu
2.1 data represent on cpu2.1 data represent on cpu
2.1 data represent on cpu
 
Digital logic mohammed salim ch2
Digital logic mohammed salim ch2Digital logic mohammed salim ch2
Digital logic mohammed salim ch2
 
number system
number systemnumber system
number system
 
Lecture set 3
Lecture set 3Lecture set 3
Lecture set 3
 
Binary Arithmetic Operations
Binary Arithmetic OperationsBinary Arithmetic Operations
Binary Arithmetic Operations
 
Binary coded decimal r004
Binary coded decimal   r004Binary coded decimal   r004
Binary coded decimal r004
 
100_2_digitalSystem_Chap1 (2).ppt
100_2_digitalSystem_Chap1 (2).ppt100_2_digitalSystem_Chap1 (2).ppt
100_2_digitalSystem_Chap1 (2).ppt
 
Logic Design 2009
Logic Design 2009Logic Design 2009
Logic Design 2009
 
Digital Logic
Digital LogicDigital Logic
Digital Logic
 
Comp Arithmetic Basic.ppt
Comp Arithmetic Basic.pptComp Arithmetic Basic.ppt
Comp Arithmetic Basic.ppt
 
Chapter_02_The_Language_of_Bits_Any.pptx
Chapter_02_The_Language_of_Bits_Any.pptxChapter_02_The_Language_of_Bits_Any.pptx
Chapter_02_The_Language_of_Bits_Any.pptx
 

Recently uploaded

01-vogelsanger-stanag-4178-ed-2-the-new-nato-standard-for-nitrocellulose-test...
01-vogelsanger-stanag-4178-ed-2-the-new-nato-standard-for-nitrocellulose-test...01-vogelsanger-stanag-4178-ed-2-the-new-nato-standard-for-nitrocellulose-test...
01-vogelsanger-stanag-4178-ed-2-the-new-nato-standard-for-nitrocellulose-test...
AshwaniAnuragi1
 
一比一原版(Griffith毕业证书)格里菲斯大学毕业证成绩单学位证书
一比一原版(Griffith毕业证书)格里菲斯大学毕业证成绩单学位证书一比一原版(Griffith毕业证书)格里菲斯大学毕业证成绩单学位证书
一比一原版(Griffith毕业证书)格里菲斯大学毕业证成绩单学位证书
c3384a92eb32
 

Recently uploaded (20)

History of Indian Railways - the story of Growth & Modernization
History of Indian Railways - the story of Growth & ModernizationHistory of Indian Railways - the story of Growth & Modernization
History of Indian Railways - the story of Growth & Modernization
 
Geometric constructions Engineering Drawing.pdf
Geometric constructions Engineering Drawing.pdfGeometric constructions Engineering Drawing.pdf
Geometric constructions Engineering Drawing.pdf
 
DBMS-Report on Student management system.pptx
DBMS-Report on Student management system.pptxDBMS-Report on Student management system.pptx
DBMS-Report on Student management system.pptx
 
8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...
 
UNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptxUNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptx
 
Filters for Electromagnetic Compatibility Applications
Filters for Electromagnetic Compatibility ApplicationsFilters for Electromagnetic Compatibility Applications
Filters for Electromagnetic Compatibility Applications
 
Presentation on Slab, Beam, Column, and Foundation/Footing
Presentation on Slab,  Beam, Column, and Foundation/FootingPresentation on Slab,  Beam, Column, and Foundation/Footing
Presentation on Slab, Beam, Column, and Foundation/Footing
 
What is Coordinate Measuring Machine? CMM Types, Features, Functions
What is Coordinate Measuring Machine? CMM Types, Features, FunctionsWhat is Coordinate Measuring Machine? CMM Types, Features, Functions
What is Coordinate Measuring Machine? CMM Types, Features, Functions
 
Call for Papers - Journal of Electrical Systems (JES), E-ISSN: 1112-5209, ind...
Call for Papers - Journal of Electrical Systems (JES), E-ISSN: 1112-5209, ind...Call for Papers - Journal of Electrical Systems (JES), E-ISSN: 1112-5209, ind...
Call for Papers - Journal of Electrical Systems (JES), E-ISSN: 1112-5209, ind...
 
01-vogelsanger-stanag-4178-ed-2-the-new-nato-standard-for-nitrocellulose-test...
01-vogelsanger-stanag-4178-ed-2-the-new-nato-standard-for-nitrocellulose-test...01-vogelsanger-stanag-4178-ed-2-the-new-nato-standard-for-nitrocellulose-test...
01-vogelsanger-stanag-4178-ed-2-the-new-nato-standard-for-nitrocellulose-test...
 
Passive Air Cooling System and Solar Water Heater.ppt
Passive Air Cooling System and Solar Water Heater.pptPassive Air Cooling System and Solar Water Heater.ppt
Passive Air Cooling System and Solar Water Heater.ppt
 
Independent Solar-Powered Electric Vehicle Charging Station
Independent Solar-Powered Electric Vehicle Charging StationIndependent Solar-Powered Electric Vehicle Charging Station
Independent Solar-Powered Electric Vehicle Charging Station
 
Path loss model, OKUMURA Model, Hata Model
Path loss model, OKUMURA Model, Hata ModelPath loss model, OKUMURA Model, Hata Model
Path loss model, OKUMURA Model, Hata Model
 
Diploma Engineering Drawing Qp-2024 Ece .pdf
Diploma Engineering Drawing Qp-2024 Ece .pdfDiploma Engineering Drawing Qp-2024 Ece .pdf
Diploma Engineering Drawing Qp-2024 Ece .pdf
 
Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)
 
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
 
Max. shear stress theory-Maximum Shear Stress Theory ​ Maximum Distortional ...
Max. shear stress theory-Maximum Shear Stress Theory ​  Maximum Distortional ...Max. shear stress theory-Maximum Shear Stress Theory ​  Maximum Distortional ...
Max. shear stress theory-Maximum Shear Stress Theory ​ Maximum Distortional ...
 
NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...
NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...
NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...
 
Databricks Generative AI Fundamentals .pdf
Databricks Generative AI Fundamentals  .pdfDatabricks Generative AI Fundamentals  .pdf
Databricks Generative AI Fundamentals .pdf
 
一比一原版(Griffith毕业证书)格里菲斯大学毕业证成绩单学位证书
一比一原版(Griffith毕业证书)格里菲斯大学毕业证成绩单学位证书一比一原版(Griffith毕业证书)格里菲斯大学毕业证成绩单学位证书
一比一原版(Griffith毕业证书)格里菲斯大学毕业证成绩单学位证书
 

lec03_binary_arithmetic lecture solution

  • 1. Based on slides by:Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. ECE/CS 352: Digital System Fundamentals Lecture 3 – Binary Arithmetic
  • 2. Chapter 1 2 Outline  Single Bit Addition with Carry  Multiple Bit Addition  Single Bit Subtraction with Borrow  Multiple Bit Subtraction  Multiplication
  • 3. Chapter 1 3 Single Bit Binary Addition with Carry Given two binary digits (X,Y), a carry in (Z) we get the following sum (S) and carry (C): Carry in (Z) of 0: Carry in (Z) of 1: Z 1 1 1 1 X 0 0 1 1 + Y + 0 + 1 + 0 + 1 C S 0 1 1 0 1 0 1 1 Z 0 0 0 0 X 0 0 1 1 + Y + 0 + 1 + 0 + 1 C S 0 0 0 1 0 1 1 0
  • 4. Chapter 1 4  Extending this to a multiple bit examples: Multiple Bit Binary Addition 0 0 0 0 0 1 1 0 0 0 0 1 0 1 1 1 Carries Augend Addend Sum 0 0 1 1
  • 5. Chapter 1 5  Extending this to a multiple bit examples: Multiple Bit Binary Addition 0 1 1 0 1 1 0 1 1 1 0 1 0 1 1 0 Carries Augend Addend Sum 0 0 1 1 1
  • 6. Chapter 1 6  Given two binary digits (X,Y), a borrow in (Z) we get the following difference (S) and borrow (B):  Borrow in (Z) of 0:  Borrow in (Z) of 1: Single Bit Binary Subtraction with Borrow Z 1 1 1 1 X 0 0 1 1 - Y -0 -1 -0 -1 BS 11 1 0 0 0 1 1 Z 0 0 0 0 X 0 0 1 1 - Y -0 -1 -0 -1 BS 0 0 1 1 0 1 0 0
  • 7. Chapter 1 7  Extending this to a multiple bit example:  Notes: • The 0 is a Borrow-In to the least significant bit. • If the Subtrahend > the Minuend, interchange and append a – to the result. Multiple Bit Binary Subtraction 0 0 0 0 1 1 0 1 1 0 0 1 0 1 0 0 Borrows Minuend Subtrahend Difference 0 0 0 0
  • 8. Chapter 1 8  Extending this to a multiple bit examples:  Notes: The 0 is a Borrow-In to the least significant bit. If the Subtrahend > the Minuend, interchange and append a – to the result. Multiple Bit Binary Subtraction 1 1 0 0 1 1 0 1 1 0 0 1 1 0 0 0 Borrows Minuend Subtrahend Difference 0 0 1 1
  • 9. Chapter 1 9 Binary Multiplication The binary multiplication table is simple: 0  0 = 0 | 1  0 = 0 | 0  1 = 0 | 1  1 = 1 Extending multiplication to multiple digits: Multiplicand 1011 Multiplier x 101 Partial Products 1011 0000 - 1011 - - Product 110111
  • 10. Chapter 1 10 Summary  Single Bit Addition with Carry  Multiple Bit Addition  Single Bit Subtraction with Borrow  Multiple Bit Subtraction  Multiplication
  • 11. Chapter 1 11 Terms of Use  © 2004 by Pearson Education,Inc. All rights reserved.  The following terms of use apply in addition to the standard Pearson Education Legal Notice.  Permission is given to incorporate these materials into classroom presentations and handouts only to instructors adopting Logic and Computer Design Fundamentals as the course text.  Permission is granted to the instructors adopting the book to post these materials on a protected website or protected ftp site in original or modified form. All other website or ftp postings, including those offering the materials for a fee, are prohibited.  You may not remove or in any way alter this Terms of Use notice or any trademark, copyright, or other proprietary notice, including the copyright watermark on each slide.  Return to Title Page