Math Calculators

Binary Calculator

Choose a mode, enter binary or decimal values, and click Calculate

Result: 101110110

Binary A
10101010
Binary B
11001100
Decimal A
170
Decimal B
204
Binary value
101110110
Decimal value
374
Binary arithmetic uses whole numbers. Division returns the integer quotient and discards the remainder.

What this calculator does

The Binary Calculator performs arithmetic on base-2 numbers and converts between binary and decimal. It supports addition, subtraction, multiplication, and integer division, and it shows the decimal equivalents of the operands and the result.

Binary is the base-2 number system used by digital computers. It has only two digits, 0 and 1. Each position represents a power of two: the rightmost bit is 2⁰, the next is 2¹, then 2², and so on. The binary value 10101010 therefore represents 128 + 32 + 8 + 2 = 170 in decimal.

How to use this calculator

  1. Choose Binary arithmetic, Binary to decimal, or Decimal to binary.
  2. Enter the value or values. For arithmetic, choose an operation.
  3. Click Calculate.
  4. Review the result and the decimal equivalents.

The default arithmetic example is 10101010 + 11001100 = 101110110, which is 170 + 204 = 374 in decimal. The conversion examples are 10101010 = 170 and 170 = 10101010.

Binary arithmetic

Binary arithmetic follows the same rules as decimal arithmetic, but carries and borrows happen at 2 instead of 10:

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

Subtraction borrows 2 from the next position. Multiplication is repeated addition and shifting, and division is repeated subtraction of shifted divisors. The calculator converts the operands to integers, performs the operation, and converts the result back to binary.

What the results mean

The result panel shows the answer in binary and in decimal. For arithmetic, both operands are also shown in both bases so you can check the conversion. Integer division discards the remainder; the calculator does not display a fractional binary result.

A leading zero does not change a binary value. The calculator removes unnecessary leading zeros from the result, so 0101110110 is shown as 101110110.

Assumptions and limitations

  • Inputs are whole binary or decimal integers. Fractions and decimal points are not accepted.
  • Binary values may contain only 0 and 1. Hex digits and other characters are rejected.
  • Division by zero is rejected.
  • Division returns the integer quotient and discards the remainder.
  • The calculator does not implement two's-complement signed 8-bit or 16-bit representations. A negative result is shown with a leading minus sign.
  • Inputs are limited to 1,000 characters to keep the page responsive.

Frequently asked questions

Why does 1 + 1 equal 10 in binary?

Binary has only two digits. After 1, the next value requires a new position, just as 9 + 1 requires a new position in decimal. The binary 10 means one 2 and zero 1s, which equals 2 in decimal.

How do I convert binary to decimal by hand?

Multiply each bit by its place value and add the results. For 10101010, the place values from left to right are 128, 64, 32, 16, 8, 4, 2, and 1. The set bits are 128, 32, 8, and 2, which add to 170.

Does the calculator handle negative binary numbers?

It accepts a leading minus sign and returns a signed result. It does not interpret a bit pattern as a two's-complement negative number.

Why is the division result not exact?

The calculator performs integer division, so any remainder is discarded. To see the remainder, subtract the product of the quotient and divisor from the original value.

Reference table

Decimal and binary equivalents

DecimalBinary
11
210
311
4100
5101
81000
101010
1610000
32100000
641000000
12810000000
25511111111
256100000000
102410000000000

Source

Reference: Calculator.net — Binary Calculator.

Math Calculators