Courses
Courses for Kids
Free study material
Offline Centres
More
Store Icon
Store

Binary to Octal Conversion

Reviewed by:
ffImage
hightlight icon
highlight icon
highlight icon
share icon
copy icon
SearchIcon

Binary to Octal

A number system is a way of representing the numbers. We have studied different types of numbers, like real numbers, whole numbers, rational numbers, etc. But in digital electronics and computer systems, we used other systems of numbers. There are four different types of number systems. They are given below:

  • Binary number system which has the base 2.

  • Octal number system which has the base 8.

  • Decimal number system which has the base 10.

  • hexadecimal number system which has the base 16.

Computers understand only binary numbers in the form of bits and bytes. whereas the octal number system is used in electronics. To convert the binary to octal numbers, first, we have to convert binary numbers to decimal numbers, then decimal numbers to octal numbers. Before studying how to convert binary to octal, let us understand what are binary numbers and what are octal numbers.


What are Binary Numbers?

Computers can understand only two conditions “On” and “Off” i.e. 1 and 0. The binary number system deals with the study of 0s and 1s.


A binary number system is a method of representing the number with the base 2, it uses the digits 1 and 0. As it uses only two digits 0 and 1 and has a base of 2, it is called binary.


All digital devices use a binary number system in their electronic circuit. The input 0 indicates the “OFF” state and the input 1 indicates the “ON” state. Because of these implementations, binary number systems are most widely used in modern computer technology.

Each digit is referred to as a bit.

There are no 2, 3, 4, 5, 6, 7, 8, 9 in the binary number system.

Examples of the binary number system are given below:

  • 1012

  • 110012


What are Octal Numbers?

The octal number system is the numbers with the base 8 and uses digits from 0 to 7, the digits 8 and 9 are not used in the octal number system. The octal number system is also called the base 8 number system.


The octal number system is generally used in a minicomputer.

Examples of octal number system are given below:

  • 4238

  • 718

As we are quite familiar with the binary number system and octal number system,  now let us study how to convert binary to octal? and binary to octal conversion examples.


How to Convert Binary to Octal?

The computer doesn’t understand the octal number system. So, the additional circuit is required for the digital systems which convert the octal to binary number. So now, let us study conversion from binary to octal steps and solve binary to octal conversion examples. Binary to octal numbers can be converted into two methods.


Method 1: Converting binary to decimal then to decimal to octal.

Conversion from binary to octal steps are as follows:

  • First, recognize if the given is a binary number.

  • Then binary number to the decimal number system.

  • Multiply each digit by 2n-1, where n is the total number of digits.

  • We will get the decimal number for the given binary number.

  • Divide the decimal number by 8.

  • Write down the remainder.

  • Continue the above two steps with the quotient till the quotient is zero.

  • Write the remainder in the reverse order.

  • The result is the required octal number for the given binary number.


Method 2: Converting binary to octal by grouping.

Conversion from binary to octal steps are as follows:

  • First, recognize if the number is binary or not. The numbers with 0 and 1 with the base 2 are binary numbers.

  • Group all the 0 and 1 in the binary numbers in a set of three starting from the right side (Least Significant Bit: LSB).

  • Add 0’s to the left (Most Significant Bit: MSB) if it doesn’t form a group of three. Make sure each group must have three numbers.

  • Now write the octal equivalent number for each group and the result is the number in the octal number system.

Below image shows how to convert binary to octal examples.

Following this conversion from binary to octal steps, you can easily convert any binary number to an octal number. Now let us solve these binary to octal conversion examples, which will make the concept more clear.


Binary to Octal Conversion Examples

Example 1: Convert the binary number 10101012 to the octal number system.

Solution:

We will be using the first method of conversion of binary to octal.

The binary number is 10101012.

First, we will convert given binary number to decimal number.

(1010101)2

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

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

= 85

(010101)2= 8510

  • Now we will convert this decimal number to an octal number.

  • Let us divide 85 by 8, we will get the remainder 5 and quotient 10.

  • Again divide 10 by 8, we will get remainder 2 and quotient 1.

  • Again divide 1 by 8, we will get remainder 1 and quotient 0.

  • Now collecting the remainders in reverse order, we get 1, 2, and 5.

Therefore, the equivalent octal number is 1258.


Example 2:  Convert binary number 10101111002 into an octal number.

Solution:

We will be using method 2 for the conversion of binary to octal.

Let us group the binary numbers into a set of three.

Therefore, binary to octal is.

(1010111100)2

Making a group of three

=  1 010 111 100

Adding two 0 to complete the set

= 001 010 111 100

Now write the octal equivalent number

=   1    2     7     4

So, (1010111100)2= (1274)8.

Practise some more binary to octal conversion examples which are given below.


Convert Binary to Octal Examples

Convert the following binary numbers to octal number system.

  • 1010102

  • 1100112

  • 0001112

  • 111001112

FAQs on Binary to Octal Conversion

1. How to convert decimal to binary?

Steps to convert decimal number to binary number.

  1. Divide the given number by 2.

  2. Take the quotient for the next iteration.

  3. And the remainder for the binary digit.

  4. Divide the obtained quotient again by 2.

  5. Repeat the steps until we get a quotient equal to 0.

Example:

Convert   1310 to binary.

Solution: Divide 13 by 2. 

13/2 = 6 and remainder 1

6/2 = 3 and remainder is 0

3/2 = 1 and remainder is 1

1/2 = 0 and remainder is 1

So, we collect the reminders in the order and we get 10112.

1310 = 10112.

2. What is the binary system?

The base of the binary numeral system is the number two (radix). It is a base-2 numeral system that only has two numbers: 0 and 1.


The binary system has become the language of electronics and computers in the modern world, having been used for various reasons in ancient Egypt, China, and India. This is the most efficient approach for detecting the off (0) and on (1) states of an electric signal. It also serves as the foundation for binary code, which is used to compose data in computers. Binary numbers even make up the digital text you're reading right now.


Reading a binary number isn't as difficult as it appears: Every digit in a binary number is raised to the power of two because this is a positional system, with 20 on the right. Each binary digit represents one bit in the binary system.

3. What does the octal number system stand for and where is it used?

The base of the octal number system (or simply oct) is the number eight (radix). It employs eight symbols as a base-8 numeral system: 0, 1, 2, 3, 4, 5, 6, and 7 are the numbers from 0 to 7. The octal system gained popularity as a computer programming language in the early days of computing, despite being used by some Native American tribes until the twentieth century. The octal system shortens binary by simplifying long and complex chains of binary displays used by computers.


The octal system is mostly used to count binary in three-digit groups: Three binary digits are represented by each octal digit. The octal system became a perfect shorthand of binary for devices that used word sizes divided by three – which were 6-bit, 12-bit, 24-bit, or 36-bit – because 8 is 2 to the third power (23). Most current systems now use hexadecimal instead of octal. Octal numbers, on the other hand, are a crucial aspect of basic electronics understanding.

4. What are the methods for converting a binary number system to an octal number system?

There are mainly two methods for converting binary numbers to octal numbers:

  • Method 1: Converting binary to decimal, then to octal – This method requires the binary number to be translated to a decimal number, which is then transformed to an octal number.

  • Method 2: Grouping to convert binary to octal – The binary number is grouped into a series of threes. The number can be found by consulting the conversion table.

5. What are the advantages and disadvantages of the octal number system?

The use of octal numerals isn't as popular as it once was. When the amount of bits in a single word is a multiple of three, however, octal is employed. It's also a shortcut for representing file permissions on UNIX systems and UTF8 integers, among other things.


The key advantage of adopting octal numbers over decimal and hexadecimal numbers is that it needs fewer digits. As a result, there are fewer computations and errors. It simply takes three bits to represent any binary digit, and it's simple to convert from octal to binary and vice versa. Input and output are easier to manage with the octal format.


The main problem of the octal number system is that computers cannot understand it directly, necessitating the use of octal to binary converter.