Hexadecimal Number System
The Number system uses 16 bases and commonly used in programming.
Hexadecimal Digit | Equivalent Decimal Values |
---|---|
0 | 0 |
1 | 1 |
2 | 2 |
3 | 3 |
4 | 4 |
5 | 5 |
6 | 6 |
7 | 7 |
8 | 8 |
9 | 9 |
a / A | 10 |
b / B | 11 |
c / C | 12 |
d / D | 13 |
e / E | 14 |
f / F | 15 |
Hexadecimal Number uses as base value instead of 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 = 1
Base value of OxE in Ox3E8 is = 16
Base value of Ox3 in Ox3E8 is = 256
Let's evaluate the place values, now:
Place value of Ox8 in Ox3E8 is = 8
Place value of OxE in Ox3E8 is = 224
Place value of Ox3 in Ox3E8 is = 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?
Q1 = 28 and R1 = 2
Q2 = 1 and R2 = 12 = C
Q3 = 0 and R3 = 1
Q4 = 0 and R4 = 0
450 = Ox01C2 = Ox1C2