Binary Calculator
Do arithmetic on binary numbers without converting by hand. Enter two values, choose add, subtract, multiply or divide, and read the answer in binary, octal, decimal and hex at once. Pick a bit width to see the two's complement representation and catch overflow. The math uses arbitrary precision, so even very long bit strings stay exact.
How to use the binary calculator
- Type your two numbers. They are read as binary by default, or switch the input base to octal, decimal or hex.
- Choose the operation: add, subtract, multiply or divide. Division also shows the remainder.
- Read the result in binary, octal, decimal and hex, and copy any value with one click.
- Optional: set a bit width (8, 16, 32 or 64) to see the two's complement bits and whether the result overflows.
Examples
Add two binary numbers
1010 + 110
10000 (binary), 16 (decimal)
Subtract into a negative
10 - 1010
-1000 (binary), -8 (decimal), 11111000 in 8-bit two's complement
Divide with a remainder
1011 / 10
quotient 101, remainder 1 (5 remainder 1)
Frequently asked questions
How do I add binary numbers here?
Type each binary value into the two fields, leave the input base set to binary, and choose Add. The calculator shows the sum in binary, plus its octal, decimal and hex equivalents, with the step-by-step working underneath.
How does binary subtraction handle negative results?
If the second number is larger, the result is negative, shown with a leading minus such as -1000. To see how a computer would store that value, set a bit width and read the two's complement form, for example 11111000 for -8 in 8 bits.
What does binary division return?
Integer division. It returns the quotient and the remainder separately, both shown in all four bases. For example 1011 divided by 10 is quotient 101 with remainder 1, which is 11 divided by 2 equals 5 remainder 1.
What is two's complement and when do I need it?
Two's complement is how computers store signed integers in a fixed number of bits. Set a bit width to see the exact bit pattern for the result, the unsigned value those bits represent, and an overflow warning when the signed result does not fit.
Can I work in octal, decimal or hex instead of binary?
Yes. Switch the input base to octal, decimal or hexadecimal and the operands are read in that base. The result is always shown in all four bases, so you can convert and calculate in one step.
Does it handle very large numbers?
Yes. The arithmetic uses arbitrary-precision integers, so numbers with hundreds of bits add, multiply and divide exactly with no rounding or overflow, unlike fixed-size calculators.
Is my data private?
Yes. Everything runs in your browser. Nothing you enter is uploaded, logged or stored.
Related tools
Number Base Converter
Convert numbers between any base from 2 to 36, including binary, octal, decimal and hex. Handles huge numbers exactly with arbitrary precision. Free, private.
Twos Complement Calculator
Convert a signed integer to its twos complement binary and hex for any bit width. Also decodes a twos complement bit pattern back to a signed value.
Bitwise Calculator
Bitwise AND, OR, XOR, NOT, NAND, NOR, XNOR and shifts on 8, 16, 32 or 64 bit integers. See results in binary, hex, octal and decimal.
Annulus Area Calculator
Calculate the area of an annulus, the ring between two concentric circles, from its outer and inner radius. Returns both circumferences and width too. Free.
Area Calculator
Find the area of a circle, square, rectangle, triangle, trapezoid, parallelogram, ellipse, sector or rhombus. Free and runs in your browser.
Arithmetic Sequence Calculator
Find the nth term, the sum of n terms and the full term list for any arithmetic or geometric sequence. Enter the first term, step or ratio, and n.