How the conversion works
Repeatedly divide the decimal number by 8 and record the remainder at each step. Read the remainders from bottom to top to form the octal result.
For example, decimal 100 divided by 8 gives quotient 12 remainder 4, then quotient 1 remainder 4, then quotient 0 remainder 1, producing octal 144.