Binary Calculator

Do arithmetic in base 2: add with carries, subtract, multiply by shift-and-add and divide with remainder, with the answer also in decimal, hex and octal.

Digits 0 and 1 only; spaces, underscores, a 0b prefix and a leading minus sign are allowed.
Operation
Result in binary
100 1000
Result in decimal
72
Result in hexadecimal
48
Result in octal
110
Bits in the result
7
101101 + 11011 =100 100072 in decimal

Show the work

  1. Add column by column from the right: 0+0 = 0, 0+1 = 1, 1+1 = 10 (write 0, carry 1), 1+1+1 = 11 (write 1, carry 1).
  2. This sum produced 6 carries, shown above the columns.
  3. Check in decimal: 101101₂ = 45 and 11011₂ = 27, so 45 + 27 = 72 = 1001000₂
carries111111
101101
+ 11011
sum1001000

Binary is the native number system of digital hardware, and working a few sums by hand is the fastest way to understand carries, overflow and why computers shift bits to multiply. This calculator performs addition, subtraction, multiplication and division directly in base 2 with exact big-integer arithmetic, lays the work out in columns, and confirms each answer in decimal, hexadecimal and octal.

How to use the binary calculator

  1. Enter the first binary number using 0 and 1. Spaces, underscores, a 0b prefix and a leading minus sign are allowed.
  2. Choose the operation: add, subtract, multiply or divide.
  3. Enter the second binary number.
  4. Read the result on the tape in grouped binary, plus decimal, hex and octal. Below, the calculator draws the column addition with carries, the subtraction layout, the shift-and-add rows for multiplication or the bit-by-bit long division.

Binary arithmetic rules

Each place is a power of 2, so a carry happens when a column reaches 2:

Operation Rule
Addition 0+0 = 0 · 0+1 = 1 · 1+1 = 10 · 1+1+1 = 11
Subtraction 1−0 = 1 · 1−1 = 0 · 0−0 = 0 · 0−1 = 1, borrow 1
Multiplication 0×0 = 0×1 = 1×0 = 0 · 1×1 = 1
Division quotient bit is 1 when the running value ≥ divisor
value = bn·2n + … + b1·2 + b0

Worked example: addition

Add 101101 (45) and 11011 (27).

Column 0: 1 + 1 = 10 → write 0, carry 1.

Column 1: 0 + 1 + 1 = 10 → write 0, carry 1.

Column 2: 1 + 0 + 1 = 10 → write 0, carry 1.

Column 3: 1 + 1 + 1 = 11 → write 1, carry 1.

Column 4: 0 + 1 + 1 = 10 → write 0, carry 1.

Column 5: 1 + 0 + 1 = 10 → write 0, carry 1, which becomes a new leftmost 1.

Result: 1001000 = 64 + 8 = 72, and 45 + 27 = 72. ✓

Worked example: multiplication and division

1011 × 101 (11 × 5): the bits of 101 are 1, 0, 1 from the right, so the rows are 1011, 00000 and 101100. Adding them gives 110111 = 55.

101101 ÷ 110 (45 ÷ 6): bring bits down until the running value reaches 110. 1011 ≥ 110 → write 1, remainder 101; bring down 0 → 1010 → write 1, remainder 100; bring down 1 → 1001 → write 1, remainder 11. Quotient 111 (7), remainder 11 (3), and 7 × 6 + 3 = 45. ✓

Why it matters

  • Overflow. A computer adds in fixed widths. In 8 bits, 11111111 + 1 = 1 0000 0000 needs a ninth bit, so the stored result wraps to 0 and a carry flag is set.
  • Shifts are fast arithmetic. Shifting left by one multiplies by 2; shifting right divides by 2 and drops the remainder. Compilers turn x × 8 into a 3-bit left shift.
  • Hex is shorthand. Each hex digit is exactly 4 bits, so 1001000 is 0100 1000 = 0x48. The tape shows hex for that reason.

This tool works with whole numbers of any length. For binary fractions or conversions between any two bases, use the number base converter. For AND, OR, XOR and shifts at a fixed width, try the bitwise calculator, and for how negative numbers are stored, the two’s complement calculator. The decimal versions of these methods are in the long addition and long division calculators.

Frequently asked questions

How do you add binary numbers?

Column by column from the right, like decimal addition but carrying at 2: 0 + 0 = 0, 0 + 1 = 1, 1 + 1 = 10 (write 0, carry 1) and 1 + 1 + 1 = 11 (write 1, carry 1). For example 101101 + 11011 = 1001000, which is 45 + 27 = 72.

How do you multiply in binary?

Shift and add. For each 1 in the second number, write the first number shifted left by that bit's position, then add the rows. Since each digit is 0 or 1, every partial product is either zero or a shifted copy of the first number.

What happens when the result is negative?

The calculator shows the magnitude in binary with a minus sign, the way you would write it on paper. Computers store negative numbers in two's complement instead; use the two's complement calculator to see that bit pattern for a given width.

Can I enter numbers with spaces?

Yes. Spaces and underscores are ignored, so 1011 0110 and 1011_0110 are both read as 10110110. A 0b prefix is also accepted.

Last reviewed October 2026 by the CalcFluent editorial team. How we check our calculators.