Conversion from binary to octal

The Octal system It is made up of 8 numbers ranging from 0 to 7, in this way the base used is 8, since the powers of 8 are handled to write them. Let's see an example:

3478 → 3 × 82 + 4 × 81 + 7 × 80

3478 → 192 + 32 + 7

3478 → 23110

We have transformed the number in octal basis to decimal, therefore, 347 in octal is equal to 231 in decimal base.

To establish the conversion we will write the numbers from 0 to 7, both in octal and in binary:

BinaryOctal
00
0011
0102
0113
1004
1015
1106
1117

Exercise 1: Convert the following binary number to octal: 10111012 →?8.

To convert it we will start by taking the first three digits of the binary number "101" from right to left, then the next three "011" and finally, since we are missing digits, we will add zeros "001".

We will represent each of these numbers by looking at the table shown above:

101 = 5

011 = 3

001 = 1

We group the octal numbers in the order of the binary:

10111012 → 1358

Exercise 2: Convert the following binary number to octal: 111112 →?8

To convert it, we will start by taking the first three digits of the binary number "111" from right to left, then the next three "11" but since it lacks a digit we will add 0, then it would be "011".

We will represent each of these numbers by looking at the table shown above:

111 = 7

011 = 3

We group the octal numbers in the order of the binary, from left to right:

111112 → 378

Exercise 3: Convert the following binary number to octal: 11001011001012 →?8

To convert it we will start by grabbing the first three digits of the binary number "101" from right to left, then the next three "100", the next "101", the next "100" and finally, as we are missing digits we will add zeros "001 ».

We will represent each of these numbers by looking at the table shown above:

101 = 5

100 = 4

101 = 5

100 = 4

001 = 1

We group the octal numbers in the order of the binary, from left to right:

11001011001012 → 145458