Binary Calculator

Add, subtract, multiply and divide binary numbers, or apply AND, OR, XOR and bit shifts, with decimal and hex results.


Binary Calculator

Binary arithmetic follows the same rules as ordinary arithmetic, just with two digits. This calculator does the maths on binary numbers of any length (it uses big integers, so there is no 32- or 64-bit limit) and shows every result in binary, decimal and hexadecimal. It also covers the bitwise operations used in programming: AND, OR, XOR and left and right shifts.

How to use Binary Calculator

  1. Type the first binary number, using only 0 and 1. A minus sign is allowed.
  2. Choose the operation.
  3. Type the second binary number (for shifts, the number of places, in binary).
  4. Read the result in binary, decimal and hexadecimal.

When it comes in handy

  • Checking computer science homework step by step.
  • Working out bit masks and flags for code.
  • Converting a result between binary, decimal and hex at the same time.

Frequently asked questions

How does division work?
It is integer division: the result is the whole-number quotient and the remainder is shown separately, the way programming languages divide integers.
How are negative numbers handled?
Numbers are treated as signed values with a minus sign, not as two's complement bit patterns, because two's complement needs a fixed width. Bitwise operations on negative numbers follow JavaScript BigInt rules.

Choose which cookies SEOpeck may use. You can change this at any time from "Cookie settings" at the bottom of every page.