Binary, octal and our familiar decimal system are all place value systems for representing numbers. The difference is in the number of different numerals used per place value. While our decimal system has 10 numerals (0-9), octal has 8 (0-7), and binary has 2 (0 and 1). Converting between these systems efficiently means recognizing that a number written in any system is based on powers of its base. Because octal is based on powers of 8, but 8 is itself a power of binary's base 2, it is comparatively easy to convert from one to another.

#### Step

Block off the digits of your binary string into sets of three starting from the right. For an example, 1011010110 would be separated into 1 011 010 110.

#### Step

Convert the rightmost three digit block (or less) to a single value, the same as if you were calculating each as a decimal. Because a set of three digits in binary will always be between 0 and 7, the result will be an octal value. The rightmost digit must be multiplied by 1, the middle by 2, the leftmost by 4, then the products of the three digits added together. In the example, 110 is 1x4 + 1x2 + 0x1 = 6.

#### Step

Repeat Step 2 for the next three digit block, moving from right to left, until the final three digit (or less) block has been converted. In the example, the next block, 010 is 0x4 + 1x2 + 0x1 = 2. After that, 011 is 0x4 + 1x2 + 1x1 = 3. Finally, 1 can be written as 001, and is 0x4 + 0x2 + 1x1 = 1.

#### Step

Write your final number in octal, replacing each three digit block with the single octal digit you've calculated. In the example, 1011010110 in binary is equal to 1326 in octal.