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.

Example 1: 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.


2.        For each group find its octal number.





3.        The octal number is 16546.

Example 2: 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.




2.        For each group find its hexadecimal number.





3.     The hexadecimal number is 1D66


Comments

Popular posts from this blog

Chapter 2 Windows

Fundamentals of computer

Functions of CPU, Memory and Input /Output Devices