Number Base Converter
Convert numbers between binary, octal, decimal, hexadecimal and base 36 — with bit widths, two's complement and byte breakdowns.
Number base converter
Updates as you typeSource base
Interpret input as ?
—
Value
Number ?
0–9
DEC
Presets
Bit width (binary padding & two’s complement)
Width ?
auto
Signed mode ?
Display (optional)
Digit grouping ?
Hex case
Invalid digits
Formula
To decimal — positional sum
N
=
∑
di
·
bi
Each digit di at position i (counted from the right, starting at 0) contributes di × bi, where b is the source base.
From decimal — divide by the target base
- Divide the decimal value by the target base.
- Record the remainder as the next digit (right-to-left).
- Replace the value with the quotient.
- Repeat until the quotient is 0.
Worked example — your input
Source: —
(base —)
→ decimal —
Positional expansion
Divide-by-base table
(target base 16)
| Step | Value | ÷ base | Remainder | Digit |
|---|
Reading digits bottom-up →
—
Powers of 2
| 20 | 1 |
| 24 | 16 |
| 28 | 256 |
| 210 | 1.024 |
| 216 | 65.536 |
| 232 | 4.294.967.296 |
Hex digits
| A | 10 | 1010 |
| B | 11 | 1011 |
| C | 12 | 1100 |
| D | 13 | 1101 |
| E | 14 | 1110 |
| F | 15 | 1111 |