Productivity and Utilities

Binary Calculator

Do arithmetic on binary numbers and read the result in four number systems.

Your numbers

Digits 0 and 1 only, up to 256 digits. A leading minus sign and 0b are allowed.

Result

101101 + 1011

111000

45 + 11 = 56 in decimal.

Result in binary
111000
Result in decimal
56
Result in hexadecimal
38
Result in octal
70
Bits in the result
6

Column by column, right to left

PlaceFirstSecondCarry inDigitCarry out
011001
101101
210101
311111
400110
510010
How this was calculated
  1. Both numbers are read as base 2 integers: each place is worth twice the place to its right (1, 2, 4, 8, ...).
  2. Addition carries when a column adds to 2 or more; subtraction borrows 2 from the next column when a column goes below 0.
  3. Negative results are written with a minus sign rather than in two's complement. For a fixed-width signed form, use the two's complement converter.

Calculated using SumPanda.com · https://sumpanda.com/binary-calculator/

Results are estimates for general information. Verify important figures before relying on them.

Next step

How to use the binary calculator

  1. Type the first binary number. Use only the digits 0 and 1. A leading minus sign, a 0b prefix, spaces and underscores are allowed.
  2. Choose the operation: add, subtract, multiply or divide.
  3. Type the second binary number.
  4. Read the result in binary, decimal, hexadecimal and octal. For addition and subtraction the table shows each column with its carry or borrow. Division also shows the remainder.

Formula

each place is worth twice the place to its right: 1, 2, 4, 8, 16 ...

add: column sum = a + b + carry, digit = sum mod 2, carry out = sum div 2

subtract: borrow 2 from the next column when a column goes below 0

divide: quotient and remainder, cut toward zero

Numbers up to 256 binary digits are supported and every result is exact. Negative results keep their minus sign instead of being written in two's complement.

101101 and 1011

101101 is 45 and 1011 is 11. Adding them gives 111000, which is 56 in decimal, 38 in hex and 70 in octal. The column table shows the carries: the lowest column is 1 + 1 = 10, so it writes 0 and carries 1, and the carry travels up through the fourth column.

Subtracting gives 100010 (34), multiplying gives 111101111 (495, hex 1EF), and dividing gives a quotient of 100 (4) with a remainder of 1. Reversing the subtraction, 1011 - 101101, gives -100010, which is -34.

Reading the carry table

Addition works like decimal addition, except a column carries as soon as it reaches 2. The table lists the places from the right, with the two digits, the carry coming in, the digit written and the carry going out. Subtraction works the same way with a borrow of 2 instead of a carry.

The carry out of the last place becomes the leading digit of the result when it is 1, which is why adding two 6-digit numbers can give a 7-digit answer.

Other number tools

To convert between bases without arithmetic, use the number base converter. To see how negative numbers are stored in a fixed number of bits, use the two's complement converter. For AND, OR, XOR and shifts, use the bitwise calculator, and to turn text into binary use the binary translator.

Assumptions and limits

  • Numbers are whole integers in base 2. Fractions with a binary point are not accepted.
  • Division truncates toward zero, so the remainder has the same sign as the first number.
  • Results have no fixed width, so there is no overflow. Fixed-width wraparound is not modeled.
  • The column tables are shown for non-negative operands of up to 24 digits, and for subtraction only when the first number is at least the second.

Formulas reviewed October 10, 2026. See the calculation methodology for how SumPanda rounds, tests and sources its formulas.

Frequently asked questions

How do you add binary numbers?

Add column by column from the right. 0 + 0 is 0, 0 + 1 is 1, and 1 + 1 is 10, which writes 0 and carries 1 into the next column. The table on this page shows each column, so you can follow the carries.

Can I use negative binary numbers?

Yes, with a leading minus sign. The result keeps its sign, so 1011 - 101101 is -100010. For fixed-width negative values, use the two's complement converter.

What happens when I divide binary numbers?

You get a whole-number quotient and a remainder, both in binary and decimal. Division by zero is refused with a message.

Why does the result also show hex and octal?

Groups of four binary digits map to one hex digit and groups of three to one octal digit, so those forms are shorter ways to write the same value and are common in programming.