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