Binary Mathematics
Binary Mathematics
base
OBSERVE (the binary number 110101 can be expanded the same way)
1101012 = 1x25 + 1x24 + 0x23 + 1x22 + 0x21 + 1x20
= 1x32 + 1x16 + 0x8 + 1x4 + 0x2 + 1x1
= 32 + 16 + 0 + 4 + 0 + 1
= 5310
The place values in the binary system are the powers of 2, namely, (5, 4, 3, 2, 1, 0)
Page 1 of 18
53/2
26/2
13/2
6/2
3/2
1/2
= 26 remainder 1
= 13 remainder 0
= 6 remainder 1
= 3 remainder 0
= 1 remainder 1
= 0 remainder 1
(MSB) 1 1 0 1 0 1 (LSB)
8 bits = 1 byte
128 64 32 16
1
Page 2 of 18
Assignment # 1
1510
1810
4210
10010
23510
110
29410
11710
8610
409010
409510
150210
37710
50110
82810
90710
400010
345610
227810
196710
Page 3 of 18
1102
1012
11101102
10111102
01101102
111112
10102
1101112
110110111012
1110001110012
1110101101002
1111111101112
1010110101012
1111112
0001010012
1111111111112
Page 4 of 18
Binary Addition
Rules
1.
2.
3.
4.
5.
0
0
1
1
1
1
1
1
1
1
1
0
0
+
+
+
+
+
0
1
0
1
1
=
=
=
=
=
0
1
1
0
1
with a carry of
with a carry of
1
1
Example
+
1
carries
1
1
0
sum
Page 5 of 18
Assignment # 2
Perform the following binary additions.
1. 10110
+ 101
2. 100
+10
3. 11011
+0010
8. 1111
101
+1000
9.
4. 10110111
+
1
110111
100100
+110001
5. 1101
101
+11
10.
100111
111001
+101101
6.
101
1
+110
11.
11011001
10010011
+11100011
7. 1110
100
+11
12.
11011011
10111011
00101011
01010111
+01111101
Page 6 of 18
Binary Multiplication
The partial product is moved one position to the left as each successive
multiplier is used. Then you add the products two at a time.
Example
+
1
1
0
0
1
1
1
0
1
0
1
1
0
0
0
1
1
0
1
0
1
x
1
0
0
1
1
0
1
0
1
0
0
0
1
0
1
1
0
1
1
1
0
0
1
0
+
+
1
1
0
+
1
0
1
1
1
1
0
0
0
1
0
1
1
1
0
1
0
0
1
1
1
0
1
1
0
1
0
0
0
0
1
1
0
1
0
0
0
0
0
1
1
0
0
0
1
0
1
Page 7 of 18
Assignment # 3
Multiply the following binary numbers.
1.
11011
X110
2.
1011101
X101
3.
101011101011
X10000
Page 8 of 18
Binary Subtraction
Rules
1.
2.
3.
4.
0
1
1
0
0
0
1
1
=
=
=
=
0
1
0
1
Example
1
1
1
1
0
0
1
0
0
0
1
1
1
1
0
Page 9 of 18
Assignment # 4
Subtract the following binary numbers.
1.
101000001
- 010111101
2.
1010111010
- 0101110101
3.
101011010111
- 011111111101
4.
101111100111
- 010101110010
Page 10 of 18
Division
Observe
11112 = 1510
810 = 10002 > 1112 = 710
410 = 1002 > 112 = 310
210 = 102 > 12 = 110
Page 11 of 18
Binary Division
346
123 42558
-369
565
-492
738
-738
0
11 1010001
-11
100
-11
10
Page 12 of 18
-00
100
-11
11
-11
0
A remainder is possible
Assignment # 5
1.
10 100
2.
100 10000
3.
10100 1100100
Page 13 of 18
Review
Find the binary sums
1. 1101
+111
2. 110011
+11101
3. 111001111
+11000011
Find the binary sum
1.
11001
11100
Page 14 of 18
1011
+110011
11100111
X11
2.
111011
X1011
1100011
-110111
2.
10101010
-110011
Page 15 of 18
1.
111 1011011
Conversion Tables
(You need to remember them)
Decimal
0
1
2
3
4
5
6
7
8
9
0
0
0
0
0
0
0
0
1
1
Binary
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
0 0 0
0 0 1
Page 16 of 18
Hexadecimal
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
Binary
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
Page 17 of 18
Page 18 of 18