How binary-to-octal conversion works
Because 8 is 2 to the 3rd power, each octal digit corresponds to exactly three binary digits. Group the binary number into sets of three from the right, pad with leading zeros if necessary, and convert each group to its octal digit (0 through 7).
For example, binary 110101 splits into 110 and 101, giving octal 65.