Binary to Octal Conversion
Last Updated :
05 Aug, 2024
Number system is an important part of mathematics. The number system and its conversion is used in various fields of mathematics and computer science. In this article we will explore binary, octal and conversion of binary to octal number system.
What is Binary Number System?

Number system with its base 2 is called as binary number system. It represents numbers using 1 and 0. The digits in the binary number system are referred to as bits. It is denoted by N2, where N is a number with 0’s and 1’s.
What is Octal Number System?

Number system with its base 8 is called as octal number system. It represents numbers using 0-7. It is denoted by N8 where N is a number with digits 0 to 7.
Binary to Octal Conversion
Different methods for binary to octal conversion are:
- Binary to Decimal then Decimal to Octal
- Direct Method for Binary to Octal Conversion
Binary to Decimal Then Decimal to Octal
The steps to convert binary to octal using decimal are listed below.
- First convert binary to its decimal equivalent by multiplying the bits by its equivalent power of two.
- Then, convert obtained decimal to octal by division by base method.
Example: (1111)2 = (______)8
Solution:
First convert (1111)2 into its decimal = (1111)2 = 23 × 1 + 22 × 1 + 21 × 1 + 20 × 1 = (15)10
Then, convert (15)10 decimal into octal by division by 8 method
Octal base (8) | Decimal number to be converted into octal | Remainder |
8 | 15 | 7 ↑ |
8 | 1 | 1 ↑ |
8 | 0 | 0 ↑ |
Write remainders from bottom to top to get octal equivalent.
(15)10 = (17)8
(1111)2 = (17)8
Direct Method for Binary to Octal Conversion

Take the given binary number and form the group of three bits, then replace the group of three bits with its binary equivalent. Hence, the obtained number is the conversion of a given binary to octal.
Note:
- If, while forming the group of three bits, the bits are before the radix point, then start forming the group from the LSB bit and if the bits are after the radix point, start forming the group of three bits from the immediate bit after the radix point.
- While forming the group of three bits, the number of bits is less than 3 and bit is before the radix point, then, add 0s before the fewer bits to form a group of three bits.
- While forming the group of three bits, the number of bits is less than 3 and bit is after the radix point, then, add 0s after the fewer bits to form a group of three bits.
Decimal | Binary | Octal |
---|
0 | 000 | 0 |
1 | 001 | 1 |
2 | 010 | 2 |
3 | 011 | 3 |
4 | 100 | 4 |
5 | 101 | 5 |
6 | 110 | 6 |
7 | 111 | 7 |
Example: Convert (111010. 1001)2 = (____)8
Solution:
111010. 1001 |
111 010 | 100 100 |
7 2 | 4 4 |
(111010. 1001)2 = (72.44)8 |
We added two zeros at the last as we have only 1, which does not make a group of three bits. 0s are added after 01 because it is after the radix point.
Solved Examples on Binary to Octal Conversion
Example 1: Convert binary (100001)2 to octal.
Solution:
First convert binary (100001)2 to decimal
(100001)2 = 1 × 25 + 0 × 24 + 0 × 23 + 0 × 22 + 0 × 21 + 1 × 20
(100001)2 = 33
Now, convert (33)10 to octal
Octal base (8) | Decimal number to be converted into octal | Remainder |
8 | 33 | 1 ↑ |
8 | 4 | 4 ↑ |
(33)10 = (41)8
(100001)2 = (41)8
Example 2: Convert (1011)2 = (?)8
Solution:
We will use direct method for binary to octal conversion.
= (1011)2
= 001 011
= 1 3
= (1011)2 = (13)8
Example 3: Convert (0010011)2 = (____)8
Solution:
(0010011)2
000 010 011
0 2 3
(0010011)2 = (23)8
Practice Questions on Binary to Octal Conversion
Q1. Convert (1111110)2 = (?)8
Q2. Convert (11101010.010)2 = (?)8
Q3. Convert (110.00101)2 = (?)8
Q4. Convert (001100101)2 = (?)8
Q5. Convert (010.11101)2 = (?)8
Similar Reads
Binary to Decimal Converter Binary to Decimal Converter is a free online tool to convert binary to decimal. Converting between binary to decimal is a common task in everyday life. Here, GeeksforGeeks provides a free user-friendly, and efficient online binary decimal Conversion tool to simplify this process and ensure accuracy.
8 min read
Decimal to Binary Converter The Decimal to Binary Converter is a free, online tool designed to quickly and accurately convert decimal numbers (base 10) to binary numbers (base 2). This tool is especially useful for computer science students, programmers, and anyone who frequently deals with number system conversions.Also, Chec
8 min read
Hex to Decimal Conversion Hex to Decimal Conversion is a fundamental operation in computer science and digital electronics. The operation requires converting numerals from one number system to another, specifically from the Hexadecimal Number System to the Decimal Number System. As we know, a number system is used to represe
12 min read
How to convert Binary to Hexadecimal? A number system is a way of expressing numbers using a consistent set of symbols or digits. The most common number systems are based on different "bases" or "radices," which determine how numbers are represented.Here are some common types of number systems:Decimal Number System (base 10; uses digits
6 min read
Convert Decimal to Octal Number system is one of the ways to represent numbers. Every number system has its base or radix. For example, Binary, Octal, Decimal, and Hexadecimal Number systems are some number systems used in microprocessor programming.Binary Numbers â Base 2Octal Numbers â Base 8Decimal Numbers â Base 10Hexad
7 min read
Convert Bytes To Bits in Python Converting bytes to bits in Python involves representing each byte in its binary form, where each byte is composed of 8 bits. For example , a byte like 0xAB (which is 171 in decimal) would be represented as '10101011' in binary. Letâs explore a few techniques to convert bytes to bits in Python.Using
2 min read