Download presentation
Presentation is loading. Please wait.
Published byDebra Payne Modified over 8 years ago
1
Numbering Systems and Conversion 2.01- Understand How Computing Devices Work 1
2
Numbering Systems Three different numbering systems commonly used: Decimal (Base 10 ) (everyday life) Binary (Base 2 ) (programming and networking) Hexadecimal (Base 16 ) (programming, networking, web design) While we think in decimal, computers think in binary. Computers are only operate in two states: ON or OFF. We must learn how to count like a computer to properly understand it. 2
3
Decimal The number system we use in math and in life. Base 10: ten one digit numbers: 0,1,2,3,4,5,6,7,8,9 After 9 comes 10 (the first two digit number) of course. 10 2 = 100 Base squared = 100 3
4
Decimal 4
5
Binary 5 Binary is Base 2 2 digits 0 and 1 No digit greater than 1 exists, forget about 2,3,4,… For example: Base 10 4 = Binary 0100 or 100 10 2 = 100 – works in binary too! 2 2 = 4
6
Why Binary? 6 Computers operate on a series of electric impulses. Voltages represent binary values. The CPU only has to know two values: ON or OFF, TRUE or FALSE, 1 or 0, therefore it only has to measure two voltages. Write down the powers of 2 from 0-128. 201201 2122122 224224 238238 2 4 16 2 5 32 2 6 64 2 7 128
7
Powers of 2 7 Remember from math the powers of 2: 1, 2, 4, 8, 16, 32, 64, 128 (first 8) Remember any number to the zero power is 1 and any number to the 1 power is that number. So if Decimal 4 = 100 in binary, what does decimal 5 equal in binary?
8
Powers of 2 8 Remember from math the powers of 2: 1, 2, 4, 8, 16, 32, 64, 128 (first 8) Remember any number to the zero power is 1 and any number of the 1 power is that number. So if Decimal 4 = 100 in binary, what does decimal 5 equal in binary? A: 101 201201 212212 1102 224224
9
The 1’s 9 So let’s go beyond our basic example. Remember the most right binary digit (bit) has the least significant value and the most left binary digit (bit) has the most significant value. What is 1111 1111 in Decimal? That would be 255. So… 1 0000 0000 would be 256, right? 201201 2122122 224224 238238 2 4 16 2 5 32 2 6 64 2 7 128 11111111 201201 2122122 224224 238238 2 4 16 2 5 32 2 6 64 2 7 128 00000000 2 8 256 1
10
Let’s Try This… 10 On your paper draw 8 columns Above each column label a power of 2, starting at 128 in the first (left most) column. Finish with 1 in the last (right most) column. 201201 2122122 224224 238238 2 4 16 2 5 32 2 6 64 2 7 128
11
Example Binary 11 Convert the following numbers to binary using your chart… Decimal 56 100 198 64 18 84 231 201201 2122122 224224 238238 2 4 16 2 5 32 2 6 64 2 7 128
12
Example Binary Answers 12 Convert the following numbers to binary using your chart: DecimalBinary (Answer) 56 111000 100 1100100 198 1100110 64 1000000 18 10010 84 1010100 231 11100111
13
Hexadecimal 13 Hexadecimal (Hex) is Base 16 There are fifteen one digit numbers: 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F What comes after F? Remember our rule: 10 2 =100 (16 2 =256 in decimal) This works in Hex as it does for ANY number system.
14
Hexadecimal 14 Think if you had 3 hands. You would have 15 fingers right? That is what hex has! So after 9 comes A (10), B (11), C (12), D (13), E (14) and F (15) Let try our example again in Hex.
15
Another Conversion to Hexadecimal 15 Convert the following Decimal numbers to Hex: Decimal 56 100 198 64 18 128 231 16 0 1 16 1 16 16 2 256 1.Ask “How many of ‘256’ can come out of 56 (our decimal number)? 0 2.Ask “How many of ‘16’ can come out of 56? 3 (3 * 16 = 48 with 8 left over) Put the 3 in the 16’s spot 3.Ask “How many of ‘1’ can come out of 8 (the left over)? 8 with 0 left over 3 8
16
Example Hex Answers 16 Convert the following Decimal numbers to Hex: Dec Hex 56 38 100 64 198 C6 64 40 18 12 128 80 256 100
17
Binary to Hexadecimal Half a byte is 4 bits which is called a nibble. A nibble is also one hexadecimal digit. (1111 = 15 or F) Using this principle converting from Binary to Hex is easy. What is 1101 1001 in Hex? 17
18
Conversion Process Spilt the binary digits into groups of 4. So for a 1 byte number there would be two groups of 4. Add 0s if the number is not 8 digits. One group will have powers 128, 64, 32, 16 (left group) and the other will contain 8, 4, 2, 1 (right group). Write the digits out and simply add and combine the groups. Do NOT add the groups only the 4 numbers in each group. 18 201201 2122122 224224 238238 201201 2122122 224224 238238
19
Conversion Process Spilt the binary digits into groups of 4. So for a 1 byte number there would be two groups of 4. Add 0s if the number is not 8 digits. One group will have powers 128, 64, 32, 16 (left group) and the other will contain 8, 4, 2, 1 (right group). Write the digits out and simply add and combine the groups. Do NOT add the groups only the 4 numbers in each group. 19 201201 2122122 224224 238238 201201 2122122 224224 238238 A: 1101= 8+4+1 or D (left group) 1001= 9 (right group) So 11011001 2 = D9 16 or 217 10
20
Hexadecimal to Decimal In our previous example we arrived at the answer D9. How do we convert that to decimal? Remember the base of Hex? Just multiply! D (remember D = 13 in decimal) * 16 = 208 + 9 = 217 Or D times 16 1 + 9 times 16 0 Since D does not exist in decimal we must convert it to the decimal number it represents first. 20
21
Conclusion 21 In this lesson we learned about number systems used in digital electronics and computers. Decimal Binary Hexadecimal
22
Binary Practice Game http://forums.cisco.com/CertCom/game/binary_game_page.htm 22
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.