Binary Calculator

Enter two binary numbers (0s and 1s) and choose an operation. Results appear in binary, decimal and hexadecimal.

Quick Presets:

Binary Operations

Binary Result

Advertisement
Base: Binary is base 2 (digits 0, 1)
Operations: + - × ÷ AND OR XOR NOT
Output: Binary, decimal and hex
Computing: The language of digital circuits

How binary numbers work

Binary is the base-2 number system used by every digital device. It uses only two digits, 0 and 1, where each position is a power of 2. For example the binary number 1010 equals 1×8 + 0×4 + 1×2 + 0×1 = 10 in decimal.

Addition follows the same idea as decimal but carries at 2 instead of 10: 1 + 1 = 10 (write 0, carry 1). For example 101 + 11 = 1000, which is 8 in decimal.

Bitwise operations

AND, OR and XOR compare the numbers bit by bit. AND returns 1 only when both bits are 1; OR returns 1 when at least one bit is 1; XOR returns 1 when the bits differ.

NOT flips every bit of the number. Programmers use these operations for flags, masks and low-level data manipulation. The calculator treats inputs as unsigned 32-bit values, matching common programming behavior.

How to use this calculator

  1. Type binary number A (only 0s and 1s).
  2. Type binary number B for two-input operations.
  3. Choose the operation and press Calculate.
  4. Read the result in binary, decimal and hexadecimal.

Pro tips

  • Add leading zeros to see matching bit widths, e.g. 0011 + 0001.
  • Use AND with 1 to check whether the last bit is odd.
  • XOR is useful for simple encryption and checksums.

Advantages & considerations

✅ Advantages

  • Full arithmetic plus bitwise operations
  • Shows decimal and hex for every result
  • Divides with quotient and remainder

⚠️ Considerations

  • Bitwise results use 32-bit unsigned representation
  • Input is validated strictly as 0s and 1s

Frequently asked questions

How do I add binary numbers?
Add column by column from right to left. When a column reaches 2, write 0 and carry 1 left. For example 101 + 11 = 1000.
How do I convert binary to decimal?
Multiply each digit by its power of 2 and add: 1101 = 1×8 + 1×4 + 0×2 + 1×1 = 13.
What is the AND operation?
AND compares each bit and returns 1 only when both bits are 1. For example 1010 AND 1100 = 1000.
What is binary used for?
Computers store and process all data as binary. Numbers, text, images and sound are represented as patterns of 0s and 1s.
Can I divide binary numbers?
Yes. The calculator returns the quotient and remainder, just like long division in decimal.