How do I convert binary to decimal manually?
For each bit that equals 1, add 2 raised to the bit's position (counting from the right, starting at zero). For 101010: bit 1 at position 5 = 32, bit 1 at position 3 = 8, bit 1 at position 1 = 2 → 32+8+2 = 42. Programmatically, JavaScript does this with parseInt(string, 2).
What is the largest binary I can convert?
Up to 53 bits, because JavaScript numbers only guarantee integer precision to 2^53 − 1 (Number.MAX_SAFE_INTEGER). For longer bit strings, use BigInt: BigInt("0b" + bits) parses arbitrary-length binary into an exact integer.
Does the input accept a 0b prefix?
Yes. The converter accepts 0b101010 or just 101010 — both parse to 42 decimal. Whitespace is also stripped. Anything other than 0, 1, or the 0b prefix triggers an error.
Why might my binary parse as a wrong number?
The two most common causes are accidental whitespace inside the bit string (the regex requires contiguous 0/1) and bit-length overflow above 53. The validator surfaces both. If you copied bits from a hex dump, double-check that the source did not pad with letters or formatting characters.
How does parseInt(s, 2) actually work?
It walks the string left-to-right, multiplies the accumulator by 2 at each step, and adds the current bit. For "1010": 0·2+1=1, 1·2+0=2, 2·2+1=5, 5·2+0=10 → decimal 10. This is the standard Horner-method polynomial evaluation, the same approach a CPU uses internally.
Can the tool handle two's complement / signed binary?
No — this tool treats input as an unsigned magnitude. To interpret a fixed-width two's-complement value, prepend the sign bit logic yourself: if the top bit is 1, subtract 2^width to recover the negative value. For example, 8-bit 11111111 unsigned is 255 but two's-complement is −1.
Why are leading zeros allowed?
Leading zeros are ignored mathematically — 00001010 and 1010 both equal 10 — but they preserve bit width visually. We keep them in the input so you can paste 8-bit, 16-bit, or 32-bit fields exactly as they appear in a register dump or protocol spec.
Is the data sent to a server?
No. All conversion happens in JavaScript inside your browser. Open DevTools → Network and confirm zero requests when you click Convert. Safe for internal data, secret keys, or proprietary numeric values.