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

Convert 7562_{10} to hex:

Division by 16 |
Quotient | Remainder (decimal) |
Remainder (hex) |
Digit # |
---|---|---|---|---|

7562/16 | 472 | 10 | A | 0 |

472/16 | 29 | 8 | 8 | 1 |

29/16 | 1 | 13 | D | 2 |

1/16 | 0 | 1 | 1 | 3 |

So 7562_{10} = 1D8A_{16}

Convert 35631_{10} to hex:

Division by 16 |
Quotient | Remainder (decimal) |
Remainder (hex) |
Digit # |
---|---|---|---|---|

35631/16 | 2226 | 15 | F | 0 |

2226/16 | 139 | 2 | 2 | 1 |

139/16 | 8 | 12 | B | 2 |

8/16 | 0 | 8 | 8 | 3 |

So 35631_{10} = 8B2F_{16}

How to convert hex to decimal ►