Binary Calculator

Add, subtract, multiply, and divide binary numbers

0 bits
0 bits

Try an example:

Enter two binary numbers, select an operation, and click Calculate.

Tip: Binary arithmetic follows the same rules as decimal, but you only have two digits (0 and 1). Remember: 1 + 1 = 10 (carry the 1), just like 9 + 1 = 10 in decimal.

How the Binary Calculator Works

This binary calculator handles addition, subtraction, multiplication, and division of binary numbers. It works by converting the binary inputs to decimal, performing the arithmetic in decimal (which JavaScript handles natively), and converting the result back to binary. The step-by-step display shows you both the intermediate decimal values and the final binary result, so you can follow the logic regardless of which representation you're more comfortable with.

Binary arithmetic is actually simpler than decimal arithmetic in many ways. There are only four rules for binary addition: 0 + 0 = 0, 0 + 1 = 1, 1 + 0 = 1, and 1 + 1 = 10 (that's zero with a carry of 1). That's it. No carrying across multiple digit values like you do with decimal. Once I realized binary arithmetic was simpler, not harder, than decimal arithmetic, it stopped feeling intimidating. I've used binary calculators like this one countless times when doing bit-level protocol work — calculating checksums, verifying bitfield values, or just double-checking my manual arithmetic after a long debugging session.

Binary Arithmetic Rules

  • Addition: 0+0=0, 0+1=1, 1+0=1, 1+1=0 carry 1, 1+1+1=1 carry 1
  • Subtraction: 0-0=0, 1-0=1, 1-1=0, 0-1=1 borrow 1
  • Multiplication: Same as decimal — 0×0=0, 0×1=0, 1×0=0, 1×1=1
  • Division: Repeated subtraction, similar to long division in decimal

When You Need a Binary Calculator

There are a few situations where a binary calculator is genuinely useful. If you're working with bitmasks — common in graphics programming, network configuration, and embedded systems — you often need to add or compare binary values to determine which bits are set. Network engineers calculating subnet masks and CIDR ranges sometimes need to add binary numbers to determine broadcast addresses. Computer science students learning digital logic or computer architecture will spend hours doing binary arithmetic by hand, and having a calculator to verify your work is essential.

I remember a specific debugging session where I was implementing a CRC32 checksum algorithm from a spec document and kept getting wrong results. The spec showed binary addition steps for the polynomial division, and I was making off-by-one errors in my manual carries. Running the same numbers through a binary calculator revealed exactly where my manual calculation went wrong — I'd forgotten a carry in the third bit position. That kind of thing is incredibly hard to spot by staring at binary digits, but a calculator makes it obvious immediately.

Related Tools

Binary to Decimal → Decimal to Binary → Binary ↔ Text → Binary to Hex → Binary to Octal → Binary Translator Home →