Number Conversion - Binary to Hexadecimal and Hexadecimal to Binary



UpdatedUpdatedJune 04 - 2017June 04 - 2017

Binary to Hexadecimal:

Using the knowledge that we have gained from the previous lessons, we first convert the binary number into decimal, and later we convert the decimal into hexadecimal number.


Shortcut method - binary to hexadecimal:

Let's first develop a chart containing all binary hexadecimal representations.

BinaryOctal
00000
00011
00102
00113
01004
01015
01106
01117
10008
10019
1010A
1011B
1100C
1101D
1110E
1111F



Now we will use this chart to convert the numbers easily.


Binary (base-2) to hexadecimal (base-16) conversion:
Step 1: From right (LSD or least significant digit) to left (MSD or most significant digit), divide the binary digits into groups of four.
Step 2: Convert each group of four binary digits into one hexadecimal digit.
Step 3: Combine all the resulting hexadecimal digits into a single hexadecimal number.


Example:

Binary number: 11011102
Or, 0110 11102
StepBinaryHexadecimal
111011102---
201102 11102616 E16
30110111026E16
So, the hexadecimal representation: 6E16


Hexadecimal to Binary:

Using the knowledge that we have gained from the previous lessons, we first convert the hexadecimal number into decimal, and later we convert the decimal into binary number.


Shortcut method - hexadecimal to binary:


Hexadecimal (base-16) to Binary (base-2) conversion:
Step 1: From left (MSD or most significant digit) to right (LSD or least significant digit), convert each hexadecimal digit into a 4-digit binary number.
Step 2: Combine all the resulting binary digits into a single binary number.


Example:

Hexadecimal number: 6E16
StepHexadecimalBinary
16E1601102 11102
26E1611011102
So, the binary representation: 11011102