Decimal to Hex Converter
Use this decimal to hex calculator to convert base-10 integers into hexadecimal with step-by-step division by 16, signed 32/64-bit registers, endian bytes, and 24-bit RGB color preview.
Decimal to Hex Chart & Memory Milestones
Base 10 → Base 16| Decimal | Hex Value | Bytes (BE) | Engineering Context |
|---|---|---|---|
| 10 | 0xA | 0A | First alphabetic hex digit (A) |
| 15 | 0xF | 0F | Max single 4-bit nibble |
| 16 | 0x10 | 10 | Base-16 radix boundary (16^1) |
| 255 | 0xFF | FF | Max 8-bit unsigned byte / RGB channel |
| 420 | 0x1A4 | 01 A4 | 3-step divide-by-16 example |
| 4,096 | 0x1000 | 10 00 | 4 KiB OS virtual memory page |
| 32,768 | 0x8000 | 80 00 | Signed 16-bit int16 MSB boundary |
| 65,535 | 0xFFFF | FF FF | Max uint16 / TCP port limit |
| 1,920,728 | 0x1D4ED8 | 1D 4E D8 | 24-bit CSS RGB color #1D4ED8 |
| 16,777,215 | 0xFFFFFF | FF FF FF | Max 24-bit RGB white (#FFFFFF) |
Click any milestone row to load that value into the decimal to hex converter and inspect its divide-by-16 derivation and memory byte layout.
Signal & Number Converters
9 toolsRepeated Division by 16 & Signed Hexadecimal Registers
Every decimal to hexadecimal calculation converts a base-10 integer into base-16 by dividing repeatedly by 16 and mapping each remainder to a single hexadecimal symbol (0–9 and A=10 … F=15). Reading the remainders from last to first produces the exact hexadecimal numeral. This decimal to hex converter renders every quotient and remainder row automatically so students and systems engineers can verify manual math or register constants in seconds.
Because each hexadecimal digit packs exactly four binary bits (one nibble), radix-16 remains the compact shorthand for memory addresses, bitmasks, and C/Rust fixed-width integers. Switch between arbitrary unsigned, uint32, int32, uint64, and int64 inside this decimal to hex calculator to inspect exact zero-padded widths and Two’s Complement negative encodings without overflow.
Hexadecimal Color Codes, Byte Order & Worked Examples
Beyond classroom decimal to hexadecimal exercises, this decimal to hex converter bridges base-10 integers directly to hardware byte layouts (Big-Endian vs. Little-Endian) and 24-bit RGB color values. Use the interactive decimal to hex chart above or review these common derivations:
| Decimal (Base 10) | Divide-by-16 Trace | Hex (Base 16) | Memory / Color Format |
|---|---|---|---|
| 255 | 255÷16 = 15 r15 (F); 15÷16 = 0 r15 (F) | 0xFF | Byte FF · #0000FF |
| 420 | 420÷16 = 26 r4; 26÷16 = 1 r10 (A); 1÷16 = 0 r1 | 0x1A4 | BE: 01 A4 · LE: A4 01 |
| 1,024 | 1024÷16 = 64 r0; 64÷16 = 4 r0; 4÷16 = 0 r4 | 0x400 | BE: 04 00 · 1 KiB |
| 65,535 | Four consecutive remainders of 15 (F) | 0xFFFF | uint16 max (2 bytes) |
| 1,920,728 | R=29 (1D), G=78 (4E), B=216 (D8) | 0x1D4ED8 | CSS #1D4ED8 Cobalt |
| −1 (int32) | 2³² − 1 = 4,294,967,295 → eight F nibbles | 0xFFFFFFFF | Signed 32-bit all-ones |
Need the reverse power-of-16 expansion, binary fractions, or UTF-8 hex byte dumps? Switch directly to our Hex to Decimal Converter, Decimal to Binary Converter, or the full Hex Converter.
“The 6-digit hexadecimal notation defines an sRGB color by specifying red, green, and blue channels as three pairs of base-16 digits from 00 to FF.”
— Standard reference: W3C CSS Color Module Level 4 — Hexadecimal Color Notation
Hexadecimal & Signed Register Q&A
- How do you convert decimal to hexadecimal using base-16 division?
- Divide the decimal integer by 16 and record the remainder (0–9 stay 0–9, while 10–15 map to A–F). Repeat with each integer quotient until the quotient reaches 0, then read the recorded hex digits from bottom to top. For 420, remainders 4, 10 (A), and 1 assemble upward into 1A4.
- How does this decimal to hex converter handle negative numbers?
- In Unsigned mode, a minus sign stays outside the hexadecimal magnitude (for example, −420 becomes −0x1A4). In signed int32 or int64 mode, the engine applies Two’s Complement wraparound by adding 2³² or 2⁶⁴ before dividing by 16, so −1 outputs 0xFFFFFFFF in 32-bit registers.
- Why do Big-Endian and Little-Endian byte orders differ for the same hex integer?
- Hexadecimal digits are paired into 8-bit bytes from right to left. Big-Endian (network byte order) stores the most significant byte first (420 → 01 A4), whereas Little-Endian CPUs like x86-64 and ARM64 store the least significant byte at the lowest address (A4 01).
- How do decimal integers map to CSS hex color codes?
- An integer between 0 and 16,777,215 packs three 8-bit sRGB channels—Red, Green, and Blue—into six hex digits (#RRGGBB). For example, 1,920,728 divides cleanly into 0x1D (29), 0x4E (78), and 0xD8 (216), producing #1D4ED8.
- Can this decimal to hex calculator process 64-bit or larger integers accurately?
- Yes. JavaScript floating-point numbers lose integer precision above 2⁵³, but every calculation here uses native BigInt arithmetic so full uint64, int64, and 128-bit memory addresses remain exact.