|
|
![]() |
|
| |||||||||||||||||||||||||
Notice that we could use those powers of eight to rewrite our problem. If we wrote the number 7528 without using the chart, it could be written as 2 x 1 + 5 x 8 + 7 x 64 . Evaluating that expression following the order of operations yields 2 + 40 + 448 or a value of 490. This means that the octal number 7528 is the same as the decimal number 490.
We may want to count in base eight. We could put the information in a table to show the first twenty numbers in the octal system. These numbers would correspond to the first twenty numbers in the decimal system.
Table 2 ~ 6.1
| Octal Number | Decimal Number |
| 1 | 1 |
| 2 | 2 |
| 3 | 3 |
| 4 | 4 |
| 5 | 5 |
| 6 | 6 |
| 7 | 7 |
| 10 | 8 |
| 11 | 9 |
| 12 | 10 |
| 13 | 11 |
| 14 | 12 |
| 15 | 13 |
| 16 | 14 |
| 17 | 15 |
| 20 | 16 |
| 21 | 17 |
| 22 | 18 |
| 23 | 19 |
| 24 | 20 |
It would be quite time-consuming to make a chart for all of the decimal values that correspond to a given octal number. Students may memorize some of the values merely because the values are encountered quite often. It is not necessary to memorize the table, however, since converting the octal number to expanded notation and then evaluating the number can be done quite easily.
Example: Convert 53648 to a decimal number.
Solution: First, identify the value of each digit. The first digit on the right, the digit 4 is in the units or the eight to the zero power place; the next digit 6, is in the eights or the eight to the first power place; the next digit 3, is in the sixty-fours or eight to the second power place; the final digit 5 is in the five hundred and twelves or eight to the third power place.
Table 3 ~ 6.1
x
If we wrote the number without using the chart, the number would be
4 x 80 + 6 x 81 + 3 x 82 + 5 x 83
or 4 x 1 + 6 x 8 + 3 x 64 + 5 x 512
Following the order of operations, this becomes 4 + 48 + 192 + 2560 which equals 2804. This means that 53648 is the same as the decimal number 2804.
6.1~ Practice Problems
Directions: Turn off your VCR. Convert the following octal numbers to decimal numbers. When you have finished working the problems, check your answers in the Answer Key. Turn on your VCR to view the solutions to the practice problems.
6.1~ Homework Problems
Directions: Turn off your VCR. Convert the following octal numbers to decimal numbers. When you have finished working the problems, check your answers in the Answer Key. If you have any questions, contact your teacher.
Begin by watching the video tape. 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 octal numbers to binary or 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 button to the left.
6.2 ~ Converting Octal to Binary to Hexadecimal
Suppose we have an octal number and we want to determine its binary equivalent. First, we must think about the relationship between an octal number and a binary number. One way of thinking about this is to make a table that counts or lists the first twenty values in both systems just like we did when we compared the binary number system to the octal number system in Section 5 and when we compared the octal number system to the decimal number system earlier in Section 6.
Table 1 ~ 6.2
Notice that the octal number 10 is the same as the binary number 1000 (both are equivalent to the decimal value 8.) The largest single digit in the octal system is 7. Looking at Table 6.2.1, we see that the octal number 7 can be written as 111 in the binary system. It takes three digits in the binary system to represent the largest digit in the octal system. It makes sense then to replace each digit in an octal number by a group of three digits in the binary system to convert the octal number to a binary number. Recall that we did just the opposite to convert a binary number to an octal number - we collected the digits in a binary number into groups of three to convert the binary number to an octal number. If we can convert an octal number to binary, we can certainly convert to hexadecimal form. We have already converted a binary number to a hexadecimal number in Section 5.3 by collecting the digits in the binary number into groups of four. We will use that same process here as we take an octal number and first convert it to a binary number and then convert the binary number to a hexadecimal number. It may be useful to think about the relationship between an octal number and a hexadecimal number. One way of thinking about this is to make a table that counts or lists the first twenty values in both systems just like we have to compare the octal number system and the decimal and then the binary number systems.
Table 2 ~ 6.2
Example 1: Convert the octal number 7528 to a binary number and then convert the binary number to a hexadecimal number.
Solution: To begin, take each digit in the octal number and from Table 6.2.1 find the three digit binary number that represents that octal digit.
28 in the units place in the octal system is the same as 0102 in the binary system.
58 in the eights place in the octal system is the same as 1012 in the binary system.
78 in the 82 place in the octal system is the same as 1112 in the binary system.
Copying down the groups of three binary digits first for the seven, then for the five, and finally for the two gives us the binary number. This means that the octal number 7528 is the same as the binary number 1111010102. Notice the 111 in place of the seven, the 101 in place of the five, and the 010 in place of the two. In order to make sure is the correct conversion, we could convert both the binary number and the octal number to their decimal equivalent and see if the results are the same. (In this case 7528 is 2 + 5 x 8 + 7 x 64 or 490 and 1111010102 is 1 x 2 + 1 x 23 + 1 x 25 + 1 x 26 + 1 x 27 + 1 x 28 or 2 + 8 + 32 + 64 + 128 + 256 or 490.)
Now we will convert the binary number 1111010102 to a hexadecimal number. First of all, group the binary numbers into groups of four starting from the right hand side. This means that there will be three groups since there are nine digits. (Recall: if the number of digits is not divisible by four, add zeros on the left hand side to make a number of digits divisible by four for the groupings. This means our number looks like 0001111010102.)
10102 in the binary system is the same as A16 in the units place in the hexadecimal system (refer back to Table 5.3.1 for the conversion).
11102 in the binary system is the same as E16 in the sixteens place in the hexadecimal system.
00012 in the binary system is the same as 116 in the sixteen to the second power place in the hexadecimal system.
This means that the binary number 1111010102 is the same as the hexadecimal number 1EA16. In order to make sure this is the case, we could convert both the binary number and the hexadecimal number to their decimal equivalent and see if the results are the same. (In this case 1EA16 is the same as A x 160 + E x 161 + 1 x 162 which is the same as 10 x 1 + 14 x 16 + 1 x 256 or 10 + 224 + 256 which equals 490. We have already seen that the binary number 1111010102 is 490.)
Thus the octal number 7528 = 1111010102 = 1EA16.
Example 2: Convert the octal number 30168 to a binary number and then covert the binary number to a hexadecimal number.
Solution: To begin, take each digit in the octal number and from Table 6.2.1 find the three digit binary number that represents that octal digit.
68 in the units place in the octal system is the same as 1102 in the binary system.
18 in the eights place in the octal system is the same as 0012 in the binary system.
08 in the 82 place in the octal system is the same as 0002 in the binary system.
38 in the 83 place in the octal system is the same as 0112 in the binary system.
Copying down the groups of three binary digits first for the three, then for the zero, next for the one, and finally for the six gives us the binary number. This means that the octal number 30168 is the same as the binary number 0110000011102. Notice the 011 in place of the three, the 000 in place of the zero, the 001 in place of the one, and the 110 in place of the six. As is customary in mathematics, leading zeros on the left of a number are typically not written down which mean that our number should look like 110000011102. In order to make sure is the correct conversion, we could convert both the binary number and the octal number to their decimal equivalent and see if the results are the same. (In this case 30168 is 6 + 1 x 8 + 0 x 64 + 3 x 512 or 1550 and 110000011102 is 1 x 2 + 1 x 22 + 1 x 23 + 1 x 29 + 1 x 210 or 2 + 4 + 8 + 512 + 1024 or 1550.)
Now we will convert the binary number 110000011102 to a hexadecimal number. First of all, group the binary numbers into groups of four starting from the right hand side. This means that there will be three groups since there are eleven digits. (Recall: if the number of digits is not divisible by four, add zeros on the left hand side to make a number of digits divisible by four for the groupings. This means our number looks like 0110000011102.)
11102 in the binary system is the same as E16 in the units place in the hexadecimal system (refer back to Table 5.3.1 for the conversion).
00002 in the binary system is the same as 016 in the sixteens place in the hexadecimal system.
01102 in the binary system is the same as 616 in the sixteen to the second power place in the hexadecimal system.
This means that the binary number 110000011102 is the same as the hexadecimal number 60E16. In order to make sure this is the case, we could convert both the binary number and the hexadecimal number to their decimal equivalent and see if the results are the same. (In this case 60E16 is the same as E x 160 + 0 x 161 + 6 x 162 which is the same as 14 x 1 + 0 x 16 + 6 x 256 or 14 + 1536 which equals 1550. We have already seen that the binary number 110000011102 is 1550.)
Thus the octal number 30168 = 110000011102 = 60E16.
6.2 ~ Practice Problems
Directions: Turn off your VCR. Convert the following octal numbers to binary numbers and then to hexadecimal numbers. Check your answers in the Answer Key. Turn your VCR back on to view the solutions to the practice problems.
6.2 ~ Homework Problems
Directions: Turn off your VCR. Convert the following octal numbers to binary numbers and then to hexadecimal numbers. Check your answers in the Answer Key. If you have any questions, contact your instructor.
THIS CONCLUDES SESSION SIX
Updated January 2004
|
|||||||||||||||||||||
|
|