SlideShare a Scribd company logo
1 of 23
LECTURE - 3
 Binary Addition
 Binary Subtraction
 Complements
1’s Complement
2’s Complement
 Subtraction Using Complements
BASIC OPERATIONS
 ADDITION
 SUBTRACTION
 MULTIPLICATION
 DIVISION
COMPUTER OPERATIONS
 BINARY ADDITION
 BINARY SUBTRACTION
The First Computer
• Covered a whole Room
• Separate Functions for Adding,
Subtracting, Multiplication and Division
ELIMINATION OF OPERATIONS
 MULTIPLICATION and DIVISION were eliminated
 MULTIPLICATION :
repeated addition
(2 x 4 = 8) , (2+ 2+ 2 + 2 = 8)
 DIVISION :
repeated subtractions
TODAY’S COMPUTER
 Computations
Addition – (ADDERS)
Subtraction – (SUBTRACTORS)
BINARY ADDITION
LOGIC:
0 + 0 = 0
0 + 1 = 1
1 + 0 = 1
1 + 1 = 0 (1 Carry)
EXAMPLE
1 0 0 1 1 0
+ 1 1 0 1 0 1
1 0 1 1 0 1 1
Carry
BINARY SUBTRACTION
LOGIC:
0 - 0 = 0
0 - 1 = 1 ( Borrow 1)
1 - 0 = 1
1 - 1 = 0
EXAMPLE
1 1 0 1 0 1
- 0 1 1 0 1 0
0 1 1 0 1 1
COMPLEMENTS
2 types:
 1’s Complement
 2’s Complement
1’s COMPLEMENT
PROCEDURE
 Change every 0 to 1 and every 1 to 0
EXAMPLE
Find 1’s Complement of:
( 1 1 0 0 1 0 1 0 )2
2’s COMPLEMENT
PROCEDURE
1. Find 1’s Complement:
Change every 0 to 1 and every 1 to 0
2. Add 1 to L.S.B
EXAMPLE
Find 2’s Complement of :
( 1 1 0 1 0 1 0 )2
SOLUTION : ( 1 1 0 1 0 1 0 )2
STEP 1
0 0 1 0 1 0 1
STEP 2
0 0 1 0 1 0 1
+ 1
0 0 1 0 1 1 0 LSB
SUBTRACTION USING COMPLEMENTS
SUBTRACTION
 MINUEND (1st value)
 SUBTRAHEND (2nd value)
SUBTRACTION USING 1’S
COMPLEMENT
STEP 1
Take 1’s Complement of Subtrahend
STEP 2
Add the result to Minuend
STEP 3
Look for end Carry.
END CARRY
 If Carry Exists:
Add the carry to LSB of result
 If NO Carry:
Take 1’s complement of result
again and
place a –ve sign
EXAMPLE
Subtract: ( 1 1 0 1 0 1 1 - 1 0 1 1 0 1 )2
SOLUTION
Minuend: 1 1 0 1 0 1 1
Subtrahend: 0 1 0 1 1 0 1
STEP 1 1’s Complement of Subtrahend
1 0 1 0 0 1 0
STEP 2 Add to Minuend
STEP 3 Add end carry to LSB of result.
SUBTRACTION USING 2’S
COMPLEMENT
 STEP 1
Take 2’s Complement of Subtrahend
 STEP 2
Add the result to Minuend
 STEP 3
Look for end Carry.
END CARRY
 If Carry Exists:
Drop it
 If NO Carry:
 Take 2’s complement of result again and
 place a –ve sign
EXAMPLE
Subtract: ( 1 1 0 1 0 1 1 - 1 0 1 1 0 1 )2
ADVANTAGE OF
COMPLEMENTS
 It Converts Subtraction Process to Addition
 Thus, the need for a Subtractor is Eliminated

More Related Content

What's hot

Germany population keynote
Germany population keynoteGermany population keynote
Germany population keynote
Evan Franz
 
Csc1401 lecture03 - computer arithmetic - arithmetic and logic unit (alu)
Csc1401   lecture03 - computer arithmetic - arithmetic and logic unit (alu)Csc1401   lecture03 - computer arithmetic - arithmetic and logic unit (alu)
Csc1401 lecture03 - computer arithmetic - arithmetic and logic unit (alu)
IIUM
 
Chapter 05 computer arithmetic
Chapter 05 computer arithmeticChapter 05 computer arithmetic
Chapter 05 computer arithmetic
IIUI
 
Tutorial 1 : SIGNIFICANT FIGURES AND STANDARD FORM
Tutorial 1 : SIGNIFICANT FIGURES AND STANDARD FORMTutorial 1 : SIGNIFICANT FIGURES AND STANDARD FORM
Tutorial 1 : SIGNIFICANT FIGURES AND STANDARD FORM
Nurul Ainn
 
8th alg -l8.3
8th alg -l8.38th alg -l8.3
8th alg -l8.3
jdurst65
 

What's hot (19)

Arithmetic circuits
Arithmetic circuitsArithmetic circuits
Arithmetic circuits
 
computer arithmatic
computer arithmaticcomputer arithmatic
computer arithmatic
 
Germany population keynote
Germany population keynoteGermany population keynote
Germany population keynote
 
6 2 magnitudecomparator ibit and 2 bit converted
6 2 magnitudecomparator ibit and 2 bit converted6 2 magnitudecomparator ibit and 2 bit converted
6 2 magnitudecomparator ibit and 2 bit converted
 
Floating point arithmetic operations (1)
Floating point arithmetic operations (1)Floating point arithmetic operations (1)
Floating point arithmetic operations (1)
 
Csc1401 lecture03 - computer arithmetic - arithmetic and logic unit (alu)
Csc1401   lecture03 - computer arithmetic - arithmetic and logic unit (alu)Csc1401   lecture03 - computer arithmetic - arithmetic and logic unit (alu)
Csc1401 lecture03 - computer arithmetic - arithmetic and logic unit (alu)
 
Integer represention
Integer representionInteger represention
Integer represention
 
Arithmetic Operations
Arithmetic OperationsArithmetic Operations
Arithmetic Operations
 
Lec20
Lec20Lec20
Lec20
 
Lecture 3 time complexity
Lecture 3 time complexityLecture 3 time complexity
Lecture 3 time complexity
 
Magnitude comparator
Magnitude comparatorMagnitude comparator
Magnitude comparator
 
Ch03pp
Ch03ppCh03pp
Ch03pp
 
Computer arithmetic
Computer arithmeticComputer arithmetic
Computer arithmetic
 
010 lesson 2
010 lesson 2010 lesson 2
010 lesson 2
 
Chapter 05 computer arithmetic
Chapter 05 computer arithmeticChapter 05 computer arithmetic
Chapter 05 computer arithmetic
 
Applications of calculus in commerce and economics
Applications of calculus in commerce and economicsApplications of calculus in commerce and economics
Applications of calculus in commerce and economics
 
Applications of calculus in commerce and economics ii
Applications of calculus in commerce and economics ii Applications of calculus in commerce and economics ii
Applications of calculus in commerce and economics ii
 
Tutorial 1 : SIGNIFICANT FIGURES AND STANDARD FORM
Tutorial 1 : SIGNIFICANT FIGURES AND STANDARD FORMTutorial 1 : SIGNIFICANT FIGURES AND STANDARD FORM
Tutorial 1 : SIGNIFICANT FIGURES AND STANDARD FORM
 
8th alg -l8.3
8th alg -l8.38th alg -l8.3
8th alg -l8.3
 

Similar to 1's and 2's Complements

Binary Arithmetic
Binary ArithmeticBinary Arithmetic
Binary Arithmetic
gavhays
 
Arithmetic Unit Addition Subtraction Multiplication and Division
Arithmetic Unit Addition Subtraction Multiplication and DivisionArithmetic Unit Addition Subtraction Multiplication and Division
Arithmetic Unit Addition Subtraction Multiplication and Division
RNShukla7
 
Computer organization and architecture lab manual
Computer organization and architecture lab manual Computer organization and architecture lab manual
Computer organization and architecture lab manual
Shankar Gangaju
 
ece552_08_integer_multiply.ppt
ece552_08_integer_multiply.pptece552_08_integer_multiply.ppt
ece552_08_integer_multiply.ppt
AnalBhandari
 

Similar to 1's and 2's Complements (20)

Binary Arithmetic
Binary ArithmeticBinary Arithmetic
Binary Arithmetic
 
05 multiply divide
05 multiply divide05 multiply divide
05 multiply divide
 
Binary Arithmetic
Binary ArithmeticBinary Arithmetic
Binary Arithmetic
 
binary arithmetic conversion.pptx
binary arithmetic conversion.pptxbinary arithmetic conversion.pptx
binary arithmetic conversion.pptx
 
CA UNIT II.pptx
CA UNIT II.pptxCA UNIT II.pptx
CA UNIT II.pptx
 
Arithmetic Unit Addition Subtraction Multiplication and Division
Arithmetic Unit Addition Subtraction Multiplication and DivisionArithmetic Unit Addition Subtraction Multiplication and Division
Arithmetic Unit Addition Subtraction Multiplication and Division
 
Computer organization and architecture lab manual
Computer organization and architecture lab manual Computer organization and architecture lab manual
Computer organization and architecture lab manual
 
Comp Arithmetic Basic.ppt
Comp Arithmetic Basic.pptComp Arithmetic Basic.ppt
Comp Arithmetic Basic.ppt
 
Program design techniques
Program design techniquesProgram design techniques
Program design techniques
 
Digital Logic & Design (DLD) presentation
Digital Logic & Design (DLD) presentationDigital Logic & Design (DLD) presentation
Digital Logic & Design (DLD) presentation
 
Unsigned multiplication
Unsigned multiplicationUnsigned multiplication
Unsigned multiplication
 
105_2_digitalSystem_Chap_3_part_3.ppt
105_2_digitalSystem_Chap_3_part_3.ppt105_2_digitalSystem_Chap_3_part_3.ppt
105_2_digitalSystem_Chap_3_part_3.ppt
 
Encoding Schemes for Multipliers
Encoding Schemes for MultipliersEncoding Schemes for Multipliers
Encoding Schemes for Multipliers
 
FYBSC IT Digital Electronics Unit I Chapter II Number System and Binary Arith...
FYBSC IT Digital Electronics Unit I Chapter II Number System and Binary Arith...FYBSC IT Digital Electronics Unit I Chapter II Number System and Binary Arith...
FYBSC IT Digital Electronics Unit I Chapter II Number System and Binary Arith...
 
1s and 2s complement
1s and 2s complement1s and 2s complement
1s and 2s complement
 
ece552_08_integer_multiply.ppt
ece552_08_integer_multiply.pptece552_08_integer_multiply.ppt
ece552_08_integer_multiply.ppt
 
ece552_08_integer_multiply.ppt
ece552_08_integer_multiply.pptece552_08_integer_multiply.ppt
ece552_08_integer_multiply.ppt
 
ece552_08_integer_multiply.ppt
ece552_08_integer_multiply.pptece552_08_integer_multiply.ppt
ece552_08_integer_multiply.ppt
 
1sand2scomplement.pdf
1sand2scomplement.pdf1sand2scomplement.pdf
1sand2scomplement.pdf
 
3810-08.ppt
3810-08.ppt3810-08.ppt
3810-08.ppt
 

More from ZareenRauf1

More from ZareenRauf1 (13)

Communication system lec 8
Communication system lec 8Communication system lec 8
Communication system lec 8
 
Communication system lec7
Communication system lec7Communication system lec7
Communication system lec7
 
Communication system lec6
Communication system  lec6Communication system  lec6
Communication system lec6
 
Communication system lec5
Communication system  lec5Communication system  lec5
Communication system lec5
 
communication system lec4
communication system lec4 communication system lec4
communication system lec4
 
communication system lec3
 communication system lec3 communication system lec3
communication system lec3
 
communication system lec2
 communication system lec2 communication system lec2
communication system lec2
 
Communication system
Communication systemCommunication system
Communication system
 
Boolean algebra and logic gates
Boolean algebra and logic gatesBoolean algebra and logic gates
Boolean algebra and logic gates
 
Binary codes
Binary codesBinary codes
Binary codes
 
Boolean functions
Boolean functionsBoolean functions
Boolean functions
 
Lecture 2
Lecture 2Lecture 2
Lecture 2
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
 

Recently uploaded

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
dollysharma2066
 
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
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
MsecMca
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
Epec Engineered Technologies
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Kandungan 087776558899
 

Recently uploaded (20)

Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
 
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
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
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
 
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
 
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
 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
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...
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 

1's and 2's Complements