Binary Calculator
NewPerform arithmetic (add, subtract, multiply, divide) and bitwise operations (AND, OR, XOR, NOT, shifts) on binary numbers, with live decimal/hex cross-reference.
Frequently Asked Questions
What operations are supported?
Standard arithmetic (addition, subtraction, multiplication, integer division) plus bitwise operations (AND, OR, XOR, NOT, left shift, right shift) — all performed on the unsigned binary values you enter.
Why does subtraction sometimes show an error?
This calculator treats binary inputs as unsigned values, so a subtraction that would produce a negative result (B larger than A) is flagged as an error rather than silently wrapping or showing an incorrect two's-complement result.
How large a number can this handle?
Very large — calculations use JavaScript's native BigInt type rather than 32-bit or 64-bit fixed-width integers, so binary strings of any practical length are handled exactly, without floating-point rounding errors.
How many bits does the NOT operation use?
It uses the bit-length of your entered binary string for Value A — for example, entering "1010" performs a 4-bit NOT (giving "0101"), while "00001010" performs an 8-bit NOT, since the leading zeros define the bit width.
What do the decimal and hex numbers below each input mean?
They're a live cross-reference showing the same value in base-10 and base-16, updated as you type, so you can sanity-check what a binary string actually represents without a separate converter.