Reading numbers the way a computer does
Every base is just a different way of writing the same quantity. The number “two hundred fifty-five” is 255 in decimal, 0xFF in hex, 0o377 in octal, and 11111111 in binary — identical value, four notations. Choosing the right base isn’t about the number; it’s about what you’re trying to see:
| Base | Best reveals | Where you meet it |
|---|---|---|
| Binary (2) | Individual bits / flags | Bitmasks, low-level I/O |
| Octal (8) | 3-bit groups | Unix file permissions |
| Decimal (10) | Human-friendly magnitude | Everyday counting |
| Hex (16) | Bytes and nibbles | Colors, memory, bytes, Unicode |
Octal’s one surviving job: chmod
Octal feels archaic until you touch Linux permissions, where it’s perfect. Each permission digit packs three bits — read (4), write (2), execute (1) — so a single octal digit (0–7) describes one permission group exactly. chmod 755 reads as 7=rwx for the owner, 5=r-x for group, 5=r-x for others. The mapping is so clean precisely because 8 = 2³, and there are three permission bits per group. That alignment is why octal, not decimal, survived here.
Big numbers without precision loss
A subtle trap in many converters: JavaScript’s regular numbers lose precision above 2⁵³ (9,007,199,254,740,991), silently turning the last digits of huge values into zeros. This tool uses BigInt, so you can convert numbers with hundreds of digits — cryptographic values, large hashes, 64-bit identifiers — without corruption. If you’ve ever seen a large ID’s trailing digits mysteriously become 000, that’s the IEEE 754 limit, and BigInt is the fix both here and in your own code.
A note on negatives and fractions
This converter handles unsigned whole integers. Negative numbers in binary use two’s complement — invert the bits and add one — which requires knowing the bit width (8-bit, 16-bit, 32-bit) because the sign lives in the top bit, so a plain base conversion can’t represent them unambiguously. Fractional values introduce repeating expansions (0.1 decimal is an infinite binary fraction), which is its own complexity. For both, you handle the sign or fraction logic explicitly; the converter covers the integer core that underlies them.