SlideShare a Scribd company logo
1 of 13
Download to read offline

 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
1. Determine the 1’s complement of the smaller
number.
2. Add this to the larger number
3. 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
Direct Subtraction
1 1 1 1
1 0 1 0
1
0
1
0
1’s complement method
1 1 1 1
1’s complement 0 1 0 1
Carry 0
0
1
1 0
Add Carry 1
1
0
1
0

 Subtraction of a large number a smaller one by the
1’s complement method involves the following
steps
Subtraction Steps
1. Determine the 1’s complement of a large
number
2. Add this to the smaller number
3. The answer is the 1’s complement of the result
and is opposite in sign. There is no carry.

 The 2’s complement of a binary number can be
obtained by adding 1 to its 1’s complement.
2’s Complement Subtraction

 Subtraction of a smaller number from a larger one
by the 2’s complement method involves the
following steps
Steps
1. Determine the 2’s complement of the smaller
number
2. Add this to the larger number
3. Omit the carry ( there is always a carry in this case
)

Example of 2’s complement
Subtract (1010)2 from (1111) 2
Direct Subtraction
1 1 1 1
1 0 1 0
1
0
1
0
2’s complement method
1 1 1 1
2’s complement 0 1 1 0
Carry 1
0
1
1 0

 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
1. Determine the 2’s complement of the larger
number
2. Add the 2’s complement to the smaller number
3. There is no carry . The result is in 2’s
complement form is negative
4. To get an answer in true form, take the 2’s
complement and change the sign.

1’s Complement 2’s Complement
It can be easily obtained
using an Inverter
It has to be arrived at by first
obtaining the 1’s complement
and then adding one (1) to it
It requires two operations Only one arithmetic operation
is required
It is often used in logical
manipulations for inversion
operation
It is used only for arithmetic
applications
Comparison between 1’s and 2’s
complements

….. Thank You ……
The End

More Related Content

Similar to 1sand2scomplement.pdf

Binary Arithmetic
Binary ArithmeticBinary Arithmetic
Binary Arithmetic
gavhays
 
Integer Representation
Integer RepresentationInteger Representation
Integer Representation
gavhays
 
3.Fixed-Floating Point.ppt
3.Fixed-Floating Point.ppt3.Fixed-Floating Point.ppt
3.Fixed-Floating Point.ppt
RavikumarR77
 
Number system
Number systemNumber system
Number system
aviban
 
Alu1
Alu1Alu1

Similar to 1sand2scomplement.pdf (20)

unit-2_DL.pdf
unit-2_DL.pdfunit-2_DL.pdf
unit-2_DL.pdf
 
2's complement
2's complement2's complement
2's complement
 
Binary Arithmetic
Binary ArithmeticBinary Arithmetic
Binary Arithmetic
 
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
 
binary arithmetic rules
binary arithmetic rulesbinary arithmetic rules
binary arithmetic rules
 
L3 ARITHMETIC OPERATIONS.pptx
L3 ARITHMETIC OPERATIONS.pptxL3 ARITHMETIC OPERATIONS.pptx
L3 ARITHMETIC OPERATIONS.pptx
 
Integer Representation
Integer RepresentationInteger Representation
Integer Representation
 
CA UNIT II.pptx
CA UNIT II.pptxCA UNIT II.pptx
CA UNIT II.pptx
 
3.Fixed-Floating Point.ppt
3.Fixed-Floating Point.ppt3.Fixed-Floating Point.ppt
3.Fixed-Floating Point.ppt
 
Number system
Number systemNumber system
Number system
 
binary arithmetic conversion.pptx
binary arithmetic conversion.pptxbinary arithmetic conversion.pptx
binary arithmetic conversion.pptx
 
The number system
The number systemThe number system
The number system
 
B sc3 unit 2 number system
B sc3  unit 2 number systemB sc3  unit 2 number system
B sc3 unit 2 number system
 
Convertion of single precision
Convertion of single precisionConvertion of single precision
Convertion of single precision
 
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
 
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
 
Binaty Arithmetic and Binary coding schemes
Binaty Arithmetic and Binary coding schemesBinaty Arithmetic and Binary coding schemes
Binaty Arithmetic and Binary coding schemes
 
Alu1
Alu1Alu1
Alu1
 
ARITHMETIC FOR COMPUTERS
ARITHMETIC FOR COMPUTERS	  ARITHMETIC FOR COMPUTERS
ARITHMETIC FOR COMPUTERS
 
Kasthuri i bca
Kasthuri i bcaKasthuri i bca
Kasthuri i bca
 

Recently uploaded

Recently uploaded (20)

Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf arts
 
dusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learningdusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learning
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
 
Simple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdfSimple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdf
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
AIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptAIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.ppt
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 

1sand2scomplement.pdf

  • 1.
  • 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 1. Determine the 1’s complement of the smaller number. 2. Add this to the larger number 3. 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 Direct Subtraction 1 1 1 1 1 0 1 0 1 0 1 0 1’s complement method 1 1 1 1 1’s complement 0 1 0 1 Carry 0 0 1 1 0 Add Carry 1 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 1. Determine the 1’s complement of a large number 2. Add this to the smaller number 3. The answer is the 1’s complement of the result and is opposite in sign. There is no carry.
  • 8.   The 2’s complement of a binary number can be obtained by adding 1 to its 1’s complement. 2’s Complement Subtraction
  • 9.   Subtraction of a smaller number from a larger one by the 2’s complement method involves the following steps Steps 1. Determine the 2’s complement of the smaller number 2. Add this to the larger number 3. Omit the carry ( there is always a carry in this case )
  • 10.  Example of 2’s complement Subtract (1010)2 from (1111) 2 Direct Subtraction 1 1 1 1 1 0 1 0 1 0 1 0 2’s complement method 1 1 1 1 2’s complement 0 1 1 0 Carry 1 0 1 1 0
  • 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 1. Determine the 2’s complement of the larger number 2. Add the 2’s complement to the smaller number 3. There is no carry . The result is in 2’s complement form is negative 4. To get an answer in true form, take the 2’s complement and change the sign.
  • 12.  1’s Complement 2’s Complement It can be easily obtained using an Inverter It has to be arrived at by first obtaining the 1’s complement and then adding one (1) to it It requires two operations Only one arithmetic operation is required It is often used in logical manipulations for inversion operation It is used only for arithmetic applications Comparison between 1’s and 2’s complements
  • 13.  ….. Thank You …… The End