go-supertools
Calculators

Binary Operations Calculator

Perform arithmetic operations on binary numbers (Add, Subtract, Multiply, Divide) with instant conversion to decimal and hex.

Runs in your browser Your input never leaves your device.

About this tool

Type two binary numbers, choose an operation and the result appears in binary, decimal and hexadecimal. Supported operations are add, subtract, multiply, divide, AND, OR and XOR. Division is integer division: the answer is rounded down and the remainder is not shown. Negative results are displayed with a minus sign rather than in two's complement. Inputs may have a leading minus sign and any length, because the arithmetic uses arbitrary-precision integers. Bitwise operations on negative numbers follow two's-complement rules with unlimited width. Everything runs in your browser.

How to use it

  1. Enter binary number A.
  2. Enter binary number B.
  3. Choose an operation.
  4. Read the result in binary, decimal and hex.

Example

1010 is 10 and 0110 is 6, so the sum is 16.

Input
A = 1010, B = 0110, Add
Result
Binary: 10000
Decimal: 16
Hex: 10

Common problems

Result says to enter two binary numbers
Each input must contain only the digits 0 and 1 (with an optional leading minus). Anything else, such as 1012 or a space, is rejected instead of being partly read.
AND, OR or XOR on negative numbers looks odd
Negative inputs are treated as two's complement with unlimited width, so -1 AND 1010 gives 1010. Use non-negative inputs for ordinary bit masks.
Division result has no remainder
Division is floored to a whole number. 1010 divided by 0011 (10 / 3) shows 11 (3).
Negative result is not in two's complement
The sign is shown with a minus. Convert to two's complement yourself if you need a fixed bit width.