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).

**Contents**show

**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 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} = 16^{2} × A + 16^{1} × 3 + 16^{0} × 5

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

= 2560 + 48 + 5

= 2613

= (2613)_{10}

Take another example.

(3FE)_{16} = 16^{2} × 3 + 16^{1} × F + 16^{0} × 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.

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 |