Binary Calculator

Convert binary and decimal values or add two binary numbers.

Binary Calculator

Formula

bin2dec parseInt base2; dec2bin toString(2); bin_add sum then toString(2)

Uses base 2 parse and stringify. Addition happens in integer space.

This binary calculator converts binary to decimal, decimal to binary, or adds two binary values. Default binary 1010 equals decimal 10.

Modes cover Binary to Decimal, Decimal to Binary, and Add two binaries. Subtraction, bitwise operators, and automatic step diagrams are not included.

Methods

Binary to decimal reads the string as base 2. Decimal to binary writes a non negative integer in base 2. Addition converts both binaries to integers, adds them, then writes the sum in binary.

Worked examples

Binary to decimal: 1010 = 8 + 2 = 10. Decimal to binary: 13 = 1101. Add: 1011 + 1101 = 11 + 13 = 24 = 11000 in binary.

Common mistakes

  • Digits other than 0 or 1 in binary mode.
  • Negative decimals (not supported).
  • Empty second field when adding.

For hexadecimal work, open the hex calculator. For roots and powers, try the exponent calculator or the root calculator.

Related calculators

Frequently Asked Questions

What does the default example show?

Binary 1010 in Binary → Decimal mode equals decimal 10.

Which characters are allowed in binary?

Only 0 and 1 digits for binary modes.

What does the second value field do?

It is used when you choose Add two binaries. Default second binary is 110.

How do I convert decimal to binary?

Choose Decimal → Binary and enter a non-negative whole number in the value field.

What is 1010 + 110 in binary?

Decimal 10 + 6 = 16, which is binary 10000.

Are negative decimals supported?

The decimal to binary path expects non-negative integers.

Is leading zero allowed?

Yes for binary strings, though it does not change the numeric value.

Does this show two’s complement?

No. It focuses on unsigned conversion and simple binary addition.