Binary Calculator
Calculate with base-two numbers using only the digits 0 and 1. The answer appears in binary, with decimal values underneath for a quick check. Division gives an integer quotient and remainder rather than hiding a repeating binary fraction.
Loading the calculator. It runs in your browser, so JavaScript needs to be on.
How to use the Binary Calculator
- Enter the first and second binary numbers using digits 0 and 1. A leading minus sign is allowed.
- Choose Add, Subtract, Multiply or Divide. You can enter leading zeros; they do not change the numeric value.
- Read Binary result or Binary integer quotient, then check the decimal result and any remainder.
The formula
A binary numeral is the sum of its digits multiplied by powers of 2. For example, 10102 = 1 × 8 + 0 × 4 + 1 × 2 + 0 = 10. Integer division uses a = bq + r, truncating q toward zero.
Worked example
Adding 1010 and 11 gives 1101, which is decimal 13. Dividing 111 by 10 gives binary quotient 11 and remainder 1: decimal 7 = 2 x 3 + 1. Subtracting 11 from 10 gives -1.
Place value doubles with each step left
Starting at the right, binary columns represent 1, 2, 4, 8, 16, 32 and so on. Therefore 10000 is decimal 16, not ten thousand. A carry happens at two rather than ten: binary 1 + 1 = 10. Decimal echoes below the result help catch an extra zero or a transposed digit.
Signed values are different from bit patterns
This calculator represents a negative value with a leading minus sign. Binary -101 means decimal -5. It does not interpret a leading 1 as a negative sign bit, apply a fixed word width, or wrap overflowing values. An eight-bit twos complement pattern such as 11111111 is therefore read here as positive decimal 255.
Integer division and browser precision
Division truncates toward zero, leaving a signed remainder so the equation dividend = divisor times quotient plus remainder still holds. For -111 divided by 10, the quotient is -11 and the remainder is -1. Exact inputs and results must fit integers from -9,007,199,254,740,991 to 9,007,199,254,740,991. Division by zero and unsupported large results produce explanatory errors.
Binary Calculator questions
How do I convert binary to decimal?
Add the place values wherever a digit is 1. Binary 1011 equals 8 + 2 + 1, or decimal 11.
Why does binary division show a remainder?
The tool performs integer division. For 7 divided by 2, the quotient is 3 and remainder is 1 rather than the fractional result 3.5.
Can I enter the digit 2 in a binary number?
No. Binary uses only 0 and 1. For decimal 2, enter binary 10.
Related calculators
- Scientific CalculatorType an expression or use the keypad for trig, logs, roots, powers and factorials. Switch...
- Exponent CalculatorEnter a base and exponent to calculate powers, including negative and fractional...
- GCD & LCM CalculatorEnter whole numbers to find their greatest common divisor and least common multiple....
- Fraction CalculatorEnter two fractions to add, subtract, multiply or divide. Get the reduced fraction, mixed...