While the binary number system is very important because of its connection with computers, it is not the only other number system of importance. Two other number systems that are frequently seen are octal numbers and hexadecimal numbers. The octal number system is a base-8 number system and uses the digits 0 - 7 to represent numbers. The hexadecimal number system is a base-16 number system and uses the digits 0 - 9 along with the letters A - F to represent numbers. The table below shows a comparison of the first 16 numbers in the binary, octal, decimal, and hexadecimal number systems.
0000 Base-2 |
Octal 0 Base-8 |
Decimal 0 Base-10 |
Hexadecimal 0 Base-16 |
Let's look at some larger octal and hexadecimal numbers and analyze these numbers using our relationship between digit, base, and position. Recall the formula we learned from binary to decimal conversion:
DIGIT * BASE^{ POSITION #} |
Now consider the octal number 1473.2_{8}. As you can see in the table below, each column of this number represents a power of eight.
512s | 64s | Eights | Ones | Eighths | |
8^{3} | 8^{2} | 8^{1} | 8^{0} | 8^{-1} | |
1 | 4 | 7 | 3 | . | 2 |
Using the information from this table, we can find the decimal value for 1473.2_{8}. We will use the same approach we used for converting binary numbers to decimal.
1*8^{3 } = 1*512 = 512. 4*8^{2 } = 4*64 = 256. 7*8^{1 } = 7*8 = 56. 3*8^{0 } = 3*1 = 3. 2*8^{-1} = 2*.125 = + 0.25 ^{ } 827.25 |
From our analysis, we see that 1473.2_{8} is equivalent to 827.25_{10} in decimal.
Now let's look at a hexadecimal number: 33B.4_{16}. Since we are using a base-16 number system, the columns of our table are now powers of 16.
256s | Sixteens | Ones | Sixteenths | |
16^{2} | 16^{1} | 16^{0} | 16^{-1} | |
3 | 3 | B | . | 4 |
As we did before, we can find the decimal value of 33B.4_{16} by computer the value of each digit and summing. Notice that we substitute 11_{10} for the hexadecimal digit B in this conversion.
3*16^{2 } = 3*256 = 768. 3*16^{1 } = 3*16 = 48. B*16^{0 } = 11*1 = 11. 4*16^{-1} = 4*.0625 = + 0.25 ^{ } 827.25 |
Comparing all of our answers, we see that 827.25_{10} is 1473.2_{8} in octal and 33B.4_{16} in hexadecimal.