Hex is a base 16 number and decimal is a base 10 number.It is very simple to convert Hex values into Decimal values. The below formulae will help you to convert Hex into Decimal Values.

- Find the decimal equivalent of hex from Hex to Decimal Conversion table.
- Multiply each digit with 16 power of digit location with according to the Conversion table.
- (zero based, 6CE:
**E location is 0, C location is 1 and the 6 location is 2**) - Add all the multipliers, You will find the Decimal Values.

Here is an example:

6CE is a hex number

6CE = (6 * 16^{2}) + (12 * 16^{1}) + (14 * 16^{0})

6CE = (6 * 256) + (12 * 16) + (14 * 1)

6CE = 1536 + 192 + 14

6CE = 1742 (in decimal number)

Hex, or hexadecimal, is a number system of **base 16**. The hex Digits are** 0,1,2,3,4,5,6,7,8 and 9 A, B, C, D, E, F** The Alphabets represnts the count upto 16. This Hexa Decimal system are mainly used in Maths & HTML, CSS Designing for e.g. **(The Hexa Decimal Color code for White is: #FFFFFF & for Black is: #000000)**.

The decimal numeral system is the most commonly used and the standard system. This system uses the number "10" as its base (radix). And so, it has 10 symbols: The numbers from 0 to 9 are anmed as **0, 1, 2, 3, 4, 5, 6, 7, 8 and 9. **

**base 10 digits** are raised to the nth power, in accordance with their position

The Example for Decimal:

For example: Here we take the Decimal Number 3456.78

The digit 6 is in the position of ones (10^{0}, which equals 1),

5 is in the position of tens (10^{1})

4 is in the position of hundreds (10^{2})

3 is in the position of thousands (10^{3})

Meanwhile, the digit 7 after the decimal point is in the tenths (1/10, which is 10-1) and 7 is in the hundredths (1/100, which is 10-2) position
Thus, the number 3456.78 can also be represented as follows: **(3 * 10 ^{3}) + (4 * 10^{2}) + (5 * 10^{1}) + (7 * 10^{-1}) + (8 * 10^{-2}) **

Hexa | Decimal |
---|---|

0 | 0 |

1 | 1 |

2 | 2 |

3 | 3 |

4 | 4 |

5 | 5 |

6 | 6 |

7 | 7 |

8 | 8 |

9 | 9 |

A | 10 |

B | 11 |

C | 12 |

D | 13 |

E | 14 |

F | 15 |

Subscribe to get updated when Kode.Dev products arrive!

or get updates on Twitter

Follow @Kode.Dev