Positional base conversion in both directions, plus a worked example.
octal = convert(decimal digits → integer → octal digits)
decimal = convert(octal digits → integer → decimal digits)
Positional bases use place values, not a single multiplier. Each decimal digit is parsed against base 10, converted to an exact integer, then written in octal.
To go the other way, parse octal digits, convert to the same integer, and format in decimal. The live converter handles both directions.
Worked example on this page:
511 decimal = 777 octal