# Hex to Decimal Converter

## Converting Hexadecimal to Decimal

Hexadecimal is a base 16 numbering system, in which each digit of a number are represented by 16 possible characters. These chracters are 0-9 and A-F. Hexadecimal is widely used when representing binary numbers, as they can perfectly represent a byte using only two digits.

Hexadecimal is an excellent way to represent large decimal numbers as you need less digits to represent the same number. For a classic 32 bit integer, you only need 8 hex digits to represent the maximum value, as opposed to the 11 required when using classical base 10 representations. Even numbers are nice!

A traditional decimal number is the sum of digits multiplied by powers of ten. Hexadecimal is the same, but with powers of sixteen.

### Example

Converting `f0a183b`_{16}

to decimal:

`f0a183b`_{16} = 15×16^{6}+0×16^{5}+10×16^{4}+1×16^{3}+8×16^{2}+3×16^{1}+11×16^{0}

Thus, `f0a183b`_{16} = 252319979_{10}