Octal facts for kids
The octal numeral system is a way of counting that uses a base of 8. This means it only uses eight different numbers: 0, 1, 2, 3, 4, 5, 6, and 7. It's similar to the binary system (which uses base 2) and the hexadecimal system (which uses base 16). You might see octal numbers written with a small 'o' before them, like o04 or o1242. Sometimes, they are written with a small 8 at the bottom right, like 12428.
Long ago, the octal system was very useful for working with computers. It made it easier to understand and work with long binary numbers. However, as computers became more advanced and started using 32-bit and 64-bit systems, the hexadecimal system became more popular than octal for most computer tasks. Interestingly, some groups of Native Americans, like the Yuki in California and people speaking Pamean languages in Mexico, also use a counting system similar to octal. They count the spaces between their fingers instead of counting the fingers themselves.
Contents
Octal and Binary Numbers
The octal system is closely linked to the binary system. Each digit in an octal number can be shown using three digits in a binary number. This is called "three-bit" binary coding.
To convert a binary number to an octal number, you group the binary digits from right to left in sets of three. The first three binary digits on the right become the last part of the octal number. Then, the next three digits become the next part, and so on.
Here's how single octal digits match up with three binary digits:
Octal | Binary |
---|---|
1 | 001 |
2 | 010 |
3 | 011 |
4 | 100 |
5 | 101 |
6 | 110 |
7 | 111 |
10 | 001 000 |
And here are some more examples of octal numbers and their binary forms:
Octal | Binary |
---|---|
11 | 001 001 |
12 | 001 010 |
36 | 011 110 |
45 | 100 101 |
53 | 101 011 |
64 | 110 100 |
100 | 001 000 000 |
357 | 011 101 111 |
You can also convert binary numbers into octal numbers by grouping them:
Binary | Groupings | Octal | |||
---|---|---|---|---|---|
11 | 011 | 3 | |||
010111 | 010 | 111 | 27 | ||
101000110 | 101 | 000 | 110 | 506 | |
01011010101 | 001 | 011 | 010 | 101 | 1325 |
Octal and Decimal Numbers
The decimal system (base 10) is the number system we use every day. To change an octal number into a decimal number, you multiply each octal digit by a power of 8. The power of 8 depends on the digit's position in the number.
Here are the values for each position in an octal number:
Position | ||||||
---|---|---|---|---|---|---|
6 | 5 | 4 | 3 | 2 | 1 | |
Value | 32768 (85) | 4096 (84) | 512 (83) | 64 (82) | 8(81) | 1 (80) |
Let's look at an example: Converting the octal number o3425 to a decimal number.
|
So, the octal number o3425 is equal to the decimal number 1813.
Octal and Hexadecimal Numbers
Both octal and hexadecimal numbers are easy to convert to binary numbers. This is why they are often used in computing. Octal numbers use three binary digits for each of their digits, while hexadecimal numbers use four binary digits for each of their digits.
Octal numbers often start with the letter "o", and hexadecimal numbers often end with the letter "h". The simplest way to change an octal number to a hexadecimal number (or vice versa) is to first convert it to binary, and then convert that binary number to the other system.
Here's a table showing how octal, binary, and hexadecimal numbers relate:
Octal | Binary | Hexadecimal | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
three digit | four digit | |||||||||
o4 | 100 | 0100 | 04h | |||||||
o15 | 001 | 101 | 1101 | 0Dh | ||||||
o306 | 011 | 000 | 110 | 1100 | 0110 | C6h | ||||
o54253 | 101 | 100 | 010 | 101 | 011 | 0101 | 1000 | 1010 | 1011 | 58ABh |
Related pages
See also
In Spanish: Sistema octal para niños