Decimal to Hexadecimal Converter Convert your data

Input Data String

 

Output Data String

 

 

How to convert decimal to hex

Conversion steps:

  1. Divide the number by 16.
  2. Get the integer quotient for the next iteration.
  3. Get the remainder for the hex digit.
  4. Repeat the steps until the quotient is equal to 0.

Decimal to hex conversion table

Decimal (Base 10) HexaDecimal (Base 16)
0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
10 A
11 B
12 C
13 D
14 E
15 F

 

For number higher that 15 the same logic will follow as in decimal numbers.

Decimal (Base 10) HexaDecimal (Base 16)
16 10
17 11
18 12
19 13
20 14
21 15
22 16
23 17
24 18
25 19
26 1A
27 1B
28 1C
29 1D
30 1E
31 1F

 

Example

Convert 12345678910 to hex:

Division by 16 Quotient (integer) Remainder (decimal) Remainder (hex) Digit number
123456789/16 7716049 5 5 0
7716049/16 482253 1 1 1
482253/16 30140 13 D 2
30140/16 1883 12 C 3
1883/16 117 11 B 4
117/16 7 5 5 5
7/16 0 7 7 5

 

12345678910 = 75BCD1516

 

Source