# Decimal to Hex Converter

Use this online converter to easily convert decimals to hexadecimal numbers.

## Conversion of decimals to hex numbers

Hexadecimals, or hex numbers, are used primarily in computer engineering since programming code and character tables like Unicode are often represented as numbers in the hexadecimal system (base 16). Decimals (base 10) are used widely in everyday life, science, accounting, and so on. Sometimes a conversion from decimal to hex representation of a number is needed to facilitate writing code, referencing a character, etc.

Conversion of the numbers of 0 to 9 is straightforward since these are the same in both systems. For decimals from 10 to 15 see the reference table below. For larger numbers the process is more complex and is explained below.

## How to convert decimal to hex

Let us denote the number we want to convert from decimal to hex by X. The first step is to find the largest power of 16 ≤ X and denote it by E. Then, determine how many times the power of 16 found above goes into X, denote it by Z_{1}. Denote the remainder by Y_{1}.

Repeat the above steps using Y_{n} as a starting value until 16 is larger than the remaining value and assign the remainder to the 16^{0} position, then assign each of the values Y_{1...n} to its respective position and you will have your hex value.

**Example dec to hex conversion:** Convert 1000 in decimal to hex.

1.) Largest power E = 2 (16^{2} = 256 ≤ 1000, 16^{3} = 4,096 ≥ 1000)

2.) Z_{1} = 1000 / 16^{2} = 3 (232 remainder); Y_{1} = 232

3.) Largest power E = 1 (16^{1} = 16 ≤ 232, 16^{2} = 256 ≥ 232)

4.) Z_{2} = 232 / 16^{1} = 14 (8 remainder); Y_{2} = 8

5.) 8 < 16; Z_{3} = 8, end.

Combine Z_{1..n} to get 3E8 (14 dec = E hex).

As you can see, the above process can be fairly tedious to do manually if the number is larger, therefore we recommend using our free online converter instead, when available.

## Decimal to hex conversion table

Decimal | Hex |
---|---|

0 | 0 |

1 | 1 |

2 | 2 |

3 | 3 |

5 | 5 |

10 | A |

11 | B |

12 | C |

13 | D |

14 | E |

15 | F |

50 | 32 |

63 | 3F |

100 | 64 |

1000 | 3E8 |

10000 | 2710 |

#### Cite this converter & page

If you'd like to cite this online converter resource and information as provided on the page, you can use the following citation:

Georgiev G.Z., *"Decimal to Hex Converter"*, [online] Available at: https://www.gigacalculator.com/converters/convert-decimal-to-hex.php URL [Accessed Date: 06 Apr, 2020].