LifeTally
Integer base converter
How is the same whole integer written in bases 2, 8, 10 and 16?
Enter a signed integer and its base to see four complete equivalent representations.
Integer and input base
Use 0–1 for base 2, 0–7 for base 8, 0–9 for base 10, or 0–9 and A–F for base 16. An optional leading + or - is allowed. Outer spaces are ignored; inner spaces are invalid. Write AD, not 0xAD. Lowercase a–f is also accepted in base 16.
The selected base controls every digit. There is no automatic base detection or exponent notation. In base 16, E means 14 and B means 11: 1e3 means 483 in decimal, and 0b10 means 2832 in decimal.
At most 1000 entered digits, including leading zeros; the sign and outer spaces do not count. This is our processing and display limit, not a mathematical bound.
How the estimate works
In base b, each digit contributes its value multiplied by the appropriate power of b, starting with b⁰ at the right. A leading - negates the whole magnitude. All four outputs require both a valid integer and a valid selected base, including for zero.
OpenStax: positional notation and bases ↗University of Cambridge: binary, octal and hexadecimal ↗
Whole integers only. This does not convert fractions, floating-point encodings, fixed-width words, two’s-complement bit patterns, byte order, text or files. The minus sign is a mathematical sign; no sign bit is added.
Check the filled example
Our example is decimal 173: binary 10101101, octal 255 and hexadecimal AD. Check: 128 + 32 + 8 + 4 + 1 = 173; 2 × 64 + 5 × 8 + 5 = 173; 10 × 16 + 13 = 173.
Accepted input values
- Whole integer
- 173
- Input base
- 10
Plan the next step
To check a short positional expansion by ordinary arithmetic, use the everyday calculator.
Open the everyday calculator →