Horje
Binary to Octal Conversion

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?

Decimal to Binary, Octal, Hexadecimal, and Other Base n numbers | by Suhail  Roushan ???? | Medium

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?

Decimal to Octal Conversion

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

Lightbox

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

FAQs on Binary to Octal Conversion

What is Binary Number System?

The number system with base 2 is called the binary number system. It uses 1 and 0 to represent the numbers.

What is Octal Number System?

The number system with base 8 is called the octal number system. It uses 0 – 7 to represent the numbers.

How Do You Convert Binary to Octal?

To convert binary to octal we have two methods:

  • Binary to Decimal and then, decimal to octal
  • Direct method to convert binary to octal

What is the Base of Octal Numbers?

The base of octal numbers is 8.




Reffered: https://www.geeksforgeeks.org


Mathematics

Related
Surface Area and Volume of a Right Circular Cone : Practice Problems Surface Area and Volume of a Right Circular Cone : Practice Problems
How to Calculate Probability How to Calculate Probability
How to Calculate Range How to Calculate Range
Cauchy Euler Equation Cauchy Euler Equation
Examples of Acute Angles in Real Life Examples of Acute Angles in Real Life

Type:
Geek
Category:
Coding
Sub Category:
Tutorial
Uploaded by:
Admin
Views:
12