Conversion Explanation
This converter applies a simple algorithm to convert a hex number into a decimal number, and to generate a decimal number from a hex number.
A
hexadecimal number is just like a
decimal number, except that it uses 16 symbols instead of 10. These are: {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b, c, d, e, f}. Decimal and hexadecimal are both examples of [numeral systems].(
https://en.wikipedia.org/wiki/Numeral_system)
JavaScript Snippet
The JavaScript code that is used on this page is very simple. For the converting decimal to hexadecimal, the following code is used:
> var decimal = parseInt(hex, 16);
And for reversing the translation, this code is used:
> var hex = decimal.toString(16);
↓ Read more... ↓