Before starting to convert hexadecimal numbers in decimal number, go through the following articles:

- Numbers Representation Systems – Decimal, Binary, Octal and Hexadecimal: this articles explains the different types of number representation systems: decimal, binary, hexadecimal and octal
- Decimal to Hexadecimal Conversion: this article explains how to convert a decimal number into a hexadecimal number

Let’s start by writing down the first four powers of 16 (we’ll use them in our conversion example):

\[\begin{split}16^0 &= 1 \\

16^1 &= 16 \\

16^2 &= 256 \\

16^3 &= 4096

\end{split}\]

For example, let’s convert the hexadecimal number **0xFACE** into a decimal number.

### Method 1

This method is straightforward and it’s using the powers of 16.

**Step 1**. Convert each of the hexadecimal symbols into decimal symbols, as follows:

Hexadecimal | F | A | C | E |

Decimal | 15 | 10 | 12 | 14 |

**Step 2**. Multiply each of the decimal numbers with the corresponding power of 16, as follows:

Decimal | 15 | 10 | 12 | 14 |

Powers of 16 | 16^{3} | 16^{2} | 16^{1} | 16^{0} |

Multiplication | 15·16^{3} | 10·16^{2} | 12·16^{1} | 14·16^{0} |

**Step 3**. Add the products of all multiplication operations. The result is going to be the decimal number.

The hexadecimal number **0xFACE** converted to decimal is **64206**.

### Method 2

This method is not as direct as the first one, but it’s easier to execute because it does not involve heavy multiplications. It can also be performed without a calculator or software. The principle of this method is to use a **hexadecimal to binary transformation** first and a **binary to decimal conversion** second.

A hexadecimal number can be represented on 4 bits. For example, the highest symbol in hexadecimal notation is **F**, which in binary is** 0b1111**.

**Step 1**. Convert the hexadecimal numbers into binary, as follows:

Hexadecimal | F | A | C | E |

Decimal | 15 | 10 | 12 | 14 |

Binary | 1111 | 1010 | 1100 | 1110 |

**Step 2**. Concatenate the four binary numbers into one, as follows:

1111101011001110

**Step 3**. Convert the binary number into decimal, using the powers of 2:

1 \cdot 2^{15}+1 \cdot 2^{14}+1 \cdot 2^{13}+1 \cdot 2^{12}+1 \cdot 2^{11}+0 \cdot 2^{10}+1 \cdot 2^9+ …\\

0 \cdot 2^8+1 \cdot 2^7+1 \cdot 2^6+0 \cdot 2^5+0 \cdot 2^4+1 \cdot 2^3+1 \cdot 2^2+1 \cdot 2^1+0 \cdot 2^0

\end{split} \]

**Step 4**. Perform the sum of the multiplications to get the decimal number

As you can see, we obtained the same result with both methods. The advantage of the second one is that it deals with simpler multiplications and can be performed without a handheld calculator or software.

Of course, we can also use the Scilab function `hex2dec()`

to convert from hexadecimal to decimal.

`--> hex2dec('FACE')`

`ans =`

` 64206.`

`-->`

For any questions, observations and queries regarding this article, use the comment form below.

Don’t forget to Like, Share and Subscribe!