Octal numbering system
The Octal numbering system is an old numbering system used in computers. It is a base eight numbering system that consists of eight digits: 0, 1, 2, 3, 4, 5, 6, 7. To convert from decimal to octal, you need to use binary in between. Binary serves as a bridge to facilitate the conversion between decimal and octal.
Table C.5. Represents both the octal and binary numbering systems.
Octal | Binary |
0 | 0000 |
1 | 0001 |
2 | 0010 |
3 | 0011 |
4 | 0100 |
5 | 0101 |
6 | 0110 |
7 | 0111 |
Decimal to octal conversion
As explained earlier, to convert a decimal number to hexadecimal number, binary comes handy. First, the decimal number must be converted into binary. Next, the binary number gets divided into sets of three bits each and then from that gets computed the octal number.
Example: The conversion of decimal number 19610to octal ?8
Because we have already completed the conversion of the decimal number 196 to binary number 11000100, let's divide the binary number into sets of three bits each, as follows:
011| 000| 100 - binary number 11000100 divided in two sets of four bits each 3 | 0 | 4 - result in octal referring to numbering representation in Table C.5
Note that we have added a zero on the left side of the binary number 11000100. The reason for that is to be able to have three sets of three bits each. Adding a zero on the right side of the number not changes its value. However, avoid adding zeros on the right side of number in any numbering system. In that way, the decimal number 196 in octal is 304.