What is an Octal Number?
The easiest way to understand what an octal number is is to compare it to something you already know -- a decimal number.
As you know, a decimal number uses the base 10 system for counting and expressing value. It's called "base 10" because it uses ten numeric characters (0, 1, 2, 3, 4, 5, 6, 7, 8, and 9) to count and express values.
The octal number system, on the other hand, uses the base-8 method for counting and expressing value. It's called "base 8" because it uses 8 numeric characters to count and express value. The 8 octal numeric characters are 0, 1, 2, 3, 4, 5, 6, and 7.
Now, since we are looking to convert a base 10 number into a base 8 number, let's compare the base 10 place values to the place values in a base 8 number system:Place Values of Decimal Vs. Octal Systems
As you can see, since each place value in a base 10 number is different than the corresponding place value in a base 8 system, we need a method for converting 0-9 base 10 place values into 0-7 base 8 place values.
How to Convert Decimal to Octal
To convert a base 10 number into a base 8 number, the first step is to find the first base 8 place value that is greater than or equal to the decimal number you are converting -- starting at the 80 place and working your way to the left.
For example, suppose you want to convert the decimal number 125 into an octal number. In that case, you would find the first base 8 place value that is greater than or equal to 125, which would be 512.
|Power of 8:||83||82||81||80|
|Place value :||512||64||8||1|
Once you have located your base 8 place value starting point, the next step is to create a conversion chart like the one shown below.
Step #2: Create Decimal to Octal Conversion Chart
Notice that the decimal you want to convert is placed in the left-most cell of Row B, just above the base 8 place value row (C).
Step #3: Complete Conversion Chart for Converting 12510 to Octal
Next, attempt to divide the amount in row B into the amount in row C. If the amount in row C is greater than the amount in row B, enter a "0" in row D and move the amount in row B one cell to the right. Otherwise, if the amount in row C is less than the amount in row B, enter the number of times row C goes into row B in row D and enter the remainder in the next open cell in row B. Then simply repeat this process for each subsequent column. Here is how the completed conversion chart would look:
Step #4: Combine Numbers In Last Row of Chart
Combining the numbers in the last row of the chart we can see that the base 10 number 125 converts to the base 8 number 175 (1*64 + 7*8 + 5*1 = 125). Note that the leading zeros are dropped since they represent no value (just like the base 10 system).
As you can see, converting a decimal number to an octal number is a simple process of identifying the first base 8 place value greater than or equal to the base 10 number you are converting, and then dividing each place value into the remainder of previous division.