Binary Calculator

This calculator works on binary numbers without converting them to decimal first. Enter two values made of 0s and 1s, choose add, subtract, multiply or divide, and the answer comes back in binary with the carry row, borrow row or partial products that produced it. A second tab covers AND, OR, XOR, NOT and both shifts at a bit width you choose. Operands are non-negative and up to 64 digits, so a subtraction below zero is shown with a minus sign rather than wrapped into a register.

Calculator Type

Two non-negative binary numbers, worked in binary. The carries, borrows or partial products are shown alongside the answer.

Binary digits only. Spaces, underscores and a leading 0b are ignored.
Binary digits only. Spaces, underscores and a leading 0b are ignored.
Widget

AND, OR, XOR, NOT and the two shifts, on binary or decimal operands. A width matters here, because NOT and a left shift both depend on how many bits you are holding.

Choose decimal to put 12 and 10 straight in. They are converted to bits, the operation is done, and the answer comes back in both bases.
Written in the base chosen above. Spaces, underscores, commas and a leading 0b are ignored.
Written in the base chosen above. Left empty for NOT and the two shifts.
Only used by the two shift operations.
Widget