Binary Numbers and Arithmetic
Binary Numbers and Arithmetic
Binary Numbers and Arithmetic
Binary Math
Decimal Addition Example
1) Add 8 + 7 = 15
Add 3758 to 4657: Write down 5, carry 1
2) Add 5 + 5 + 1 = 11
111 Write down 1, carry 1
3758 3) Add 7 + 6 + 1 = 14
+ 4657 Write down 4, carry 1
8 415 4) Add 3 + 4 + 1 = 8
Write down 8
Decimal Addition Explanation
1 1 11
1 5 5 6 12
4 14 5 5 99
5 19 10 11 111
Binary Addition Rules
Rules:
–0+0 =0
–0+1 =1
–1+0 =1 (just like in decimal)
1+1 = 210
= 102 = 0 with 1 to carry
1+1+1 = 310
= 112 = 1 with 1 to carry
Addition (binary)
1
0 1 0 1
0 0 1 1
Addition (binary)
1
0 1 0 1
0 0 1 1
0 1 1 10
1 11 1
011 01
01011
Binary Addition Verification
1 0 1 0 0 1 1
Binary Addition Example 2
Example 2: Verification
Add 1111 to 111010. 1110102 5810
+0011112 + 1510
7310
1 1 1 1 1 64 32 16 8 4 2 1
1 1 1 0 1 0 1 0 0 1 0 0 1
+ 0 0 1 1 1 1 = 64 + 8 +1
= 7310
1 0 0 1 0 0 1
For Exercises 1-3, match the solution with the problem.
A. 10001100
B. 10011110
C. 1101010
D. 1100000
E. 1010001
F. 1111000
8 0 2 5
- 4 6 5 7
3 3 6 8
So when you cannot subtract, you borrow from the column to the left.
The amount borrowed is 1 base unit, which in
decimal is 10.
The 10 is added to the original column value, so you will be
able to subtract.
Binary Subtraction
Explanation
2 1 - 111002 - 2810
2310
0 0 2 2
1 1 0 0 1 1 64 32 16 8 4 2 1
- 1 1 1 0 0 1 0 1 1 1
= 16 + 4 + 2 + 1
1 0 1 1 1 = 2310
Binary Subtraction
Example 2
Example 2: Subtract
binary 10100 from 101001 Verification
1010012 4110
- 101002 - 2010
2110
0 2 0 2
1 0 1 0 0 1 64 32 16 8 4 2 1
1 0 1 0 1
- 1 0 1 0 0 = 16 + 4 + 1
1 0 1 0 1 = 2110
For Exercises 4-6, match the solution with the problem.
A. 10001100
B. 10011110
C. 1101010
D. 1100000
E. 1010001
F. 1111000
13
11
13
130
143
Multiplication (binary)
1101
1011
1101
11010
1101000
10001111