Binary Calculator
Add, subtract, multiply, divide and bit-shift binary numbers, with decimal, hex and octal results.
- Binary result
- 10001
- Decimal
- 17
- Hexadecimal
- 11
- Octal
- 21
- 32-bit two's complement
- 00000000000000000000000000010001
1011 + 110 = 10001 (decimal 11 + 6 = 17)
Base converter
- Binary
- 11111111
- Decimal
- 255
- Hexadecimal
- FF
- Octal
- 377
How it works
Type two binary numbers, pick an operation and the answer appears instantly — this binary
calculator adds, subtracts, multiplies and divides binary numbers and also does the bitwise
AND, OR, XOR and shift operations. Every result is shown four ways at once: binary, decimal,
hexadecimal and octal, so you can check your homework or a bitmask without a second lookup.
Division gives the integer quotient plus the remainder, the way binary long division works,
and the exact decimal value is shown underneath. Only 0 and 1 are
allowed in the two input fields; spaces are ignored, so 1011 0110 works, and a
leading - makes the value negative.
Negative results are printed with a minus sign and, when they fit, also as a 32-bit two's complement pattern — the representation computers actually store. The base converter below turns any value between binary, decimal, hex and octal, so it doubles as a binary to decimal converter. All maths uses JavaScript BigInt, so numbers with hundreds of bits stay exact instead of losing precision. Everything runs in your browser: no upload, no account, no ads.
Frequently asked questions
How do you add two binary numbers?
You add column by column from the right, carrying a 1 whenever a column totals 2 or more: 1 + 1 = 10, so you write 0 and carry 1. For example 1011 + 110 = 10001, which is 11 + 6 = 17 in decimal. Type both values above and the calculator shows the binary answer plus its decimal, hex and octal equivalents instantly.
What is 1010 in decimal?
1010 in binary is 10 in decimal. Each bit is a power of two read right to left (1, 2, 4, 8), so 1010 = 8 + 0 + 2 + 0 = 10. Paste any binary value into the base converter on this page to get its decimal, hexadecimal and octal form at the same time.
How does the calculator handle negative binary results?
Subtracting a larger number gives a negative result, shown with a minus sign (for example 110 − 1011 = −101). Because computers store negatives as two's complement, the 32-bit two's complement pattern is shown as well — −5 becomes 11111111111111111111111111111011. Bitwise AND, OR, XOR and shift operations require non-negative values.