Binary to Octal Conversion

In this article, we will learn about the binary to an octal number system conversion. Here we convert a number to the base 2 to the number to the base 8. We cannot directly convert binary to octal, so we first convert binary to decimal, then the decimal to the octal number system. Binary numbers are commonly used in computers and octal numbers are used in electronics. Before going to the conversion, we have to learn about octal and binary numbers.

Binary Numbers

Numbers to base 2 is called binary numbers. It uses only two digits 0 and 1. It is denoted by a2, where a is a number with 0’s and 1’s.

Examples:

  • 1111102
  • 11111112
  • 10110012

Octal Numbers

The number to the base 8 is called octal numbers. It uses the numbers from 0 to 7. The numbers 8 and 9 are not included in the octal number system. It is denoted by a8 where a is a number with digits 0 to 7.

Examples:

  • 21458
  • 71658
  • 468

Conversion from Binary to Octal

To convert binary numbers to octal numbers, follow the below steps:

  • Take the given binary number
  • Multiply each digit by 2n-1 where n is the position of the digit from the decimal
  • The resultant is the equivalent decimal number for the given binary number
  • Divide the decimal number by 8
  • Note the remainder
  • Continue the above two steps with the quotient till the quotient is zero
  • Write the remainder in the reverse order
  • The resultant is the required octal number for the given binary number

Binary to Octal conversion Examples

Example 1: Convert 10101012 to octal

Solution:

Given binary number is 10101012

First, we convert given binary to decimal

10101012 = (1 * 26) + (0 * 25 ) + (1 * 24) + (0 * 23) + (1 * 22) + (0 * 21) + (1 * 20)

= 64 + 0 + 16 + 0 + 4 + 0 + 1

= 64 + 21

0101012= 85 (Decimal form)

Now we will convert this decimal to octal form

Binary to Octal - Example 1

Therefore, the equivalent octal number is 1258.

Example 2: Convert 011012 to octal

Solution:

Given binary number is 011012

First we convert given binary to decimal

011012 = (0 * 24) + (1 * 23) + (1 * 23) + (0 * 2) + (1 *20)

= 0 + 8 + 4 + 0 +1

011012= 13 (Decimal form)

Now we will convert this decimal to octal form

Binary to Octal - Example 2

Therefore, the equivalent octal number is 158.

Register with BYJU’S – The Learning App for more Maths-related concepts and explore interesting videos.