Home › Math › Binary Calculator
Math

Binary Calculator

Enter two binary numbers, choose the operation, and read the answer in binary and decimal at once — computed with exact integer arithmetic, with the same sum restated in decimal underneath as a built-in check.

Free · No sign-up · Runs in your browser · First published 2026-10-21 · Updated October 2026

Binary numbers use only the digits 0 and 1 — each position is worth twice the one to its right. Inputs may be up to 64 bits long, and the arithmetic is exact integer arithmetic, so no answer is ever rounded. Everything is worked out on your own device.

Result (binary)
—

Binary is counting with only two digits

Decimal counting has ten digits, 0 to 9, and when a column runs out it carries into the next one, which is worth ten times as much. Binary does exactly the same thing with two digits, 0 and 1: a column that runs out carries into a column worth twice as much. That single change is why computers count in binary — a wire is either on or off — and it means the four operations work exactly as they do in decimal, only with far more carrying. This calculator performs the operation on the binary numbers you enter and then states the answer in binary and in decimal side by side, with the same calculation restated in decimal as a check row. The subnet calculator is this same arithmetic at work inside every IP address; this page isolates the operations themselves. The arithmetic is exact integer arithmetic (the values are held as whole numbers of unlimited precision up to the 64-bit input cap), so nothing is ever rounded — a property floating-point tools cannot promise.

The place values and the four operations, defined

Place values, right to left: 1, 2, 4, 8, 16, 32, 64, 128 — each is 2 raised to its position (2^0, 2^1, 2^2, …)
Binary addition: 0+0=0 · 0+1=1 · 1+1=10 (write 0, carry 1) · 1+1+carry=11 (write 1, carry 1)
Subtraction, multiplication and division: the same column methods as decimal, in base two
Bar chart of the four operations on the worked example pair 1010 and 101, drawn in decimal: multiplication gives 50, addition 15, subtraction 5 and division 2
The worked examples below, drawn in decimal: one pair of binary numbers, four very different answers.

Every symbol, in plain words. A bit is one binary digit — a single 0 or 1. A number's value is the sum of the place values where its bits are 1: the worked example's first number, 1010, has 1s in the 8s and 2s places, so it is worth 8 + 2 = 10 in decimal. Carrying is what happens when a column's total reaches the base: in decimal, 7 + 5 writes 2 and carries 1 ten; in binary, 1 + 1 writes 0 and carries 1 two. Multiplication needs nothing new — it is repeated shifted addition — and division is its reverse, reported here as a quotient and a remainder, because binary fractions are a separate topic (covered honestly in the limitations below). The check row works because the operations cannot disagree across bases: if 1010 + 101 is right in binary, then 10 + 5 must give the same value in decimal, and the table shows both.

Worked example: 1010 + 101

The defaults above enter 1010 and 101 — in decimal, 10 and 5. Adding column by column from the right: 0 + 1 = 1; 1 + 0 = 1; 0 + 1 = 1; then the leading 1 of 1010 stands alone — giving 1111, which is 8 + 4 + 2 + 1 = 15 in decimal, exactly what the check row states: 10 + 5 = 15. No carrying was needed in that sum, so here is the same pair showing the other three operations, where the carrying appears: subtracting, 1010 − 101 borrows its way to 101 (5 in decimal); multiplying, 1010 × 101 = 110010 (50 in decimal — 1010 × 100 is 101000, plus one more 1010, is 110010); and dividing, 1010 ÷ 101 = 10 with remainder 0 (2 in decimal, and the check row closes: 2 × 5 + 0 = 10). The bar chart near the top draws these four answers in decimal — the multiplication towering over the rest is the honest shape of the four operations on one pair of numbers.

The same operations on a second pair, and conversions worth knowing

CalculationBinary answerDecimal check
1010 + 101 — worked example111110 + 5 = 15
1010 − 10110110 − 5 = 5
1010 × 10111001010 × 5 = 50
1010 ÷ 10110, remainder 010 ÷ 5 = 2
1100 + 11111112 + 3 = 15
1100 − 11100112 − 3 = 9
1100 × 1110010012 × 3 = 36
1100 ÷ 11100, remainder 012 ÷ 3 = 4
11111111 + 1100000000255 + 1 = 256

The last row is the carry chain in its purest form: adding 1 to eight 1s flips every one of them to 0 and carries all the way into a ninth bit — the binary twin of 999 + 1 in decimal. The conversions used throughout the table follow the place values directly: 11 is 3, 100 is 4, 110 is 6, 111 is 7, 1000 is 8, 1111 is 15, 10000 is 16, and 1111101000 is 1,000. Notice the pattern in the round decimal numbers: every power of two is a 1 followed by zeros — 100000000 is 256, and ten 1s in a row (1111111111) are 1,023, one short of 1,024. Programmers lean on that constantly, and it is also why a "64-bit" input cap on this page corresponds to a largest value of 18,446,744,073,709,551,615 — two to the 64th, minus one.

How to read your result — and its limits

The large figure is the answer in binary; read the table from the top to audit it: your two inputs restated in decimal, the result in both bases, and a check row that must agree — for division, quotient × divisor + remainder rebuilds the first number exactly. Four limits are worth knowing. Whole numbers only. This calculator works with integers; binary fractions (0.101 and friends) exist but behave counter-intuitively — one tenth has no exact binary form, which is why computers famously store 0.1 approximately — so rather than fake them, this page declines them at the input. Negative results are sign-and-magnitude: subtracting a larger number gives an answer with a minus sign in front (−101 for −5), which is how humans write negatives; computers usually store them as two's complement instead, so a result copied into a programming context may need converting. Leading zeros change nothing: 0101 and 101 are the same number, and the table prints the trimmed form. And long results are normal: multiplication roughly adds the bit-lengths of its inputs, so two 64-bit numbers produce up to 128 bits of answer — exact, but not something to transcribe by hand; use the copy button in preference to your eyes.

Frequently asked questions

How do you add binary numbers?

Column by column from the right, exactly as in decimal, except a column carries when it reaches two instead of ten: 0+0=0, 0+1=1, 1+1 writes 0 and carries 1, and 1+1 with a carried 1 writes 1 and carries 1. The worked example's 1010 + 101 = 1111 needed no carries; 11111111 + 1 = 100000000 is a carry travelling through all eight columns.

How do I convert binary to decimal by hand?

Add the place values where the bits are 1. Reading 1010 from the left, the positions are worth 8, 4, 2 and 1, and the 1s sit on 8 and 2, so the value is 10. Every extra bit doubles the reach: eight bits top out at 255, ten at 1,023 and sixteen at 65,535 — always one less than the next power of two.

Why does the calculator show a remainder for division?

Because whole-number binary division, like whole-number decimal division, rarely comes out even, and a quotient with a remainder is the exact answer — 1010 ÷ 11 is 11 with remainder 1 (10 ÷ 3 = 3 remainder 1), and the check row proves it: 3 × 3 + 1 = 10. Expressing the same answer as a binary fraction would need the binary-point rules described in the limitations, which this integer calculator deliberately leaves out.

What happens when I subtract a bigger number from a smaller one?

You get a negative answer written with a minus sign: 101 − 1010 = −101, which is 5 − 10 = −5 in decimal. That is sign-and-magnitude notation — the way people write negatives. Computers usually store negatives as two's complement instead, where the same −5 inside eight bits is written 11111011; the values are equal, the storage is different, and confusing the two is a classic source of bugs.

Why is there a 64-bit limit on the inputs?

64 bits is the largest whole number a standard computer word holds — up to 18,446,744,073,709,551,615 — and it covers every binary number you are likely to type by hand many times over. The arithmetic itself is exact at any length within the cap, and multiplication results can run to 128 bits; the cap exists so a pasted wall of digits gets a clear explanation instead of a page-sized answer.

Ahsan ul Haq
Editor, ToolFigure

Every ToolFigure calculator is checked against hand-worked examples before it is published — the same worked examples you can follow on each page. More about ToolFigure →

Related tools

Calculators that show their working

Free forever · No sign-up · Every result comes with its formula and a worked example.

Browse all tools