0% found this document useful (0 votes)
6 views

CH-1.7 Binary Addition - Subtraction

The document covers the principles of binary addition and subtraction, detailing the rules and methods for each operation. It explains binary addition rules, binary subtraction rules, and provides methods for subtraction using 1's and 2's complement. Examples are included to illustrate the application of these methods in binary calculations.

Uploaded by

goj jgt
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

CH-1.7 Binary Addition - Subtraction

The document covers the principles of binary addition and subtraction, detailing the rules and methods for each operation. It explains binary addition rules, binary subtraction rules, and provides methods for subtraction using 1's and 2's complement. Examples are included to illustrate the application of these methods in binary calculations.

Uploaded by

goj jgt
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

STES’s Sinhgad College of Science,

Ambegaon(BK), Pune-41
Principles of Digital
Electronics
Chapter-1: Number System
Topic: Binary Addition & Subtraction
By: Mr. Prashil D. Deshmukh (Assistant Professor in Electronics)

Prepared by Mr. Prashil Deshmukh 1


Topic covered
• Rules of binary addition.
• Rules of binary subtraction.
• Subtraction using 1’s compliment method.
• Subtraction using 2’s compliment method.

Mr. Prashil Deshmukh 2


A] Binary Addition:
• The laws of binary addition as follows:
A B Sum Carry
0 + 0 = 0 0
0 + 1 = 1 0
1 + 0 = 1 0
Example: Add (1001)2 and (1011)2
1 + 1 = 0 1
Carry 1 1
1 0 0 1 Number 1
+ 1 0 1 1 Number 2
1 0 1 0 0

Mr. Prashil Deshmukh 3


B] Binary Subtraction:
• The laws of binary subtraction as follows:
A B Difference Borrow
0 - 0 = 0 0
0 - 1 = 1 1
1 - 0 = 1 0
Example: Subtract (1010)2 and (0101)2
1 - 1 = 0 0
Borrow 1 1
1 0 1 0 Number 1
0 1 0 1 Number 2
0 1 0 1

Mr. Prashil Deshmukh 4


C] Subtraction using 1’s compliment:
• Steps: for to perform A-B
• 1. find 1’s compliment of B.
• 2. Add this complimented number to A.
• 3. The carry obtained is added in the result to get the final result.

Mr. Prashil Deshmukh 5


C] Subtraction using 2’s compliment:
• To perform A-B
• We will perform A + (-B), where –B is nothing but 2’s compliment of B
• Steps:
• 1. find the 2’s compliment of B.
• 2. Add this 2’s compliment in A.
• 3. if carry is 1, then neglect it. (in case of A>B)
• If carry is 0 then result is said to be negative.(in case of A<B)

Mr. Prashil Deshmukh 6


Example-1: Subtraction using 2’s compliment method
• Perform: (22)10 - (15)10 using 2’s compliment method.
• A= (22)10 =(10110)2 and B= (15)10 =(01111)2
• Step-1: find 2’s compliment of B.
B= 01111
1’s compliment of B = 10000
2’s compliment of B = 𝐁ഥ + 1 = 10000 + 1 = 10001

• Step-2: Add 2’s compliment of B in A

1 0 1 1 0 number A
+ 1 0 0 0 1 2’s compliment of number B
1 0 0 1 1 1

Neglect Therefor we get result = (00111)2 which is 7


carry
Mr. Prashil Deshmukh 7
Example-2: Subtraction using 2’s compliment method
• Perform: (15)10 - (22)10 using 2’s compliment method.
• A= (15)10 =(01111)2 and B= (22)10 =(10110)2
• Step-1: find 2’s compliment of B.
B= 10110
1’s compliment of B = 01001
2’s compliment of B = 𝐁ഥ + 1 = 01001 + 1 = 01010

• Step-2: Add 2’s compliment of B in A


1 1 1
0 1 1 1 1 number A
+ 0 1 0 1 0 2’s compliment of number B
1 1 0 0 1 Since carry is zero result is Negative
0 0 1 1 0
Since carry zero
+ 1
result is said to be
therefor final difference is (00111)2 which is 7
Negative, 0 0 1 1 1
Mr. Prashil Deshmukh 8
Try yourself

Mr. Prashil Deshmukh 9


THANK YOU
Mr. Prashil Deshmukh 10

You might also like