Binary Calculator

Use the following calculators to perform the addition, subtraction, multiplication, or division of two binary values, as well as convert binary values to decimal values, and vice versa.

Modify the values and click the calculate button to use

Binary Calculation—Add, Subtract, Multiply, or Divide

    = ?

Convert Binary Value to Decimal Value

Binary Value: = ?

Convert Decimal Value to Binary Value

Decimal Value: = ?

RelatedHex Calculator | IP Subnet Calculator

The binary numeral system works much like the familiar decimal system, except its base is 2 instead of 10. Whereas decimal employs ten symbols (0‑9), binary uses only two — 0 and 1 — each called a bit. Apart from this base difference, the usual arithmetic operations (addition, subtraction, multiplication, division) follow the same principles as in decimal arithmetic.

Virtually all contemporary computers rely on binary because it maps neatly onto digital hardware that distinguishes just two conditions – on/off, true/false, present/absent. Designing circuitry for ten separate voltage levels, as a decimal system would demand, is far more complex.

Below are some typical conversions between binary and decimal values:


Binary/Decimal Conversion

DecimalBinary
00
11
210
311
4100
7111
81000
101010
1610000
2010100

At first binary can look puzzling, but remembering that each position represents a power of 2 (just as decimal places represent powers of 10) helps. Take the number 8: in decimal it sits in the units place (10⁰), contributing 8 × 10⁰. The same principle applies in binary, where each place corresponds to 2ⁿ.

8 × 100 = 8 × 1 = 8

Using the number 18 for comparison:

(1 × 101) + (8 × 100) = 10 + 8 = 18

In binary, 8 is represented as 1000. Reading from right to left, the first 0 represents 20, the second 21, the third 22, and the fourth 23; just like the decimal system, except with a base of 2 rather than 10. Since 23 = 8, a 1 is entered in its position yielding 1000. Using 18, or 10010 as an example:

18 = 16 + 2 = 24 + 21
10010 = (1 × 24) + (0 × 23) + (0 × 22) + (1 × 21) + (0 × 20) = 18

The step by step process to convert from the decimal to the binary system is:

  1. Find the largest power of 2 that lies within the given number
  2. Subtract that value from the given number
  3. Find the largest power of 2 within the remainder found in step 2
  4. Repeat until there is no remainder
  5. Enter a 1 for each binary place value that was found, and a 0 for the rest

Using the target of 18 again as an example, below is another way to visualize this:


2n2423222120
Instances within 1810010
Target: 1818 - 16 = 22 - 2 = 0 

Turning a binary number into its decimal counterpart is straightforward: locate every position that contains a 1, note its associated power‑of‑2 value, and add those values together.

EX: 10111 = (1 × 24) + (0 × 23) + (1 × 22) + (1 × 21) + (1 × 20) = 23


2423222120
10111
160421

Hence: 16 + 4 + 2 + 1 = 23.

Binary Addition

Binary addition follows the same rules as addition in the decimal system except that rather than carrying a 1 over when the values added equal 10, carry over occurs when the result of addition equals 2. Refer to the example below for clarification.

Note that in the binary system:

EX:

The only real distinction when adding binary numbers is that the binary digit ‘2’ is represented as ‘10’ in decimal. The superscripted 1’s indicate bits that are carried over. A frequent slip occurs when 1 + 1 yields 0 while a carry from the neighboring column is also present; the resulting bottom bit should be the carried‑over 1, not 0. This is illustrated in the third column from the right in the example above.

Binary Subtraction

Binary subtraction mirrors decimal subtraction aside from the limited digit set. Borrowing is needed whenever you try to subtract a larger digit from a smaller one—in binary this only happens when subtracting 1 from 0. In that case the 0 is treated as a ‘2’ (so 2‑1 = 1) and the borrowing column is reduced by one. If the next column is also 0, the borrow propagates leftward until a 1 is found, which is then turned into 0. See the example below for details.

Note that in the binary system:

EX1:

EX2:

The superscript numbers show how each bit changes during borrowing: the column that lends a value effectively gains a 2, while the column it lends to loses one.

Binary Multiplication

Multiplying in binary tends to be more straightforward than in decimal because the only possible factors are 0 and 1. Consequently each partial product is either the original multiplicand or zero. As with decimal multiplication, each subsequent row is shifted one place to the left and padded with zeros. The real challenge lies in adding the resulting binary rows, which depends on the number of bits involved. Refer to the example for illustration.

Note that in the binary system:

EX:

The example demonstrates that binary multiplication follows the same steps as decimal multiplication. Here the zero placeholder is written explicitly in the second line; in decimal work it is usually omitted. We show it because, for a binary add/subtract calculator like the one on this page, that zero matters. Omitting it could lead to an incorrect sum. Remember, in binary any zero to the right of a one matters, whereas leading zeros to the left of the most significant one do not.

EX:

Binary Division

Dividing binary numbers proceeds much like long division with decimals. The dividend is repeatedly reduced by the divisor, but subtraction is performed in binary. A solid grasp of binary subtraction is therefore essential for binary division. See the example and the subtraction section for clarification.

EX:    
00111
1110101
11
100
11
11
11
0
Financial Fitness & Health Math Other