Skip to main content

Binary Calculator Guide: Add, Subtract, Multiply and Divide in Base Two

A practical binary calculator guide to adding, subtracting, multiplying and dividing binary numbers, with carries, borrows, a worked example and bitwise context.

Published By Li Lei
#binary #binary arithmetic #computer science #low-level programming #number systems

Binary Calculator Guide: Add, Subtract, Multiply and Divide in Base Two

Base two only has two symbols, 0 and 1, yet doing arithmetic with them on paper trips up almost everyone at first. The rules are not hard. They are just unfamiliar, because we never carry at "two" in daily life. This guide walks through how addition, subtraction, multiplication and division actually behave in binary, where the carries and borrows come from, and how a binary calculator lets you check every step instead of squinting at a column of ones and zeros hoping you did not drop a bit.

Why binary carries work exactly like decimal

The single idea that unlocks binary arithmetic is this: a carry happens when a column overflows the base. In decimal you carry when a column reaches 10. In binary you carry when a column reaches 2. That is the whole difference.

So binary addition carries when 1 + 1 = 10, the same way decimal carries when 5 + 5 = 10. The result digit is 0 and you push a 1 into the next column to the left. The four single-bit sums you ever need are:

  • 0 + 0 = 0
  • 0 + 1 = 1
  • 1 + 0 = 1
  • 1 + 1 = 10 (write 0, carry 1)

There is one more case worth memorising for the moment three bits stack up: 1 + 1 + 1 = 11, which writes a 1 and carries a 1. That happens whenever a carry lands in a column where both operands already have a 1. Once you internalise those five sums, you can add any two binary numbers by sweeping right to left and tracking a single carry bit.

A worked example, bit by bit

Let us add 1011 and 0110. In decimal that is 11 + 6, so the answer should come out to 17. Here is every column, working from the rightmost bit leftward, with the carry shown as it moves.

  carry:  1 1 1 .
          1 0 1 1   (11)
        + 0 1 1 0   (6)
        ---------
        1 0 0 0 1   (17)

Walking it column by column:

  • Column 1 (rightmost): 1 + 0 = 1. Write 1, carry 0.
  • Column 2: 1 + 1 = 10. Write 0, carry 1.
  • Column 3: 0 + 1, plus the carried 1, = 10. Write 0, carry 1.
  • Column 4: 1 + 0, plus the carried 1, = 10. Write 0, carry 1.
  • Column 5: nothing left to add except the carried 1. Write 1.

Reading the result top to bottom gives 10001, which is 16 + 1 = 17. The carry rippled all the way from column 2 to a brand-new fifth bit, which is exactly why a four-bit sum can need five bits to hold it. Drop any one of those carries and you would land on 00001 or 10000, both wrong, and both easy to miss by eye.

Subtraction borrows, multiplication shifts, division leaves a remainder

Subtraction is the mirror image of addition. Where addition carries up at two, subtraction borrows down from the next column. The tricky single-bit case is 0 − 1: you cannot take 1 from 0, so you borrow from the left, turning the 0 into 10 (decimal 2), and 10 − 1 = 1. So 100 − 1 = 011, a chain of borrows that walks left until it finds a 1 to take from, the same cascade you get subtracting 1000 − 1 = 999 in decimal.

Multiplication in base two is gentler than it looks, because each partial product is either the multiplicand itself or all zeros. Multiplying by a 1 bit copies the number; multiplying by a 0 bit contributes nothing. So binary multiplication is just shift-and-add. For example 101 × 11 lines up two shifted copies of 101 and adds them to give 1111, which is 5 × 3 = 15.

Division gives you a quotient and, crucially, a remainder. 1010 ÷ 11 is not simply 11. It is a quotient of 11 with a remainder of 1, because 10 ÷ 3 is 3 remainder 1. The most common base-two division mistake is reading the quotient and forgetting the leftover bits, which is why a good calculator always prints both lines and refuses to divide by zero instead of inventing an answer.

I stopped trusting my own hand-carries

I spent a semester grading low-level assignments, and the single most common error was not a misunderstanding of binary at all. It was a dropped carry three or four columns deep, where the student knew every rule but lost track of one tiny 1 mid-sweep. I do the same thing. When I am verifying a register value against a datasheet at midnight, I will confidently add two eight-bit literals by hand and be off by exactly one bit because a carry quietly evaporated. The fix that actually stuck for me was reading the decimal alongside the binary. The moment 11100001 sits next to its decimal 225, a wrong carry stops being a needle in a haystack and becomes an obvious mismatch. That habit, not more careful counting, is what cut my error rate.

Binary arithmetic is not bitwise logic

This is the distinction that confuses students and bites programmers, so it is worth stating plainly. Arithmetic operations carry and borrow across columns. Bitwise operations do not. A bitwise OR of 1 and 1 is 1, with no carry, because each bit is handled in isolation. But adding 1 and 1 is 10, because the column overflows and pushes a carry left. If your sum ever comes out one bit too short, the usual culprit is that you reasoned about it like a logic gate.

The two live side by side in real code. You might mask off the low nibble of a value with a bitwise AND, then add an offset to it with ordinary arithmetic, in the same line. When you want AND, OR, XOR and shifts, reach for a bitwise calculator. When you want 1010 + 11 to equal 1101, reach for the binary calculator. They answer different questions, and mixing them up is the source of a surprising share of off-by-a-bit bugs.

Reading results in four bases at once

A practical detail that pays for itself: showing the same answer in binary, decimal, hexadecimal and octal at the same time. A long binary string is hard to verify on its own, but the moment you see its decimal twin you can sanity-check the magnitude, and the hex view collapses every four bits into one digit so a flipped bit jumps out. If you are doing a lot of cross-base conversion without arithmetic, a dedicated base converter is the cleaner tool, but for combine-and-convert in one step the multi-base output saves a round trip.

For students, the four-way view is the answer key built in. For low-level programmers, it is the fastest way to confirm a computed value matches what a chip actually reports. Either way, the carries and borrows are doing exactly what they do in decimal, just at two instead of ten. Once that clicks, base two stops feeling like a foreign language and starts feeling like ordinary arithmetic wearing a different costume.


Made by Toolora · Updated 2026-06-13