Repeatedly divide by 8 and read the remainders
255 in decimal equals 377 in octal.
8 in decimal equals 10 in octal.