Binary Calculator
Enter two binary numbers and choose an operation.
AND, OR and XOR compare the numbers digit by digit.
Only the digits 0 and 1; a leading minus sign is allowed.
Only the digits 0 and 1; a leading minus sign is allowed.
Result
You entered
Decimal
Hex
Show the work
Binary to decimal
Each binary digit is worth a power of , counting from at the right. Converting both numbers to decimal lets the operation be done with ordinary arithmetic.
Using
Subtraction in decimal
The second number is larger, so the difference is negative: it is the difference of the sizes with a minus sign.
Decimal to binary
Divide by again and again, keeping each remainder, until the quotient is . The remainders read from the last to the first are the binary digits, with the minus sign put back in front.
Using
Result
So .
Worked examples
Binary addition with carries, Check in decimal
Binary to decimal, Subtraction in decimal
Binary to decimal, Subtraction in decimal
Binary to decimal, Multiplication in decimal
Binary to decimal, Division with a remainder
Binary to decimal, Bitwise AND
Binary to decimal, Bitwise OR
Binary to decimal, Bitwise XOR