Skip to content
Hexadecimal Number System

Hexadecimal Number System

The Number system uses 16 bases and commonly used in programming.

Hexadecimal DigitEquivalent Decimal Values
00
11
22
33
44
55
66
77
88
99
a / A10
b / B11
c / C12
d / D13
e / E14
f / F15

Hexadecimal Number uses 16x16^x as base value instead of 10x10^x like we use in decimal number.

Play with Hexadecimal Color Codes (opens in a new tab)

Hexadecimal to Decimal Conversion

Your grandfather gifted you a remote control car & your mother gave you a challenge to figure out, how much it costs ? Otherwise you can't play with that car. Your mother gave you this hint: Price amount is "3E8" in Hexadecimal. How much rupees did it cost?

As we know the value of the car is "3E8" in Hexadecimal (Ox3E8), we have to convert it in decimal.

Let's evaluate the absolute values:
Absolute value of Ox8 in Ox3E8 is 8
Absolute value of OxE in Ox3E8 is 14
Absolute value of Ox3 in Ox3E8 is 3

Let's evaluate the base values:
Base value of Ox8 in Ox3E8 is 16016^0 = 1
Base value of OxE in Ox3E8 is 16116^1 = 16
Base value of Ox3 in Ox3E8 is 16216^2 = 256

Let's evaluate the place values, now:
Place value of Ox8 in Ox3E8 is 8×18 \times 1 = 8
Place value of OxE in Ox3E8 is 14×1614 \times 16 = 224
Place value of Ox3 in Ox3E8 is 3×2563 \times 256 = 768

So, the decimal value of Ox3E8 is 768 + 224 + 8 = 1000

Now surprise your mother by shouting "1000 Rupees". Then, snatch the car & play with it!

Decimal to Hexadecimal Conversion

A software engineer is writing a program that will convert decimal numbers to hexadecimal. The engineer needs to test the program with a few different numbers. What are the hexadecimal equivalents of the decimal numbers 450?

45016    \frac{450}{16} \implies Q1 = 28 and R1 = 2

2816    \frac{28}{16} \implies Q2 = 1 and R2 = 12 = C

116    \frac{1}{16} \implies Q3 = 0 and R3 = 1

016    \frac{0}{16} \implies Q4 = 0 and R4 = 0

450 = Ox01C2 = Ox1C2