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
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 is binary numbers and what is octal 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.
Example of the binary number system are:
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.
Example of octal number system are:
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.
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 the given is a binary number
Then binary number to decimal number system
Multiply each digit by 2n-1, where n the total number of the 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 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 the how to convert binary to octal examples
Following this conversion from binary to octal steps you can easily convert any binary number to octal number. Now let us solve these binary to octal conversion examples, which will make the concept more clear.
Example 1: Convert the binary number 10101012 to the octal number system.
We will be using first method of conversion of binary to octal
Binary number is 10101012
First, we will convert given binary number to decimal number
= (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
Now we will convert this decimal number to octal number
Let us divide 85 by 8 we will get remainder 5 and quotient 10.
Again divide 10 by 8 we will get remainder 2 and quotient 1
Again dived 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.
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.
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
Practice some more convert binary to octal examples given below.
Convert the following binary numbers to octal number system
1. How to convert decimal to binary?
Steps to convert decimal number to binary number
Divide the given number by 2.
Take the quotient for the next iteration.
And the remainder for the binary digit.
Divide the obtained quotient again by 2
Repeat the steps until we get a quotient equal to 0.
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 we get 10112
1310 = 10112