Home How to Convert Decimal to Hexadecimal Manually
Post
Cancel

How to Convert Decimal to Hexadecimal Manually

Numbers without Fractional Part :

  • Division Method is used to convert such numbers from base 10 to another base
  • The division is performed with the required base

Steps To Convert From Base 10 to Base 16

  • Divide the given number (in base 10) with 16 until the result finally left is less than 16
  • Traverse the remainders from bottom to top to get the required number in base 16

Numbers with Fractional Part :

  • To convert such numbers from base 10 to another base, real part and fractional part are treated separately
    • For Real Part :
      • The steps involved in converting the real part from base 10 to another base are same as above.
    • For Fractional Part :
      • Multiplication Method is used to convert fractional part from base 10 to another base.
      • The multiplication is performed with the required base

Example 1 (Real Number):

5815\(_{10}\) → (?)\(_{16}\)

Steps :

  • 5815 / 16 = 363.4375 Fractional Part Separated 0.4375 * 16 = 7 or use mod operation (5815 mod 16 = 7)
  • 363 / 16 = 22 → Reminder → 11 (which is “B” in Hexadecimal)
  • 22 / 16 = 1 → Reminder → 6
  • 1 / 16 = 0 → Reminder → 1
  • Result is 16B7\(_{16}\)

Example 2 (Real Number with Fractional Part):

  • 5815.65625\(_{10}\) → (16B7.?)\(_{16}\)
  • Real Part Result is 16B7\(_{16}\)

Fractional Part :

  • 0.65625 * 16 = 10.5 (10 in hexadecimal is “A”)
  • 0.5 * 16 = 8
  • Result is A8

Final Result is 16B7.A8\(_{16}\)

Informative : ASCII to Hex Table and Modulo Calculator

This post is licensed under CC BY 4.0 by the author.