Decimal to octal converter

Created with Sketch.

Decimal to octal converter

Decimal to octal converter

To convert a decimal number to its octal representation, you can follow these steps:

  1. Divide the decimal number by 8 (the base of the octal number system).
  2. Write down the remainder as the least significant digit of the octal number.
  3. Divide the quotient by 8 and repeat until the quotient is 0.
  4. Write down the digits in reverse order to get the final octal representation.

For example, let’s convert the decimal number 123 to octal:

  1. 123 ÷ 8 = 15 remainder 3, so the least significant digit is 3.
  2. 15 ÷ 8 = 1 remainder 7, so the next digit is 7.
  3. 1 ÷ 8 = 0 remainder 1, so the most significant digit is 1.
  4. The final octal representation is 173.

Therefore, the octal representation of decimal number 123 is 173.