Hexadecimal Number System and Conversions

In this article, we will learn another numbering system, known as hexadecimal number system. It has a base of sixteen (16). It means that there are sixteen digits with the help of which we can represent any number of the hexadecimal family. The digits are (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F).

Representation of hexadecimal number

It is represented as (X)16

where, X is the hexadecimal number and the base 16 is written as suffix or radix.

example: (54)16, (AE1)16, (DEF5)16, (974)16, etc. are the examples of a hexadecimal number.

Consider a hexadecimal number (10101110)16 as shown below. Here leftmost digit is known as a most significant digit (MSD) and rightmost digit is known as a least significant digit (LSD).

hexadecimal-number

Hexadecimal to Decimal conversion

Expand the number given in hexadecimal form in the power of 16 and sum the values, the result which we will get will be in the decimal form. For example-

(A35)8 = 162 × A + 161 × 3 + 160 × 5

= 256 × 10 + 16 × 3 + 1 × 5

= 2560 + 48 + 5

= 2613

= (2613)10

Take another example.

(3FE)16 = 162 × 3 + 161 × F + 160 × E

= 256 × 3 + 16 × 15 + 1 × 14

= 768 + 240 + 14

= 1022

= (1022)10

Decimal to Hexadecimal conversion

Divide the number by 16 and take only the remainder, if the division is completed than take only the remainder which gives the hexadecimal number. First of all, MSD is written on the left and move until LSD is reached.

Consider an example.

Find the hexadecimal equivalent for decimal 987.

decimal-to-hexadecimal-conversion2

 

MSD = most significant digit = 3

LSD = least significant digit = B

We have to write remainder values moving from bottom to top (left to write on paper) as shown above.

Therefore, the hexadecimal equivalent for decimal 987 is (3DB)16.

Here is the table for Hexadecimal equivalent of first 16 decimal numbers.

Decimal number (base = 10) Hexadecimal number (base = 16)
0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
10 A
11 B
12 C
13 D
14 E
15 F

 

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.