|
|
![]() |
|
|
Example 1: Convert the decimal number 45137 to an octal number.
Solution: Looking at the table above, notice that the largest number contained in 45137 in 32768 or 8 to the fifth power. This means that when the octal number is written in expanded octal notation, the largest power of eight that is included in the given number 45137 is eight to the fifth power. There is one 32768 in 45137. Once 32768 is divided into 45137, there is a remainder of 12369. Next check the next lowest power of eight which is eight to the fourth power or 4096. There are three 4096s in the number 12369. When 4096 is divided into 12369, there is a remainder of 81. Next check the next lowest power of eight which is eight to the third power or 512. There are zero 512s in 81 with a remainder of 81. Next check the next lowest power of eight which is eight to the second power or 64. There is one 64 in 81 with a remainder of 17. Next check the next lowest power of eight which is eight to the first power or 8. There are two 8s in 17 with a remainder of 1. Finally check the lowest power of eight which is eight to the zero power or 1. There are one 1s in the number 1. Therefore, we can say that
45137 = 1 x 85 + 3 x 84 + 0 x 83 + 1 x 82 + 2 x 81 + 1 x 80 or
45137 = 1301218
Another way of thinking of this is as follows:
45137 divided by 32768 is 1, remainder 12369
12369 divided by 4096 is 3, remainder 81
81 divided by 512 is 0, remainder 81
81 divided by 64 is 1, remainder 17
17 divided by 8 is 2, remainder 1
1 divided by 1 is 1
This method leads to the conclusion that the decimal number 45137 is the same as the octal number 130121.
There is another way to determine the octal equivalent of a decimal number. This is done by dividing the number repeatedly by eight and noting the remainders.
45137 divided by 8 is 5642 with a remainder of 1
5642 divided by 8 is 705 with a remainder of 2
705 divided by 8 is 88 with a remainder of 1
88 divided by 8 is 11 with a remainder of 0
11 divided by 8 is 1 with a remainder of 3
1 divided by 8 is 0 with a remainder of 1
This method gives us the solution in the opposite order. This shows that the decimal number 45137 is the same as the octal number 130121.
8.1~ Practice Problems
Directions: Turn off your VCR. Change the following decimal numbers to octal numbers using either method. Check your answers in the Answer Key. Turn your VCR back on to view the solutions.
8.1 ~ Homework Problems
Directions: Turn off your VCR. Change the following decimal numbers to octal numbers using either method. Check your answers in the Answer Key. If you have any questions, contact your instructor.
Turn on your VCR and continue with this section. If you have purchased a textbook, follow along in your book. If you are using the Internet version, follow along on the webpage. If you have any difficulties, contact your instructor. After the explanation of converting decimal notation to binary notation, turn off the video player and try to work the practice problems. Once you have worked the problems, check your answers in the answer key listed in the back of your book or click on the Answer Key links at the end of evry section.
8.2 ~ Converting from Decimal Notation to Binary Notation
To convert a decimal number to a binary number, first consider the place values of the
binary number system. The table below is similar to Table 3.2.1 .
Table 8.2.1
Powers of two
Example 1: Convert the decimal number 342 to a binary number.
Solution: First locate the highest power of 2 that is contained in 342. This would be two to the eighth power or 256. Remember the format for writing a binary number in expanded binary notation. Each power of 2 is represented with either a zero or one as a factor. In the number 342 there is one place value of 256. Once this number is taken out of 342, the number that remains is 86. The next lowest power of two is two to the seventh power or 128. There are zero 128s in the number 86. The remainder is 86. The next lower power is two to the sixth power or 64. There is one 64 in the number 86, with a remainder of 22. The next lower power is two to the fifth power or 32. There are zero 32s in 22 with a remainder of 22.. The next lower power is two to the fourth power or 16. There is one 16 in 22 with a remainder of 6. The next lower power is two to the third power or 8. There are zero 8s in 6 with a remainder of 6. The next lower power is two to the second power or 4. There is one 4 in 6 with a remainder of 2. The next lower power is two to the first power or 2. There is one 2 in 2 with a remainder of zero. We must finish up with the lowest power of 2 that is available which is 2 to the zero power or 1. There are zero 1s in zero. Therefore we can say that
342 = 1 x 28 + 0 x 27 + 1 x 26 + 0 x 25 + 1 x 24 + 0 x 23 + 1 x 22 + 1 x 21 + o x 20
or 342 = 1010101102
Another way of thinking of this is as follows:
342 divided by 256 is 1 remainder 86
86 divided by 128 is 0 remainder 86
86 divided by 64 is 1 remainder 22
22 divided by 32 is 0 remainder 22
22 divided by 16 is 1 remainder 6
6 divided by 8 is 0 remainder 6
6 divided by 4 is 1 remainder 2
2 divided by 2 is 1 remainder 0
0 divided by 1 is 0
This method leads to the conclusion that the decimal number 342 is the same as the binary number 101010110.
There is another way to determine the binary equivalent of a decimal number. This is done by dividing the number repeatedly by two and noting the remainders.
342 divided by 2 is 171 with a remainder of 0
171 divided by 2 is 85 with a remainder of 1
85 divided by 2 is 42 with a remainder of 1
42 divided by 2 is 21 with a remainder of 0
21 divided by 2 is 10 with a remainder of 1
10 divided by 2 is 5 with a remainder of 0
5 divided by 2 is 2 with a remainder of 1
2 divided by 2 is 1 with a remainder of 0
1 divided by 2 is 0 with a remainder of 1
This method gives us the solution in the opposite order. This shows that the decimal number 342 is the same as the binary number 101010110.
8.2 ~ Practice Problems
Directions: Turn off your VCR. Change the following decimal numbers to binary numbers using any method. Check your answers in the Answer Key. Turn your VCR back on the view the solutions.
8.2 ~ Homework Problems
Directions: Turn off your VCR. Change the following decimal numbers to binary numbers using any method. Check your answers in the Answer Key. If you have any questions, contact your instructor.
Turn on your VCR and continue with this section. If you have purchased a textbook, follow along in your book. If you are using the Internet version, follow along on the webpage. If you have any difficulties, contact your instructor. After the explanation of converting decimal notation to hexadecimal notation, turn off the video player and try to work the practice problems. Once you have worked the problems, check your answers in the answer key listed in the back of your book or click on the Answer Key links at the end of every section.
8.3 ~ Converting from Decimal Notation to Hexadecimal Notation
To convert a decimal number to a hexadecimal number, first consider the place values in the hexadecimal system.
Table 1 ~ 3.1
Powers of Sixteen
Example 1: Convert the decimal number 45137 to hexadecimal number.
Solution: Looking at the table above, notice that the largest number contained in 45137 in 4096 or 16 to the third power. This means that when the hexadecimal number is written in expanded hexadecimal notation, the largest power of sixteen that is included in the given number 45137 is sixteen to the third power. There are eleven 4096s in 45137. Once 4096 is divided into 45137, there is a remainder of 81. Next check the next lowest power of sixteen which is sixteen to the second power or 256. There are zero 256s in the number 81. When 256 is divided into 81, there is a remainder of 81. Next check the next lowest power of sixteen which is sixteen to the first power or 16. There are five 16s in 81 with a remainder of 1. Finally check the lowest power of sixteen which is sixteen to the zero power or 1. There are one 1s in the number 1. Therefore, we can say that
45137 = 11 x 163 + 0 x 162 + 5 x 161 + 1 x 160
Remember that in the hexadecimal system the decimal number 10 is represented by the hexadecimal number B. We could write the number in another way and say that
45137 = B0518
Another way of thinking of this is as follows:
45137 divided by 4096 is 11, remainder 81
81 divided by 256 is 0, remainder 81
81 divided by 16 is 5, remainder 1
1 divided by 1 is 1
This method leads to the conclusion that the decimal number 45137 is the same as the hexadecimal number B051.
There is another way to determine the hexadecimal equivalent of a decimal number. This is done by dividing the number repeatedly by sixteen and noting the remainders.
45137 divided by 16 is 2821 with a remainder of 1
2821 divided by 16 is 176 with a remainder of 5
176 divided by 16 is 11 with a remainder of 0
11 divided by 16 is 0 with a remainder of 11
This method gives us the solution in the opposite order. This shows that the decimal number 45137 is the same as the hexadecimal number B051.
8.3 ~ Practice Problems
Directions: Turn off your VCR. Change the following decimal numbers to hexadecimal numbers using nay method. Check your answers in the Answer Key. Turn your VCR back on the view the solutions.
8.3 ~ Homework Problems
Directions: Turn off your VCR. Change the following decimal numbers to hexadecimal numbers using any method. Check your answers in the Answer Key. Contact your instructor if you have any questions.
This Concludes Session Eight
|
|||||||||||||||||||||
|
|