Binary CalculatorFree online math calculator — instant results, no sign-up
Convert and do arithmetic with binary numbers.
About the Binary Calculator
This calculator performs basic arithmetic and bitwise logic operations on two binary numbers. It parses each base-2 string into a decimal integer, evaluates the chosen operator, and displays the outcome in both binary and decimal formats. It is commonly used by computer science students, programmers, and hardware engineers debugging low-level logic.
- Binary A
- The first operand, entered as a sequence of base-2 digits (0s and 1s).
- Op
- The mathematical or bitwise operation to execute: +, −, ×, ÷, AND, OR, or XOR.
- Binary B
- The second operand, entered as a sequence of base-2 digits (0s and 1s).
Formula and method
r = a [op] b, where for division: r = floor(a / b); binary representation = (r >>> 0) expressed in base 2
- aDecimal value parsed from Binary A using base 2
- bDecimal value parsed from Binary B using base 2
- opSelected operator (+, −, ×, ÷, AND, OR, XOR)
- rComputed result in decimal format
The tool parses the input strings using radix-2 integer conversion. It evaluates the selected operation—using integer floor division for division—and formats the result as a standard decimal string and an unsigned 32-bit binary string via a zero-fill right shift.
Worked example
These are the calculator's starting values and the results it actually produces for them.
Inputs
- Binary A1011
- Op+
- Binary B110
Results
- Binary result10001
- Decimal result17
- A in decimal11
- B in decimal6
How to use the Binary Calculator
- 1Convert Binary A and Binary B into base-10 integer values.
- 2Apply the selected arithmetic operation (+, −, ×, integer ÷) or bitwise operation (AND, OR, XOR).
- 3Convert the calculated value into an unsigned 32-bit binary representation.
- 4Display the binary result along with the decimal equivalents of the result and both inputs.
Reading your result
The Binary result shows the base-2 string of the computation, while the Decimal result shows the signed numeric equivalent. The fields for 'A in decimal' and 'B in decimal' allow direct verification of input conversions.
Limitations
The calculator only processes integer inputs and does not support fractional binary values. Division rounds down to the nearest integer rather than producing fractional binary bits, and negative arithmetic results are cast to 32-bit unsigned two's complement representations in the binary output.
Common questions
How does integer division handle remainders?+
Division performs a floor operation (Math.floor(a / b)), which discards any remainder or fractional part rather than calculating binary decimal points.
Why does a negative subtraction result display a long binary string?+
Negative numbers are formatted using an unsigned 32-bit integer shift (>>> 0), which renders negative results in standard 32-bit two's complement representation.
Can I input negative binary values with a minus sign?+
Standard binary input strings should consist only of digits 0 and 1. To compute negative values, select the subtraction operator (A − B).
Does the calculator save my information?+
Calculations run in your browser. While signed in, inputs and results are automatically recorded in account history; saving a result creates a separate saved record.
Further reading
You might also like
Scientific Calculator
Full scientific calculator with trig, logs, powers, memory and degree/radian modes.
Fraction Calculator
Add, subtract, multiply and divide fractions.
Percentage Calculator
Percent of a number, what percent, and percent change.
Random Number Generator
Generate random integers in a range.
Percent Error Calculator
Error between an observed and true value.
Exponent Calculator
Raise a base to any power.
Results are estimates for informational purposes and are not financial, medical or legal advice.