# Conversion of Binary to Octal, Hexadecimal

## Conversion of Binary to Octal, Hexadecimal

A binary number can be converted into octal or hexadecimal number using a shortcut method.

The shortcut method is based on the following information—
• An octal digit from 0 to 7 can be represented as a combination of 3 bits, since 23 = 8.
• A hexadecimal digit from 0 to 15 can be represented as a combination of 4 bits, since 24 = 16.

## The Steps for Binary to Octal Conversion are—

1. Partition the binary number in groups of three bits, starting from the right-most side.
2. For each group of three bits, find its octal number.
3. The result is the number formed by the combination of the octal numbers.

## The Steps for Binary to Hexadecimal Conversion are—

1. Partition the binary number in groups of four bits, starting from the right-most side.
2. For each group of four bits, find its hexadecimal number.
3. The result is the number formed by the combination of the hexadecimal numbers.

## Convert the binary number 1110101100110 to octal.

Given binary number   -       1110101100110

1. Partition binary number in groups of three bits, starting from the right-most side.
1     110     101     100     110
2. For each group find its octal number.
1     110     101     100     110
1       6       5         4         6
3. The octal number is 16546.

## Convert the binary number 1110101100110 to hexadecimal

Given binary number   -       1110101100110

1. Partition binary number in groups of four bits, starting from the right-most side.
1     1101     0110     0110
For each group find its hexadecimal number.
1     1101     0110     0110
1       D         6           6
3. The hexadecimal number is 1D66.