Last modified on April 25th, 2024

chapter outline

 

Binary to Octal

A binary-to-octal conversion is done to convert a binary number (base 2) to its equivalent octal number (base 8). The methods used to convert a binary number to its octal counterpart are discussed.

Direct Method: Using Table

In this method, we directly represent a group of any binary digits (of 3 bits) to the corresponding octal value using the conversion table.

Let us convert (11010)2 to its equivalent octal number.

Step 1: Grouping 11010 into 3 bits (starting from the right), we have (11) and (010).

Step 2: Since the first group is not of three bits, we add zeros to the front. Now, the groups (011) and (010) are of three bits. 

Step 3: Then, we find their corresponding octal values using the conversion table.

Binary to Octal
Binary NumberOctal Number
0000
0011
0102
0113
1004
1015
1106
1117

By converting each group into its corresponding octal value, we get

(011)2 = (3)8 and (010)2 = (2)8

Step 4: Taking the values based on the order of groups, we get

(11010)2 = (32)8

For Fractional Hexadecimal Numbers

Similarly, we convert the fractional binary numbers into their corresponding octal numbers by dividing them into groups of three bits. Unlike the integral part, the fractional part should be grouped from left to right. 

Now, converting (0.10)2 into its equivalent hexadecimal, we get

For the Integral Part:

(0)2 → (000)2 → (0)8

For the Fractional Part:

(10)2 → (100)2 → (4)8

Thus, (0.10)2 = (0.4)8

Convert the binary number 101110 to octal form using the conversion chart.

Solution:

(101) → 5
(110) → 6
(101110)2 → (56)8

Indirect Method: Without Using Table

There is another way the binary numbers are converted to their corresponding octal without using the conversion table. 

Let us convert (10110)2 into an octal number.

First, we convert 10110 into a decimal number and then decimal to octal.

Step 1: Binary to Decimal

While converting (10110)2 to its respective decimal number, we multiply each digit (right to left) by the corresponding powers of 2, as shown.

Binary Value10110
Decimal Value1 × 24 = 160 × 23 = 01 × 22 = 41 × 21 = 20 × 20 = 0

Thus, on adding the value, we get the decimal number

16 + 0 + 4 + 2 + 0 = 16 + 4 + 2 = 22

Step 2: Decimal to Octal

To convert (22)10 in its octal form, we first divide the number by 8 and then the quotients of divisions in the subsequent steps until we get 0 as the quotient.

On dividing 22 by 8, the quotient is 2, and the remainder is 6

Further, by repeating the same step, we get

2 ÷ 8, quotient = 0, and remainder = 2

When the quotient is 0, the octal number is obtained by representing the remainders in reverse order (from last to first). 

Thus, (22)10 = (26)8

Convert (10111)2 into octal.

Solution:

By converting (10111)2 to its corresponding decimal, we get
(1 × 24) + (0 × 23) + (1 × 22) + (1 × 21) + (1 × 20) = 16 + 0 + 4 + 2 + 1 = 23
Now, by converting (23)10 to its corresponding hexadecimal, we get
23 ÷ 16, quotient = 1, and remainder = 7
1 ÷ 16, quotient = 0, and remainder = 1
Thus, (10111)2 = (17)8

Last modified on April 25th, 2024