Skip to main content
HexConverter

How to Convert Decimal to Hexadecimal

Master manual decimal-to-hexadecimal conversion using the classic repeated division-by-16 method. Follow detailed step-by-step algorithms, observe worked examples, and test your understanding with 5 interactive practice problems.

The Division-by-16 Remainder Algorithm

Converting decimal integers to hexadecimal requires extracting remainders through repeated division by 16:

  1. Divide the decimal number by 16. Record the integer quotient and the remainder.
  2. If the remainder is between 10 and 15, convert it to its hex letter (10=A, 11=B, ..., 15=F).
  3. Take the quotient from the previous step and divide by 16 again.
  4. Repeat until the quotient becomes 0.
  5. Read the sequence of remainders from bottom to top (last remainder is the first hex digit).

Detailed Walkthrough: Converting Decimal 759

  • Step 1: 759 ÷ 16 = 47, with remainder 7.
  • Step 2: 47 ÷ 16 = 2, with remainder 15 (which is F).
  • Step 3: 2 ÷ 16 = 0, with remainder 2. Quotient is 0, so stop.

Reading the remainders from bottom to top yields: 2, F, 7 → 0x2F7.

Need to convert negative numbers or large values?

Our online tool generates division tables and handles two's complement automatically.

Open Decimal to Hex Tool

Interactive Practice Problems

Test your division-by-16 skills on these 5 practice exercises. Click "Show Answer" to review the full step-by-step solution.

Problem 1

Convert decimal 255 to hexadecimal.

Hint: This is the maximum value of an 8-bit byte.

Problem 2

Convert decimal 100 to hexadecimal.

Hint: 100 is less than 256, so the result will have 2 digits.

Problem 3

Convert decimal 1000 to hexadecimal.

Hint: Remainder 14 converts to a letter.

Problem 4

Convert decimal 4096 to hexadecimal.

Hint: Notice that 4096 is an exact power of 16 (16³).

Problem 5

Convert decimal 6699 to hexadecimal.

Hint: Follow the 4 division steps carefully.

Frequently Asked Questions

Direct answers to technical and practical questions regarding this tool and base-16 conversion.

Why do we stop dividing when the quotient reaches 0?

Because when the quotient is 0, dividing 0 by 16 would indefinitely produce 0 remainder 0, adding unnecessary leading zeros (e.g. 000FF). Reaching 0 signifies that all significant place values have been extracted.

What if a remainder is larger than 9?

In base 16, remainders 10, 11, 12, 13, 14, and 15 must be written as letters A, B, C, D, E, and F respectively. Never write "10" as a single column remainder; write "A".

Related Conversion Tools & Resources

Explore companion converters, bitwise arithmetic calculators, and reference charts.

Sources & Technical References

Technical Verification & Editorial Accountability

Written by Sarah Chen (Embedded Systems Engineer) • Verified by Marcus Brody, PE

Reviewed: 2026-10-02MethodologyEditorial PolicyReport Error