Binary Numbers

Download Report

Transcript Binary Numbers

Binary Numbers
Converting
Decimal to Binary
Binary to Decimal
Base-Ten Place-Value System
The sleek efficient number system we know today is called the base-ten number
system or Hindu-Arabic system. It was first developed by the Hindus and Arabs.
This used the best features from several of the systems we mentioned before.
1. A limited set of symbols (digits). This system uses only the 10 symbols:0,1,2,3,4,5,6,7,8,9.
2. Place Value. This system uses the meaning of the place values to be powers of 10.
For example the number 6374 can be broken down (decomposed) as follows:
6 thousands
3 hundreds
7 tens
4 ones
6000
61000
3
610
+ 300
+ 3100
2
+ 310
+ 70
+ 710
1
+ 710
+4
+4
+4
The last row would be called the base-ten expanded notation of the number 6374.
Write each of the numbers below in expanded notation.
a) 82,305 = 810,000 + 21,000 + 3100 + 010 + 51
= 8104 + 2103 + 3102 + 5100
b) 37.924 = 310 + 71 + 9(1/10) + 2(1/100) + 4(1/1000)
= 3101 + 7100 + 910-1 + 210-2 + 410-3
Write each of the numbers below in standard notation.
a) 6105 + 1102 + 4101 + 5100 = 600,000 + 100 + 40 + 5 = 600,145
b) 7103 + 3100 + 210-2 + 810-3 = 7000 + 3 + .02 + .008 = 7003.028
Multiplying and Dividing by Powers of 10
If a number x is multiplied or divided by 10 this causes a “shift“ in the decimal point to the
right (multiplication) or the left (division) since all powers of 10 are increased or decreased
by 1.
𝑥 = 𝑑1 𝑑2 𝑑3 . 𝑑4 𝑑5 𝑑6 𝑑7 ⋯
10𝑥 = 𝑑1 𝑑2 𝑑3 𝑑4 . 𝑑5 𝑑6 𝑑7 ⋯
𝑥
= 𝑑1 𝑑2 . 𝑑3 𝑑4 𝑑5 𝑑6 𝑑7 ⋯
10
If x is multiplied or divided by a higher power of 10 then the decimal point is shifted by the
same number of places as the power of 10.
Binary Numbers
Binary or Base 2 numbers are very important in today's technological world. They form the
numerical representation of numbers in a computer or any digital device cell phone, ipod,
DVD, etc. This is because a electronic device can best detect one of two states either
electrical current is flowing or it is not.
The light bulbs that are on
represent the base 2 digit 1
and the ones that are off
represent the base 2 digit 0.
Base 2
Base 10
0002
0
0012
1
0102
2
0112
3
1002
4
1012
5
1102
6
1112
7
1001012 = 37
Dienes Blocks
Light Bulbs
Base Two
The important details about base 2 are that the symbols that you use are 0 and 1. The place
values in base 2 are (going from smallest to largest):
Binary Point
25
(32)
24
(16)
23
(8)
22
(4)
Change the base 2 number
1100112 to a base 10
(decimal) number.
1100112
11 = 1
12 = 2
04 = 0
08 = 0
116 = 16
132 = 32
51
21
(2)
20
(1)
2-1
(12)
2-2
(14)
2-3
(18)
2-4
1
(16
)
Change the base 10 (decimal)
number 47 to a base 2 (binary)
number.
47  2 = 23 remainder
1
23  2 = 11 remainder
1
11  2 = 5 remainder
1
5  2 = 2 remainder
1
2  2 = 1 remainder
0
1  2 = 0 remainder
1
47 = 1011112
2-5
1
(32
)
Converting Fractional Parts of Numbers
3
Convert 0.011012 to base 10.
Find the first 5 binary digits of the fraction 5
0.011012
1
1
1 × 32
= 32
1
0
0 × 16
= 32
4
1 × 18 = 32
8
1 × 14 = 32
0
0 × 12 = 32
13
32
2 × 35 = 65 = 15 + 1
2 × 15 = 25 = 25 + 0
2 × 25 = 45 = 45 + 0
digits
2 × 45 = 85 = 35 + 1
2 × 35 = 65 = 15 + 1
⋮
3
= 0.10011 ⋯2
5
13
0.011012 =
32
Multiplying and Dividing by Powers of 2
If a number x is multiplied or divided by 10 this causes a “shift“ in the binary point to the right
(multiplication) or the left (division) since all powers of 10 are increased or decreased by 1.
𝑥 = 𝑑1 𝑑2 𝑑3 . 𝑑4 𝑑5 𝑑6 𝑑7 ⋯
2
2𝑥 = 𝑑1 𝑑2 𝑑3 𝑑4 . 𝑑5 𝑑6 𝑑7 ⋯
2
𝑥
2
= 𝑑1 𝑑2 . 𝑑3 𝑑4 𝑑5 𝑑6 𝑑7 ⋯
2
Repeating Base 2 binary digits
3
Find the first 5 binary digits of the fraction 5
2 × 35 = 65 = 15 + 1
2 × 15 = 25 = 25 + 0
2 × 25 = 45 = 45 + 0
digits
2 × 45 = 85 = 35 + 1
2 × 35 = 65 = 15 + 1
Once we see that the fraction 35 has
occurred again after I multiplied by 2
this pattern will continue. This gives me
the entire binary expansion of 35. This is
what is referred to as a repeating
binary number.
3
= 0. 10012
5
Change 𝑥 = 0.101102 to base 10.
𝑥 = 0.101102 = 0.10110110110 ⋯2
32𝑥 = 10110.110 ⋯2 = 101102 + 0. 1102 = 22 + 0. 1102
4𝑥 = 10.110 ⋯2 = 102 + 0. 1102 = 2 + 0. 1102
32𝑥 − 4𝑥 = 22 − 2
20 5
𝑥=
=
28 7
Move binary point 5 places
Move binary point 2 places
Subtract each side
Solve for x