Adding binary numbers - Calculator

required files are loaded...
URL copied

About the calculator

This calculator can be used to add 2 binary numbers. The binary numbers may be negative, but must have the same sign.

Adding binary numbers

2 Binary numbers can be added in a similar way to decimal numbers. If the two binary numbers have no fractional digits, they are written below each other so that the last digits of both numbers are below each other. Either above or below the two numbers, a row is left blank for the carry.

  11110
+  1100
       
       

Then, starting from the rightmost column, the digits of a column are added together. It is important that the sum of the digits in a column is calculated as a binary number. If a column contains 2 ones, then the sum of the column is 102 and if a column contains 3 ones, then the sum of the column is 112.

If the sum of a column is 0 or 1, then this is written to the result.

  11110
+  1100
       
     10

If the sum of a column is greater than 1, the last digit is written into the result and the digit before it is written into the row for the carries one column to the left.

  11110
+  1100
   1   
    010

In the next step, the carry is included in the sum.

  11110
+  1100
  11   
   1010
  11110
+  1100
 111   
  01010
  11110
+  1100
 111   
 101010

Binary numbers with fractional digits:

If the two binary numbers have fractional digits, then they are written one below the other so that the binary points of both binary numbers are one below the other and then they are added as described above. If the numbers have different numbers of digits before or after the binary point, then the number with fewer digits can be filled with zeros, but you do not have to do this.

  11110.111001
+  1100.101   
 111  1 11    
 101011.100001

Addition with negative binary numbers

both binary numbers are negative:

If both summands of the addition are negative, then the addition is first performed with the absolute values of the binary numbers and a minus sign is written in front of the result.

The following addition is to be performed as an example:

−10102 + (−1002)

First, the addition is performed with the absolute values of the two numbers:

 1010
+ 100
 1110

The result is negative:

−10102 + (−1002)=−(10102 + 1002)
 =−11102

one of the two summands is negative:

If one of the two summands is positive and the other negative, simply subtract the absolute value of the negative binary number from the positive binary number (subtract binary numbers).

The following addition is to be performed as an example:

−10102 + 100002

So you perform the subtraction with 100002 as the minuend and 10102 as the subtrahend:

 10000
 1010
 111  
 00110

The following therefore applies:

−10102 + 100002=100002 + (−10102)
 =100002 − 10102
 =1102

good explanatory videos on Youtube

Share:FacebookTwitter