Safekipedia
8 (number)Binary arithmeticPower-of-two numeral systems

Octal

Adapted from Wikipedia · Discoverer experience

Octal is a special way to write numbers, known as a numeral system. Instead of using ten symbols like we do in everyday math (0 through 9), octal uses only eight symbols, from 0 to 7. Each position in an octal number represents a power of 8, similar to how each position in our regular decimal system represents a power of ten.

For example, the octal number 112 means you calculate it like this: 1 × 8² + 1 × 8¹ + 2 × 8⁰, which equals 64 + 8 + 2 = 74 in our usual decimal numbers. This system helps us work with numbers in a way that connects closely to binary numbers, which computers use to process information.

Octal is especially useful because each octal digit matches exactly with three binary digits. This makes it easier to convert between binary and other number systems. For instance, the binary number for 74, which is 1001010, can be grouped as 001 001 010, turning into the octal number 112. This connection makes octal a helpful tool in computer science and engineering.

Multiplication table

The multiplication table for octal numbers shows how different octal digits (0 to 7) multiply together. Each row and column represents one of these digits, and where they meet, you find the product in octal form. This helps in understanding how calculations work in the octal system, which uses base 8 instead of the usual base 10 we use every day.

The octal multiplication table
×123456710
1123456710
22461012141620
336111417222530
4410142024303440
5512172431364350
6614223036445260
7716253443526170
1010203040506070100

Usage

The octal system is a way to write numbers using only the digits 0 to 7, instead of the usual 0 to 9. Each position in an octal number represents a power of 8, similar to how each position in a decimal number represents a power of 10. For example, the octal number 112 means:

1 × 82 + 1 × 81 + 2 × 80

People have used octal in different ways throughout history. In China, the ancient trigrams from the I Ching correspond to octal digits. Some Native American languages, like the Yuki language in California, also use an octal system because people count the spaces between their fingers instead of the fingers themselves.

In computing, octal was popular in early computers because it works well with systems that process data in groups of three bits. For example, each octal digit represents exactly three binary digits. Even today, octal is sometimes used in computer systems, such as for setting file permissions in Unix systems.

Conversion between bases

To change a number from decimal (the normal way we count) to octal (base 8), you can divide the number by 8 repeatedly and write down the remainders. For example, to turn 125 into octal, you can break it down like this: 125 = 8 × 15 + 5, then 15 = 8 × 1 + 7, and finally 1 = 8 × 0 + 1. Reading the remainders from last to first gives you 175 in octal.

You can also change octal back to decimal by multiplying each digit by a power of 8 and adding the results. For example, the octal number 764 equals 7 × 82 + 6 × 81 + 4 × 80, which is 500 in decimal.

Octal numbers are closely related to binary numbers. Each octal digit matches exactly three binary digits. To turn octal into binary, just change each octal digit to its three-digit binary form. To go from binary to octal, group the binary digits into threes (adding zeroes if needed) and change each group into an octal digit.

001010111100
1274
011100 . 010010
34 . 22
1057
001000101111
001000101111
22F
3FA5
0011111110100101
0011111110100101
037645

Real numbers

Octal can also represent parts of numbers, just like decimal. Because octal only uses the digits 0 to 7, some fractions in octal repeat, but these patterns are usually simple.

There are special numbers that cannot be written exactly with any number system, whether decimal or octal. The table below shows how some of these numbers look in both decimal and octal.

Main article: irrational numbers

Decimal base
Prime factors of the base: 2, 5
Prime factors of one below the base: 3
Prime factors of one above the base: 11
Other Prime factors: 7 13 17 19 23 29 31
Octal base
Prime factors of the base: 2
Prime factors of one below the base: 7
Prime factors of one above the base: 3
Other Prime factors: 5 13 15 21 23 27 35 37
FractionPrime factors
of the denominator
Positional representationPositional representationPrime factors
of the denominator
Fraction
1/220.50.421/2
1/330.3333... = 0.30.2525... = 0.2531/3
1/420.250.221/4
1/550.20.146351/5
1/62, 30.160.1252, 31/6
1/770.1428570.171/7
1/820.1250.121/10
1/930.10.0731/11
1/102, 50.10.063142, 51/12
1/11110.090.0564272135131/13
1/122, 30.0830.0522, 31/14
1/13130.0769230.0473151/15
1/142, 70.07142850.042, 71/16
1/153, 50.060.04213, 51/17
1/1620.06250.0421/20
1/17170.05882352941176470.03607417211/21
1/182, 30.050.0342, 31/22
1/19190.0526315789473684210.032745231/23
1/202, 50.050.031462, 51/24
1/213, 70.0476190.033, 71/25
1/222, 110.0450.027213505642, 131/26
1/23230.04347826086956521739130.02620544131271/27
1/242, 30.04160.0252, 31/30
1/2550.040.0243656050753412172751/31
1/262, 130.03846150.023542, 151/32
1/2730.0370.02275531/33
1/282, 70.035714280.022, 71/34
1/29290.03448275862068965517241379310.0215173454106475626043236713351/35
1/302, 3, 50.030.021042, 3, 51/36
1/31310.0322580645161290.02041371/37
1/3220.031250.0221/40
NumberPositional representation
DecimalOctal
√2 (the length of the diagonal of a unit square)1.414213562373095048...1.3240 4746 3177 1674...
√3 (the length of the diagonal of a unit cube)1.732050807568877293...1.5666 3656 4130 2312...
√5 (the length of the diagonal of a 1×2 rectangle)2.236067977499789696...2.1706 7363 3457 7224...
φ (phi, the golden ratio = (1+√5)/2)1.618033988749894848...1.4743 3571 5627 7512...
π (pi, the ratio of circumference to diameter of a circle)3.141592653589793238462643
383279502884197169399375105...
3.1103 7552 4210 2643...
e (the base of the natural logarithm)2.718281828459045235...2.5576 0521 3050 5355...

This article is a child-friendly adaptation of the Wikipedia article on Octal, available under CC BY-SA 4.0.