You are on page 1of 12

Binary Addition, Multiplication, Subtraction, And Division

Basic mathematical operations with binary numbers works similar to the decimal system.
However there are a few rules specific to the binary system. We’ll look at each of them
individually.
Binary Addition

Binary addition is one of the operations of binary operations concept. To recall, the term
“Binary Operation” represents the basic operations of mathematics that are performed on two
operands. Basic arithmetic operations like addition, subtraction, multiplication, and division
play an important role in mathematics. In this lesson, all the concepts about binary addition are
explained which includes:

 Definition
 Rules
 Method
 table
 Examples
 Using 1’s complement

What is Binary Addition


The binary addition operation works similarly to the base 10 decimal system, except that it is a
base 2 system. The binary system consists of only two digits, 1 and 0. Most of the functionalities
of the computer system use the binary number system. The binary code uses the digits 1’s and
0’s to make certain processes turn off or on. The process of the addition operation is very
familiar to the decimal system by adjusting to the base 2.
Before attempting the binary addition process, we should have complete knowledge of how the
place works in the binary number system. Because most of the modern digital computers and
electronic circuits perform the binary operation by representing each bit as a voltage signal. The
bit 0 represents the “OFF” state and the bit 1 represents the “ON” state.

Rules of Binary Addition


Binary addition is much easier than the decimal addition when you remember the following
tricks or rules Using these rules, any binary number can be easily added. The four rules of
binary addition are:

 0+0=0
 0+1=1
 1+0=1
 1 + 1 =10

How To Do Binary Addition?


Now, look at the example of the binary addition:101 + 101
Procedure for Binary Addition of Numbers:
101
(+) 101

 Step 1: First consider the 1’s column, and add the one’s column,( 1+1 ) and it gives the
result 10 as per the condition of binary addition.
 Step 2: Now, leave the 0 in the one’s column and carry the value 1 to the 10’s column.
1
101
(+) 101
————–
0

 Step 3: Now add 10’s place, 1+( 0 + 0 ) = 1. So, nothing carries to the 100’s place and
leave the value 1 in the 10’s place
1
101
(+) 101
————-
10

 Step 4: Now add the 100’s place ( 1 + 1 ) = 10. Leave the value 0 in the 100’s place and
carries 1 to the 1000’s place.
1
101
(+) 101
————-
1010
So, the resultant of the addition operation is 1010.
When you cross-check the binary value with the decimal value, the resultant value should be
the same.
The binary value 101 is equal to the decimal value 5
So, 5 + 5 = 10
The decimal number 10 is equal to the binary number 1010.

Binary Addition Table


The table of adding two binary numbers 0 and 1 is given below:

x y x+y

0 0 0

0 1 1

1 0 1

1 1 0 (where 1 is carried over)

You can see from the above table, x and y are the two binary numbers. So when we give the
input for x = 0 and y = 0, then the output is equal to 0. When x = 0 or 1 and y = 1 or 0, then x+y =
1. But when both x and y are equal to 1 then their addition equals to 0 but the carryover
number will equal to 1, which means basically 1 + 1 = 10 in binary addition, where 1 is carry
forwarded to the next digit.

Examples of Binary Addition


A few examples of binary additions are as follows:
Example 1: 10001 + 11101
Solution:
1
10001
(+) 1 1 1 0 1
———————–
101110
Example 2: 10111 + 110001
Solution:
111
10111
(+) 1 1 0 0 0 1
———————–
1001000

Binary Addition Using 1’s Complement

 The number 0 represents the positive sign


 The number 1 represents the negative sign
Addition of Positive and Negative Number
Case 1: When a positive number has a greater magnitude
Take the 1’s complement of the negative number and the carry is added to the resultant sum at
the 1’s place. When you add the carry with the resultant, you will get the sum value.
Example:
+ 1111 and -1101
+1111=01111
– 1 1 0 1 = 1 0 0 1 0 (taking 1’s complement)
——————-
00001
1
———————
00010
Therefore, the solution is + 0010.

 Case 2: When a negative number has a greater magnitude


Take the 1’s complement of the negative number and there will be no end-around carrying in
this case. Finally, the sum is obtained by taking the 1’s complement of the resultant.
Example:
+ 1111 and -1101
– 1 1 1 1 = 1 0 0 0 0 (taking 1’s complement)
+1 1 0 1 = 0 1 1 0 1
—————-
1110
——————
1 0 0 1 0 (taking 1’s complement)
Addition of Two Negative Numbers
Take the 1’s complement of both the negative numbers and then add. The end around carrying
will appear and it will generate a number 1 in the sign bit. The sum value can be obtained by
taking the 1’s complement of the resultant.
Example:

 -1010 and – 0011

 1 0 1 0 = 1 0 1 0 1 (taking 1’s complement)


 0 0 1 1 = 1 1 1 0 0 (taking 1’s complement)
————————–
10001
1
—————————–
10010
—————————-
1 1 1 0 1 (taking 1’s complement)
Therefore the solution is – 1101
Binary Subtraction

Binary subtraction is another basic binary operation. The basic operations in mathematics are
addition, subtraction, multiplication, and division. To recall, binary operation represents the
operations of mathematics that are performed on two operands and the result is obtained.
Here, the topic of a binary subtraction operation is explained in detail. The concepts that are
included in this lesson are:

 What is Binary Subtraction?


 Procedure to subtract two binary numbers.
 Examples of Subtracting two Binary Numbers

What is Binary Subtraction?


Can you subtract binary numbers? The answer is yes. Subtraction of binary numbers is an
arithmetic operation similar to the subtraction of base 10 numbers. For example, 1 + 1 + 1 = 3 in
base 10 and 1 + 1 + 1 = 11 in binary number system. When you add and subtract binary
numbers you will need to be careful when borrowing as these will take place more often.
When you subtract several columns of binary digits, you must take into account the borrowing.
when 1 is to be subtracted from 0, the result is 1 with borrowed from the previous position.

Binary Subtraction Rule Chart


Rules and tricks: Binary subtraction is much easier than the decimal subtraction when you
remember the following rules:

 0–0=0
 0 – 1 = 1 ( with a borrow of 1)
 1–0=1
 1–1=0
Now, look at the example of the binary subtraction: 101 from 1010

How to Subtract Binary Numbers?


Learn how to do binary subtraction using the example: 1010 – 101

Procedure to do Binary Subtraction:


1010
(-) 101
 Step 1: First consider the 1’s column, and subtract the one’s column,( 0 – 1 ) and it gives
the result 1 as per the condition of binary subtraction with a borrow of 1 from the 10’s
place.
 Step 2: After borrowed 1 from the 10’s column, the value 1 in the 10’s column is
changed into the value 0
1 Borrow
1010
(-) 1 0 1
——————
1

 Step 3: So, subtract the value in the 10’s place, ( 0 – 0 ) = 0.


1 Borrow
1010
(-) 1 0 1
——————
01

 Step 4: Now subtract the values in 100’s place. Borrow 1 from the 1000’s place ( 0 – 1 ) =
1.
1 1 Borrow
1010
(-) 1 0 1
——————
0101
So, the resultant of the subtraction operation is 0101.
When you cross-check the binary subtraction resultant value with the decimal value, the
resultant value should be the same.
The binary value 1010 is equal to the decimal value 10 and 101 is equivalent to 5
So, 10 – 5 = 5
Therefore, the decimal number 5 is equal to the binary number 0101.

Examples on Binary Subtraction


Consider other examples of binary subtractions are as follows:
Example 1: 0011010 – 001100
Solution:
1 1 Borrow
0011010
(-) 0 0 1 1 0 0
——————
0001110
Decimal Equivalent :
0 0 1 1 0 1 0 = 26
0 0 1 1 0 0 = 12
Therefore, 26 – 12 = 14
The binary resultant 0 0 0 1 1 1 0 is equivalent to the 14
Example 2: 0100010 – 0001010
Solution:
1 1 Borrow
0 1 0 0 0 1 0 = 3410
(-) 0 0 0 1 0 1 0 = 1010
——————
0 0 1 1 0 0 0 = 2410

Binary Subtraction Using 1’s Complement

 The number 0 represents the positive sign


 The number 1 represents the negative sign

Procedures for Binary Subtraction by 1’s Complement

 Write the 1’s complement of the subtrahend


 Then add the 1’s complement subtrahend with the minuend
 If the result has a carryover, then add that carry over in the least significant bit
 If there is no carryover, then take the 1’s complement of the resultant and it is negative.
Binary Subtraction Questions Using 1’s Compement
Question 1:
(110101)2 – (100101)2
Solution:
(1 1 0 1 0 1)2 = 5310
(1 0 0 1 0 1)2 = 3710 – subtrahend
Now take the 1’s complement of the subtrahend and add with minuend.
1 carry
110101
(+) 0 1 1 0 1 0
——————
001111
1 carry
——————
010000
Therefore, the solution is 010000
(010000)2 = 1610
Question 2:
(101011)2 – (111001)2
Solution:
Take 1’s complement of the subtrahend
111
101011
(+) 0 0 0 1 1 0 (1’s complement)
——————
110001
Now take the 1’s complement of the resultant since it does not carry 1
The resultant becomes 0 0 1 1 1 0
Now, add the negative sign to the resultant value
Therefore the solution is – (001110)2.
Binary Multiplication

What is Binary Multiplication?


The binary multiplication operation is actually a process of addition and shifting operation and
this process has to be continued until all the multiplier is done and finally the addition
operation is made. Similar to the decimal system, the multiplication of the binary numbers is
done by multiplying the multiplicand with the multiplier. It is noted that the multiplication by
zero makes all the bits zero and this step may be ignored in the intermediate steps and the
multiplication by 1 makes all the multiplicand value unchanged. In this section, you will get
answers for the questions about binary multiplication, including:

 What is Binary multiplication?


 Procedure to multiply two binary numbers
 Steps to Solve Binary multiplication using examples

Binary Multiplication Rules


Binary multiplication, like other binary operations, is much easier, unlike the decimal
multiplication when you remember the following multiplication rules. The rules of binary
multiplication are:

 0×0=0
 0×1=0
 1×0=0
 1×1=1

Examples of Binary Multiplication


Some binary multiplication examples are given below for a better understanding of this
concept.
Example 1: Solve 1010 × 101
Solution:
1010 × 101
1010
(×) 101
—————–
1010
0000
——————
01010 ……. First Intermediate Sum
1010
——————–
110010
Comparison with Decimal values:
10102 = 1010
10102 = 510
10 x 5 = 5010
(110010)2 = 5010

Division

Binary division is similar to decimal division. The only difference is that in decimal system, since
we are dividing traditional numbers, the dividend (or portion of it) can be 0, 1 or more than 1
times of the divisor. However in binary, it can only be 0 or 1 times, i.e. the dividend (or portion of
it) is >= or < than the divisor.

Let’s try dividing 6 by 3. Binary of 6 is 110 and that or 3 is 11. Following decimal division
convention

1. We check for a portion of dividend from its left that is >= the divisor.

2. Then we subtract the multiple of the divisor that is <= the portion of the dividend. The
multiplier (1) gets appended to the quotient and result of the subtraction is the remainder.

3. We bring down 1 bit at the time (going left to right) for the remaining portion of the
dividend and check if the expression (remainder + brought down bit) is >= the divisor. If not,
we append 0 to the quotient, or else we follow step 2 again.

So the steps for 6 / 3 or 110 / 11 are


1. Is 1 (left most bit of 110) >= 11. No (we don’t need to add 0 to quotient here since 0s on the
left are insignificant).

2. Is 11 (left 2 most bits of 110) >= 11. Yes. We add 1 (multiplier) to the quotient, and subtract
11 from 11. That gives us a remainder of 0. Note, we are subtracting “one-one from one-
one NOT eleven from eleven”.

3. Now we bring down the remaining bit (0) from 110. Is 0 >= 11. No. So we append 0 to the
quotient.

Since we have no more bits remaining in the dividend, we stop here and check. Our remainder is
0 and quotient is 10 (binary) = 2.

Division can become more complicated with signed numbers, and floating point binary numbers
(not covered in this tutorial).

You might also like