How to convert Decimal to Hexadecimal
Converting a decimal number from decimal system to hexadecimal system repeatedly dividing the decimal number by 16 (hexadecimal is base-16) and get the remainder and quotient until the quotient becomes zero.
Let's see an example. Convert the decimal number 315 to hexadecimal :
- Divide 315 by 16 : 315 ÷ 16 = 19 remainder 11. 11 Decimal is Hexadecimal as B. Concatenate the remainder and quotient : B19
- Divide the quotient 19 by 16 : 19 ÷ 16 = 1 remainder 3. Concatenate the remainder and quotient : 3B19
- Divide the quotient 1 by 16 : 1 ÷ 16 = 0 remainder 1. Concatenate the remainder and quotient: 13B19.
The decimal number 315 is equivalent to the hexadecimal number 13B19.