Hexadecimal to Decimal conversion of an integer number

Conversion

In this tutorial we will learn hexadecimal to decimal conversion of an integer number.

Before we dive into the main topic lets talk a little about Decimal and Hexadecimal Number System that we are going to work with in this tutorial.

A decimal number system consists of 10 digits: 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9. So, any number that we use in our daily life is actually in decimal number system.

In hexadecimal number system we use ten digits and six english alphabet letters.
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E and F
10 is denoted as A
11 is denoted as B
12 is denoted as C
13 is denoted as D
14 is denoted as E
15 is denoted as F
Hexadecimal implies base 16

How to convert a hexadecimal number into decimal number?

To convert a hexadecimal number into decimal form we have to multiply
ones place by 160
tens place by 161
hundreds place by 162
and so on…

Convert hexadecimal number A1(base 16) into decimal form

The following table shows the places, hexadecimal number and the multipliers for the corresponding places.

placetensones
hexadecimalA1
multiplier161160
= Ax161  +  1x160
= 10x161  +  1x160
= 160 + 1
= 161

So, the required decimal number is
A1(base 16) = 161(base 10)
Alternatively, (A1)16 = (161)10
Where, (base 10) means the number is in decimal number system and (base 16) means the number is in hexadecimal number system.

Convert hexadecimal number 50AF(base 16) into decimal form

The following table shows the places, hexadecimal number and the multipliers for the corresponding places.

placethousandshundredstensones
hexadecimal50AF
multiplier163162161160
= 5x163  + 0x162  +  Ax161  + Fx160
= 5x163  + 0x162  +  10x16<subp1  + 15x160
= 20480  +  0  +  160  +  15
= 20655

So, the required decimal number is
50AF(base 16) = 20655(base 10)
Alternatively, (50AF)16 = (20655)10
Where, (base 10) means the number is in decimal number system and (base 16) means the number is in hexadecimal number system.

ADVERTISEMENT

ADVERTISEMENT

ADVERTISEMENT

ADVERTISEMENT

ADVERTISEMENT

ADVERTISEMENT