Below, you may find information for how to convert from decimal to octal and how to convert from octal to decimal, including example conversions.
How to convert decimal to octal?
To convert decimal to octal (base-10 to base-8), divide the decimal number by 8 repeatedly until the quotient is 0 and get the remainder for each iteration. These are the steps to convert from decimal to octal:
1 - Divide the decimal number by 8.
2 - Keep aside the remainder left.
3 - Get the integer quotient for the next iteration and repeat till you get the quotient value is 0.
4 - At the end, reverse the order of the remainders to get the octal number.
For example, these are the steps to convert decimal number "127" to octal:
1 - 127 / 8
2 - Quotient (15), Remainder (7)
3 - 15 / 8
4 - Quotient(1), Remainder (7)
5 - 1 / 8
6 - Quotient(0), Remainder (1)
7 - Reverse the remainders 7, 7, 1
8 - 127 = 177
Please visit base converter to convert between all number bases.
How to convert octal to decimal?
To convert octal to decimal, repeat the steps below for all digits from the last octal symbol on the right to the first octal symbol on the left.
1 - Separate the octal digits.
2 - Multiply the octal digit by 8 power of the digit location. The power starts from 0 for the last octal digit. Increase that power by 1 for each next digit as you go to the left.
3 - Sum all the multipliers to find the decimal equivalent of the whole octal number.
For example, these are the steps to convert octal number "246" to decimal:
246 = (2 * 8^{2}) + (4 * 8^{1}) + (6 * 8^{0})
246 = 128 + 32 + 6
246 = 166
What is Decimal Numeral System?
Decimal numeral system is a base-10 numeral system that uses 10 decimal digits (0,1,2,3,4,5,6,7,8,9) to represent values from "0"–"9".
To convert between decimal and binary numbers, please visit decimal to binary converter.
What is Octal Numeral System?
Octal system is a base-8 numeral system that uses 8 symbols (0,1,2,3,4,5,6,7) to represent values from 0 to 7.
The octal numeral system is mostly used in computing to represent binary numbers in a friendly way. Each of the symbols in octal numbers are the representation of three binary bits.
To convert between octal and binary numbers, please visit octal to binary converter.