SlideShare a Scribd company logo
1’s and 2’s Complements
Subtraction of a number from another can be accomplished by adding the complement of the subtrahend to the minuend. Introduction
1’s Complement Subtraction Subtraction of binary numbers using the 1’s complement method allows subtraction only by addition.
The 1’s complement of a binary number can be obtained by changing all 1s to 0s and all 0s and 1s. Cont.,
To subtract a smaller number from a larger number, the 1’s complement method is as follows 1’s complement method Determine the 1’s complement of the smaller number.   Add this to the larger number  Remove the carry and add it to the result. This carry is called end-around-carry
Subtract (1010)2 from (1111)2 Example of 1’s complement 1’s complement method Direct Subtraction 1   1   1   1 1’s complement 0   1   0   1 1   1   1   1 1   0   1   0 Carry 0 0 1 1  0 1 0 1 0 1 Add Carry 1 0 1 0
Subtraction of a large number a smaller one by the 1’s complement method involves the following steps Subtraction Steps Determine the 1’s complement of  a large number Add this to the smaller number The answer is the 1’s complement of the result and is opposite in sign. There is no carry.
2’s Complement Subtraction The 2’s complement of a binary number can be obtained by adding 1 to its 1’s complement.
Subtraction of a smaller number from a larger one by the 2’s complement method involves the following steps Steps  Determine the 2’s complement of the smaller number  Add this to the larger number  Omit the carry ( there is always a carry in this case )
Example of 2’s complement Subtract (1010)2 from (1111)2 2’s complement method Direct Subtraction 1   1   1   1 1   1   1   1 0   1   1   0 2’s complement 1   0   1   0 1 1  0 0 1 0 Carry 1 0 1
The carry is discarded. Thus answer is (0101)2 The 2’s complement  method for subtraction of a large number from a smaller one is as follows. Subtraction Steps Determine the 2’s complement of the larger number Add the 2’s complement to the smaller number There is no carry . The result is in 2’s complement form is negative To get an answer in true form, take the 2’s complement and change the sign.
Comparison between 1’s and 2’s complements
….. Thank You …… The End

More Related Content

What's hot

Half adder & full adder
Half adder & full adderHalf adder & full adder
Half adder & full adder
Gaditek
 
Digital electronics
Digital electronicsDigital electronics
EC Binary Substraction using 1's Complement,2's Complement
EC Binary Substraction using 1's Complement,2's ComplementEC Binary Substraction using 1's Complement,2's Complement
EC Binary Substraction using 1's Complement,2's Complement
AmberSinghal1
 
Floating point representation
Floating point representationFloating point representation
Floating point representation
missstevenson01
 
STACKS IN DATASTRUCTURE
STACKS IN DATASTRUCTURESTACKS IN DATASTRUCTURE
STACKS IN DATASTRUCTURE
Archie Jamwal
 
Binary codes
Binary codesBinary codes
Binary codes
Revathi Subramaniam
 
binary arithmetic rules
binary arithmetic rulesbinary arithmetic rules
binary arithmetic rules
student
 
Data Representation
Data RepresentationData Representation
Data Representation
Dilum Bandara
 
PPT ON NUMBER SYSTEM
PPT ON NUMBER SYSTEMPPT ON NUMBER SYSTEM
PPT ON NUMBER SYSTEM
Rishabh Kanth
 
Binary codes
Binary codesBinary codes
Binary codes
GargiKhanna1
 
BINARY NUMBER SYSTEM
BINARY NUMBER SYSTEMBINARY NUMBER SYSTEM
BINARY NUMBER SYSTEM
Zaheer Abbasi
 
binary number system
 binary number system binary number system
binary number system
vishal gupta
 
Bcd
BcdBcd
Weighted and Non Weighted Codes
Weighted and Non Weighted CodesWeighted and Non Weighted Codes
Weighted and Non Weighted Codes
SubhamSatpathy2
 
Fixed point and floating-point numbers
Fixed point and  floating-point numbersFixed point and  floating-point numbers
Fixed point and floating-point numbers
MOHAN MOHAN
 
Decoder Full Presentation
Decoder Full Presentation Decoder Full Presentation
Decoder Full Presentation
Adeel Rasheed
 
Logic gates and NAND and NOR univarsal gates
Logic gates and NAND and NOR univarsal gatesLogic gates and NAND and NOR univarsal gates
Logic gates and NAND and NOR univarsal gates
Dhwanil Champaneria
 

What's hot (20)

Half adder & full adder
Half adder & full adderHalf adder & full adder
Half adder & full adder
 
Binary arithmetic
Binary arithmeticBinary arithmetic
Binary arithmetic
 
Binary true ppt
Binary true pptBinary true ppt
Binary true ppt
 
Digital electronics
Digital electronicsDigital electronics
Digital electronics
 
EC Binary Substraction using 1's Complement,2's Complement
EC Binary Substraction using 1's Complement,2's ComplementEC Binary Substraction using 1's Complement,2's Complement
EC Binary Substraction using 1's Complement,2's Complement
 
Floating point representation
Floating point representationFloating point representation
Floating point representation
 
STACKS IN DATASTRUCTURE
STACKS IN DATASTRUCTURESTACKS IN DATASTRUCTURE
STACKS IN DATASTRUCTURE
 
Binary codes
Binary codesBinary codes
Binary codes
 
binary arithmetic rules
binary arithmetic rulesbinary arithmetic rules
binary arithmetic rules
 
Data Representation
Data RepresentationData Representation
Data Representation
 
PPT ON NUMBER SYSTEM
PPT ON NUMBER SYSTEMPPT ON NUMBER SYSTEM
PPT ON NUMBER SYSTEM
 
Binary codes
Binary codesBinary codes
Binary codes
 
BINARY NUMBER SYSTEM
BINARY NUMBER SYSTEMBINARY NUMBER SYSTEM
BINARY NUMBER SYSTEM
 
Adder ppt
Adder pptAdder ppt
Adder ppt
 
binary number system
 binary number system binary number system
binary number system
 
Bcd
BcdBcd
Bcd
 
Weighted and Non Weighted Codes
Weighted and Non Weighted CodesWeighted and Non Weighted Codes
Weighted and Non Weighted Codes
 
Fixed point and floating-point numbers
Fixed point and  floating-point numbersFixed point and  floating-point numbers
Fixed point and floating-point numbers
 
Decoder Full Presentation
Decoder Full Presentation Decoder Full Presentation
Decoder Full Presentation
 
Logic gates and NAND and NOR univarsal gates
Logic gates and NAND and NOR univarsal gatesLogic gates and NAND and NOR univarsal gates
Logic gates and NAND and NOR univarsal gates
 

Similar to 1s and 2s complement

1sand2scomplement.pdf
1sand2scomplement.pdf1sand2scomplement.pdf
1sand2scomplement.pdf
Sathishkumar.V
 
1's and 2's complement.pptx
1's and 2's complement.pptx1's and 2's complement.pptx
1's and 2's complement.pptx
HKShab
 
1sand2scomplement r004
1sand2scomplement  r0041sand2scomplement  r004
1sand2scomplement r004
arunachalamr16
 
1sand2scomplement.pptx
1sand2scomplement.pptx1sand2scomplement.pptx
1sand2scomplement.pptx
HKShab
 
unit-2_DL.pdf
unit-2_DL.pdfunit-2_DL.pdf
unit-2_DL.pdf
ashoksahu64
 
Binary Arithmetic
Binary ArithmeticBinary Arithmetic
Binary Arithmetic
Meenakshi Paul
 
Arithmetic Logic
Arithmetic LogicArithmetic Logic
Arithmetic Logic
janani thirupathi
 
558196807-1-s-and-2-s-complement-Lecture-3.ppt
558196807-1-s-and-2-s-complement-Lecture-3.ppt558196807-1-s-and-2-s-complement-Lecture-3.ppt
558196807-1-s-and-2-s-complement-Lecture-3.ppt
EMMANUEL932242
 
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...
Arti Parab Academics
 
L3 ARITHMETIC OPERATIONS.pptx
L3 ARITHMETIC OPERATIONS.pptxL3 ARITHMETIC OPERATIONS.pptx
L3 ARITHMETIC OPERATIONS.pptx
Harish257692
 
Two’s complement
Two’s complementTwo’s complement
Two’s complement
mayannpolisticoLNU
 
B sc3 unit 2 number system
B sc3  unit 2 number systemB sc3  unit 2 number system
B sc3 unit 2 number system
MahiboobAliMulla
 
Number system
Number systemNumber system
Number systemaviban
 
B sc ii sem unit 2(a) ns
B sc ii sem  unit 2(a) nsB sc ii sem  unit 2(a) ns
B sc ii sem unit 2(a) ns
MahiboobAliMulla
 
Integer Representation
Integer RepresentationInteger Representation
Integer Representationgavhays
 
ch2.pdf
ch2.pdfch2.pdf
Binaty Arithmetic and Binary coding schemes
Binaty Arithmetic and Binary coding schemesBinaty Arithmetic and Binary coding schemes
Binaty Arithmetic and Binary coding schemes
Dr. Anita Goel
 
CA UNIT II.pptx
CA UNIT II.pptxCA UNIT II.pptx
CA UNIT II.pptx
ssuser9dbd7e
 
Digital logic design lecture 02
Digital logic design   lecture 02 Digital logic design   lecture 02
Digital logic design lecture 02
FarhatUllah27
 

Similar to 1s and 2s complement (20)

1sand2scomplement.pdf
1sand2scomplement.pdf1sand2scomplement.pdf
1sand2scomplement.pdf
 
1's and 2's complement.pptx
1's and 2's complement.pptx1's and 2's complement.pptx
1's and 2's complement.pptx
 
1sand2scomplement r004
1sand2scomplement  r0041sand2scomplement  r004
1sand2scomplement r004
 
1sand2scomplement.pptx
1sand2scomplement.pptx1sand2scomplement.pptx
1sand2scomplement.pptx
 
unit-2_DL.pdf
unit-2_DL.pdfunit-2_DL.pdf
unit-2_DL.pdf
 
Binary Arithmetic
Binary ArithmeticBinary Arithmetic
Binary Arithmetic
 
Arithmetic Logic
Arithmetic LogicArithmetic Logic
Arithmetic Logic
 
2's complement
2's complement2's complement
2's complement
 
558196807-1-s-and-2-s-complement-Lecture-3.ppt
558196807-1-s-and-2-s-complement-Lecture-3.ppt558196807-1-s-and-2-s-complement-Lecture-3.ppt
558196807-1-s-and-2-s-complement-Lecture-3.ppt
 
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...
 
L3 ARITHMETIC OPERATIONS.pptx
L3 ARITHMETIC OPERATIONS.pptxL3 ARITHMETIC OPERATIONS.pptx
L3 ARITHMETIC OPERATIONS.pptx
 
Two’s complement
Two’s complementTwo’s complement
Two’s complement
 
B sc3 unit 2 number system
B sc3  unit 2 number systemB sc3  unit 2 number system
B sc3 unit 2 number system
 
Number system
Number systemNumber system
Number system
 
B sc ii sem unit 2(a) ns
B sc ii sem  unit 2(a) nsB sc ii sem  unit 2(a) ns
B sc ii sem unit 2(a) ns
 
Integer Representation
Integer RepresentationInteger Representation
Integer Representation
 
ch2.pdf
ch2.pdfch2.pdf
ch2.pdf
 
Binaty Arithmetic and Binary coding schemes
Binaty Arithmetic and Binary coding schemesBinaty Arithmetic and Binary coding schemes
Binaty Arithmetic and Binary coding schemes
 
CA UNIT II.pptx
CA UNIT II.pptxCA UNIT II.pptx
CA UNIT II.pptx
 
Digital logic design lecture 02
Digital logic design   lecture 02 Digital logic design   lecture 02
Digital logic design lecture 02
 

More from Then Murugeshwari

Traffic safety
Traffic safetyTraffic safety
Traffic safety
Then Murugeshwari
 
P h indicators
P h indicatorsP h indicators
P h indicators
Then Murugeshwari
 
Avogadro's law
Avogadro's lawAvogadro's law
Avogadro's law
Then Murugeshwari
 
Resonance
ResonanceResonance
Microwave remote sensing
Microwave remote sensingMicrowave remote sensing
Microwave remote sensing
Then Murugeshwari
 
Newton's law
Newton's lawNewton's law
Newton's law
Then Murugeshwari
 
Surface tension
Surface tensionSurface tension
Surface tension
Then Murugeshwari
 
Hook's law
Hook's lawHook's law
Hook's law
Then Murugeshwari
 
Hook's law
Hook's lawHook's law
Hook's law
Then Murugeshwari
 
ERP components
ERP componentsERP components
ERP components
Then Murugeshwari
 
Database fundamentals
Database fundamentalsDatabase fundamentals
Database fundamentals
Then Murugeshwari
 
Mosfet
MosfetMosfet
Operators
OperatorsOperators
Hiperlan
HiperlanHiperlan
Bluetooth profile
Bluetooth profileBluetooth profile
Bluetooth profile
Then Murugeshwari
 
Router
RouterRouter
Operators in java
Operators in javaOperators in java
Operators in java
Then Murugeshwari
 
Thread priorities
Thread prioritiesThread priorities
Thread priorities
Then Murugeshwari
 
Threads
ThreadsThreads
Identifiers
Identifiers Identifiers
Identifiers
Then Murugeshwari
 

More from Then Murugeshwari (20)

Traffic safety
Traffic safetyTraffic safety
Traffic safety
 
P h indicators
P h indicatorsP h indicators
P h indicators
 
Avogadro's law
Avogadro's lawAvogadro's law
Avogadro's law
 
Resonance
ResonanceResonance
Resonance
 
Microwave remote sensing
Microwave remote sensingMicrowave remote sensing
Microwave remote sensing
 
Newton's law
Newton's lawNewton's law
Newton's law
 
Surface tension
Surface tensionSurface tension
Surface tension
 
Hook's law
Hook's lawHook's law
Hook's law
 
Hook's law
Hook's lawHook's law
Hook's law
 
ERP components
ERP componentsERP components
ERP components
 
Database fundamentals
Database fundamentalsDatabase fundamentals
Database fundamentals
 
Mosfet
MosfetMosfet
Mosfet
 
Operators
OperatorsOperators
Operators
 
Hiperlan
HiperlanHiperlan
Hiperlan
 
Bluetooth profile
Bluetooth profileBluetooth profile
Bluetooth profile
 
Router
RouterRouter
Router
 
Operators in java
Operators in javaOperators in java
Operators in java
 
Thread priorities
Thread prioritiesThread priorities
Thread priorities
 
Threads
ThreadsThreads
Threads
 
Identifiers
Identifiers Identifiers
Identifiers
 

1s and 2s complement

  • 1. 1’s and 2’s Complements
  • 2. Subtraction of a number from another can be accomplished by adding the complement of the subtrahend to the minuend. Introduction
  • 3. 1’s Complement Subtraction Subtraction of binary numbers using the 1’s complement method allows subtraction only by addition.
  • 4. The 1’s complement of a binary number can be obtained by changing all 1s to 0s and all 0s and 1s. Cont.,
  • 5. To subtract a smaller number from a larger number, the 1’s complement method is as follows 1’s complement method Determine the 1’s complement of the smaller number. Add this to the larger number Remove the carry and add it to the result. This carry is called end-around-carry
  • 6. Subtract (1010)2 from (1111)2 Example of 1’s complement 1’s complement method Direct Subtraction 1 1 1 1 1’s complement 0 1 0 1 1 1 1 1 1 0 1 0 Carry 0 0 1 1 0 1 0 1 0 1 Add Carry 1 0 1 0
  • 7. Subtraction of a large number a smaller one by the 1’s complement method involves the following steps Subtraction Steps Determine the 1’s complement of a large number Add this to the smaller number The answer is the 1’s complement of the result and is opposite in sign. There is no carry.
  • 8. 2’s Complement Subtraction The 2’s complement of a binary number can be obtained by adding 1 to its 1’s complement.
  • 9. Subtraction of a smaller number from a larger one by the 2’s complement method involves the following steps Steps Determine the 2’s complement of the smaller number Add this to the larger number Omit the carry ( there is always a carry in this case )
  • 10. Example of 2’s complement Subtract (1010)2 from (1111)2 2’s complement method Direct Subtraction 1 1 1 1 1 1 1 1 0 1 1 0 2’s complement 1 0 1 0 1 1 0 0 1 0 Carry 1 0 1
  • 11. The carry is discarded. Thus answer is (0101)2 The 2’s complement method for subtraction of a large number from a smaller one is as follows. Subtraction Steps Determine the 2’s complement of the larger number Add the 2’s complement to the smaller number There is no carry . The result is in 2’s complement form is negative To get an answer in true form, take the 2’s complement and change the sign.
  • 12. Comparison between 1’s and 2’s complements
  • 13. ….. Thank You …… The End