Skip to main content

Binary Calculator - Add, Subtract, and Convert Base-2 Numbers

Free online tool to add, subtract, multiply, divide, convert, and bitwise-operate on binary integers. Default example: 1011 + 1101 = 11000 (11 + 13 = 24). Runs in your browser.

Input Values

Arithmetic and bitwise modes require binary digits 0 and 1 only. Limit is 256 bits. Bitwise ops treat values as non-negative BigInt (no two's complement).

Converted Result

Binary result will appear here

What Is a Binary Calculator and Why Do You Need One?

A binary calculator adds, subtracts, multiplies, divides, and converts base-2 integers - the 0s and 1s that every digital circuit actually stores. People search for how to add binary numbers, how to convert binary to decimal, and what 1011 is in decimal because those tasks show up in intro CS, digital-logic labs, and bitwise debugging long before anyone opens a full scientific calculator.

Binary is not a cryptic coding trick. It is place value with powers of two instead of powers of ten. The ones place is 20 = 1, the twos place is 21 = 2, then 4, 8, 16, and so on. That is why 10112 is 8+0+2+1 = 1110, and why adding 1011 + 1101 by hand produces 11000 - the same 11 + 13 = 24 you would get in decimal, just written with only two digits.

This free online binary calculator runs entirely in your browser with JavaScript BigInt. Nothing is uploaded. Arithmetic and bitwise modes reject any character other than 0 and 1 (a 0b prefix and spaces are stripped first). Convert mode also accepts decimal and hexadecimal so you can see the same integer in all three bases. The hard limit is 256 bits, about 77 decimal digits. That is enough for machine words, IPv6 pieces, and most homework; it is not unlimited-precision arithmetic. For thousands of decimal digits use the big number calculator.

Bitwise AND, OR, and XOR are included because they are the operations students confuse with addition. AND never carries. Addition always might. The default example is chosen so you can see both ideas on the same pair: 1011 + 1101 = 11000, while 1011 AND 1101 = 1001.

How to Use This Free Online Binary Calculator

Using this base-2 adder and converter is straightforward:

  1. Choose a mode. Convert shows binary, decimal, and hex for one integer. Add, Subtract, Multiply, and Divide take two binary integers. AND, OR, and XOR are bitwise on the same kind of unsigned integers.
  2. Enter the number(s). Binary operands may look like 1011, 0b1011, or 1 011. Convert mode lets you set the from-base to 2, 10, or 16 (hex accepts 0x and A–F).
  3. Read the result panel. The primary display is binary. Decimal and hex sit underneath so you can check a homework step without a second tool. Divide shows quotient and remainder (truncated toward zero, like JavaScript BigInt).
  4. Copy the binary string, or clear the fields to start over. The last inputs are saved locally in your browser for up to 30 days.

Note: inputs and results are capped at 256 bits. Division by zero is an error. Subtracting a larger number from a smaller one yields a negative result shown with a minus sign in front of the magnitude - this tool does not invent a two's-complement bit pattern for negative answers. Bitwise operators are defined on non-negative BigInt values only.

Binary Addition Formula - How Base-2 Arithmetic Works

1 + 1 = 102 (write 0, carry 1)
Place value: bit k is worth 2k

To convert binary to decimal by hand, expand each 1 as a power of two. To add, work from the least-significant bit and carry whenever a column sums to 2 or more - exactly like decimal addition, except the digit set stops at 1.

Example - add 1011 + 1101 (the default):

  • Rightmost: 1 + 1 = 102 → write 0, carry 1
  • Next: 1 + 0 + carry 1 = 102 → write 0, carry 1
  • Next: 0 + 1 + carry 1 = 102 → write 0, carry 1
  • Left: 1 + 1 + carry 1 = 112 → write 11
  • Result 110002 = 16+8 = 2410, and 11 + 13 = 24 checks in decimal

Example - what is 1011 in decimal?

  • 1×23 + 0×22 + 1×21 + 1×20
  • 8 + 0 + 2 + 1 = 11
  • Same value in hex is B (because 10 is A and 11 is B)

Example - 1011 AND 1101 versus 1011 + 1101:

  • AND, no carry: 1∧1, 0∧1, 1∧0, 1∧1 → 1001 (910)
  • Add, with carry: 11000 (2410)
  • OR would be 1111 (15). XOR would be 0110 (6). None of those bitwise results equal the sum.

Binary vs Decimal vs Hex - Which Base Should You Use?

BaseDigits1011 exampleWhere you see it
Binary (2)0, 11011Flags, masks, hardware
Decimal (10)0–911Humans, most math
Hex (16)0–9, A–FBMemory, colors, dumps

One hex digit is exactly four bits, which is why programmers prefer hex once a bit string is longer than a byte. 110002 is 1816, not 1810 - mixing those two 18s is a classic exam trap. If your assignment is hex-first, switch to the hex calculator so both operands start as A–F instead of 0/1.

Where Binary Arithmetic Shows Up in Real Work

1. Bit masks and feature flags

Checking whether a permission bit is set is AND, not addition. Combining flags is OR. Toggling a bit is XOR with a one-hot mask. If you add instead of OR, a carry can turn two adjacent 1-bits into a completely different flag.

2. Digital logic and ALUs

A one-bit full adder is exactly the 1+1=10 rule. Multi-bit adders chain the carry. This calculator will not draw a gate diagram, but it will confirm that your truth table for a four-bit adder matches 1011 + 1101 = 11000.

3. Networking and packed fields

Subnet masks, VLAN IDs, and protocol flags are easier to reason about in binary and easier to type in hex. Convert mode exists so you can paste a decimal port count or a hex mask and read the bits.

4. What this tool will not do

It does not emulate signed two's-complement overflow of an 8-bit or 32-bit register. It does not float. It does not evaluate C expressions. Integers above 256 bits are rejected on purpose so a pasted dump cannot freeze the tab.

Related Mistakes When Adding or Converting Binary Numbers

The most common error is treating 1011 as the decimal one thousand eleven. In binary it is eleven. Another is forgetting the carry: people write 1011 + 1101 = 2112, which is not a binary number at all. A third is using bitwise AND when the homework asked for a sum - 1001 looks "binary-ish" and is still the wrong answer for 1011 + 1101.

Hex digits sneak in. B, C, D, E, and F are valid hex, not valid binary; this calculator rejects them in arithmetic mode instead of silently interpreting B as eleven. Leading zeros do not change the value (001011 is still 11) but they do count toward the 256-bit input length if you paste a huge padded string.

Signed interpretations are another trap. In eight-bit two's complement, 11111111 is −1. This tool treats that bit string as the unsigned integer 255. If your course is about two's complement overflow, you still need to apply the wrap-around rule yourself after you read the unsigned magnitude.

How to Divide Binary Numbers - Quotient and Remainder

Binary division is the same integer division you already know, written in base 2. Given two non-negative integers A and B with B ≠ 0, there is a unique pair (Q, R) such that A = Q×B + R and 0 ≤ R < B. This calculator reports both the quotient Q and the remainder R in binary and in decimal. Division by zero is an error, not Infinity.

Worked example: 1101 ÷ 101. In decimal that is 13 ÷ 5, so Q = 2 and R = 3, which is Q = 102 and R = 112. Another: 1011 ÷ 10 is 11 ÷ 2, so Q = 1012 (5) and R = 1. The remainder is never “a fraction in binary”; if you wanted 11/2 = 5.5 you would need a different tool. Integer remainder is what ALUs, hash maps, and clock arithmetic use.

Truncation follows JavaScript BigInt: toward zero. For the non-negative inputs this page accepts, that is the same as flooring. Multiply mode is the inverse check: Q×B + R must equal A when A and B fit in 256 bits. If a multiply of two large operands would exceed 256 bits, the product is rejected even if each factor was legal on its own.

Unsigned Binary vs Two's Complement - Tool Limits

Search results for “binary calculator two’s complement” often want an 8-bit wrap: 11111111 meaning −1. This page does not do that. Bitwise AND, OR, and XOR run on non-negative BigInt values. 11111111 is two hundred fifty-five, not minus one. If you subtract a larger number from a smaller one, the result is shown with a minus sign in front of the magnitude (for example −102 for decimal −2), not as a padded two's-complement word.

The 256-bit cap is about 77 decimal digits (2256 − 1). That is far larger than a CPU register and far smaller than a crypto modulus. It exists so a pasted 10,000-bit dump cannot freeze the tab. Convert mode will still show decimal and hex for any integer that fits, including a 0x prefix from a debugger. Arithmetic modes still insist on 0 and 1 only; they will not silently treat B as eleven.

Spaces and a 0b prefix are stripped because that is how people paste from C and Python. Leading zeros do not change the value, but they do count toward the 256-bit input length. If you need thousands of exact decimal digits rather than bits, the big number calculator is the right sibling. If you need hex operands from the start, use the hex calculator.

Frequently Asked Questions (FAQ) - Binary Calculator

How do I add binary numbers?

Write the two binary integers so their least-significant bits line up, then add bit by bit from the right. 0+0=0, 1+0=1, and 1+1=10 (write 0 and carry 1). This calculator does that with BigInt: 1011 + 1101 = 11000, which is 11 + 13 = 24 in decimal. Spaces and a 0b prefix are allowed.

How do I convert binary to decimal?

Each bit is a power of two. Reading 1011 from the right: 1×2^0 + 1×2^1 + 0×2^2 + 1×2^3 = 1+2+0+8 = 11. Choose Convert, set the from-base to 2, and paste the binary string. The result panel shows decimal and hexadecimal as well.

What is 1011 in decimal?

1011 in binary equals 11 in decimal. Expanding place values: 1×8 + 0×4 + 1×2 + 1×1 = 11. In hexadecimal the same value is B. This is the left operand of the default example 1011 + 1101.

Does this binary calculator support hex?

Yes, in Convert mode. Set the from-base to 16 to enter a hexadecimal integer (0x prefix and A–F are accepted), or set it to 2 or 10. Arithmetic and bitwise modes still expect binary operands. For dedicated hex addition use the hex calculator.

What is the difference between bitwise AND and adding binary numbers?

Addition is arithmetic: 1+1 produces 0 and a carry into the next bit, so 1011 + 1101 = 11000. Bitwise AND compares each pair of bits independently with no carry: 1011 AND 1101 = 1001. OR and XOR are also bit-wise; they never generate a carry.

Does this calculator upload my numbers?

No. Conversion, arithmetic, and bitwise operations run in your browser with JavaScript. Nothing is sent to a server. After the page loads, the tool still works if the network drops.

Why Choose Our Binary Calculator?

  • Free, no account. Unlimited conversions and sums.
  • Private. All BigInt math stays in the browser.
  • Add, subtract, multiply, divide with quotient and remainder.
  • AND, OR, XOR so bitwise homework is not confused with arithmetic.
  • Convert binary, decimal, and hex in one panel.
  • Rejects illegal digits instead of silently mis-parsing 2 or B as binary.
  • 256-bit cap so a pasted dump cannot hang the tab.
  • Works offline after the first page load.