Decimal to hex converter with ÷16 steps

Convert decimal to hex with a ÷16 remainder table and two’s complement negatives.

Was this helpful?
Share Tool

255 as hex is FF: keep dividing by sixteen and write each leftover as a glyph (15 becomes F, never the two characters “15”). The widget also shows the bits so you can check that FF is eight 1s.

Going back? Hex to decimal adds F×16 + F. The four-base box is still the binary converter hub.

255 yields leftovers 15 then 15 → F F. 13 is a single leftover 13 → D. A second check walks the bits: 255 is 11111111, two nibbles of 1111, which is FF again.

A negative integer is stored as all-ones at the picked width: −1 at 16 bits prints FFFF. Eight-bit −1 is FF. Ask for signed 8-bit 255 and the range banner fires, because 255 sits outside −128…127. Integers past 2^53 stay exact here because the engine uses BigInt.

Reveal the working panel for the ÷16 leftover list (the first leftover is the least-significant hex digit) and a nibble walk through the bits. This tab never uploads the value.

How to convert decimal to hex

  1. Enter 255, 13 or −1. Hex updates at once; bits sit on the second card as a check.
  2. Keep Signed unless you need 255 inside eight bits (then switch to Unsigned). Width radios are Auto plus 8/16/32/64.
  3. Reveal the working panel: leftovers of ÷16 become 0–9 and A–F, lowest leftover on the right.
  4. Copy FF or FFFF. A red banner appears when the integer will not fit the width.

Key Features

  • Decimal → hex glyphs, with bits as a check
  • Leftovers 10–15 written as A–F, never “10”
  • −1 at 16 bits is FFFF; 255 is FF
  • Via-bits nibble walk as a second method
  • BigInt so 20-digit integers stay exact

Repeated ÷16, and the via-binary method

  • 255 ÷ 16 = 15 remainder 15 (F); 15 ÷ 16 = 0 remainder 15 (F). Bottom-up: FF.
  • 13 ÷ 16 = 0 remainder 13 (D). One remainder is enough. 1000 ÷ 16 = 62 rem 8; 62 ÷ 16 = 3 rem 14 (E); 3 ÷ 16 rem 3 → 3E8.
  • Via binary: 255 is 11111111, grouped 1111 1111 → F F. 13 is 1101 → D. Same glyphs, useful when you already have bits.
  • Common slip: reading remainders top-down, or writing remainder 10 as “10” instead of the glyph A.

Negatives, width, and milestones

  • −1 packed into sixteen bits is FFFF. Packed into eight bits it is FF. Wider fields only add F glyphs on the left.
  • −13 packed into eight bits is F3 (hex of 11110011). The bit pattern matches decimal to binary.
  • Unsigned eight-bit ceiling is 255 (FF); signed eight-bit ceiling is 127 (7F). 256 needs at least nine bits, so Auto steps to 16 and prints 100.
  • The chart below lists 0–16 plus 32, 64, 100, 127, 128, 255, 256, 512, 1000, 1024 and 65535 (FFFF).

Common mistakes

  • Writing remainder 15 as 15 instead of F. Hex digits above 9 are A–F, one glyph each.
  • Padding on the right before invert+1. −1 at 8 bits is FF, not F0000000.
  • Mixing this with a text-to-hex encoder. Letters belong on the text-hex converter; this page is a number.
  • Assuming JavaScript Number is exact above 2^53. This page uses BigInt for the integer part.
  • Forgetting that Auto width will not warn on 300 in 8 bits because it silently steps up to 16.

Reference: 0–16 and hex milestones (≤40 rows)

  • Rows are decimal, hex and binary from the shipped converter. 65535 is FFFF, sixteen 1s.
DecimalHexBinary
000
111
2210
3311
44100
55101
66110
77111
881000
991001
10A1010
11B1011
12C1100
13D1101
14E1110
15F1111
161010000
3220100000
64401000000
100641100100
1277F1111111
1288010000000
255FF11111111
256100100000000
5122001000000000
10003E81111101000
102440010000000000
65535FFFF1111111111111111

Frequently Asked Questions

What is 255 in hex?

FF. Two remainders of 15. Binary 11111111, octal 377.

What is −1 in 16-bit two’s complement hex?

FFFF. Sixteen 1s. At 8 bits the same value is FF.

What is 13 in hex?

D. One remainder 13. Binary 1101.

Does 255 fit in 8-bit signed mode?

No. Signed 8-bit max is 127 (7F). Switch to Unsigned, or let Auto pick 16 bits. 255 unsigned is FF.

How is 1000 written in hex?

3E8. Remainders 8, 14 (E), 3 read bottom-up. Binary 1111101000.

Is this the same as the binary converter hub?

Same engine, one direction. The hub shows four bases in one box. This page is the ÷16 lesson for decimal → hex.

Expert Guide for Decimal to Hex Converter

View Blog
Two's Complement Explained: 8-Bit Examples

Two's Complement Explained: 8-Bit Examples

Learn two’s complement with 8-bit tables: −1, −5, −128 and 127. Invert+1 steps and a calculator that shows the range.

Read Guide

Categories

Browse all FlashKit tools