3_Binary Arithmetics
3_Binary Arithmetics
Content:
By:
Mr. A. H. Choudhar
Laxmanrao Apte Jr. College, Pune
Binary Addition:
i) 0 + 0 = 0
ii) 0 + 1 = 1
iii) 1 + 0 = 1
iv) 1 + 1 = 10 Carry =1, Sum =0
v) 1 + 1 + 1 = 11 Carry =1, Sum =1
Addition of Two 4-bit Binary Numbers:
A A3 A2 A1 A0 -------No.1
+
B B3 B2 B1 B0 ………..No.2
+
C3 C2 C1 C0 - ….. Carry
Result= S4 S3 S2 S1 S0
Examples on Binary Addition:
Ex. 1) Add (1010)2 with (0101)2 Ex. 1) Add (1011)2 with (1101)2
A 1011
A 1010 + B 1101
+ B 0101 + Carry 1 1 1 1
+ Carry - - - - Sum 11000
Sum 1111
Ans.= (11000)2
Ans.= (1111)2
19-04-2023
Binary Subtraction:
i) 0 – 0 = 0
ii) 1 – 0 = 1
iii) 1 - 1 = 0
iv) 10 -1 = 1
OR iv) 0 – 1 = 11 borrow = 1, Difference = 1
Subtraction of Two 4-bit Binary Numbers:
(Direct Method)
A A3 A2 A1 A0 Important:
-------No.1 (Subtrahend) The Number A must
- B B3 B2 B1 B0 ………..No.2 (Minuend) be Greater than
Number B.
- b2 b1 b0 - ….. borrow If B>A then perform
Difference = D3 D2 D1 D0 B – A and give –ve
sign to the answer
Examples on Binary Subtraction:
B 1101
- A 1011
A 1010
- borrow - 1 -
- B 0101
Difference 0010
- borrow 1 - - 1
Difference 0101
Ans.= - (0010)2
Ans.= (0101)2
19-04-2023
In the next presentation We will see Binary
subtraction by Using 1’s complement Method….
19-04-2023