When negative numbers are expressed in binary addition using 2’s complement the addition of binary numbers becomes easier. This operation is almost similar to that in 1’s complement system and is explained with examples given below:

A. Addition of a positive number and a negative number.

We consider the following cases.

Case I: When the positive number has a greater magnitude

In this case the carry which will be generated is discarded and the final result is the result of addition.

The following examples will illustrate this method in binary addition using 2’s complement:

In a 5-bit register find the sum of the following by using 2’s complement:

(i) -1011 and -0101

Solution:

+ 1 0 1 1           ⇒          0 1 0 1 1

- 0 1 0 1           ⇒          1 1 0 1 1     (2’s complement)

(Carry 1 discarded)               0 0 1 1 0

Hence the sum is + 0110.

(ii) + 0111 and – 0011.

Solution:

+ 0 1 1 1           ⇒          0 0 1 1 1

- 0 0 1 1           ⇒          1 1 1 0 1

(Carry 1 discarded)               0 0 1 0 0

Hence the sum is + 0100.

Case II: When the negative number is greater.

When the negative numbers is greater no carry will be generated in the sign bit. The result of addition will be negative and the final result is obtained by taking 2’s complement of the magnitude bits of the result.

The following examples will illustrate this method in binary addition using 2’s complement:

In a 5-bit register find the sum of the following by using 2’s complement:

(i) + 0 0 1 1 and - 0 1 0 1

Solution:

+ 0 0 1 1           ⇒          0 0 0 1 1

- 0 1 0 1           ⇒          1 1 0 1 1     (2’s complement)

1 1 1 1 0

2’s complement of 1110 is (0001 + 0001) or 0010.

Hence the required sum is - 0010.

(ii) + 0 1 0 0 and - 0 1 1 1

Solution:

+ 0 1 0 0           ⇒          0 0 1 0 0

- 0 1 1 1           ⇒          1 1 0 0 1     (2’s complement)

1 1 1 0 1

2’s complement of 1101 is 0011.

Hence the required sum is – 0011.

B. When the numbers are negative.

When two negative numbers are added a carry will be generated from the sign bit which will be discarded. 2’s complement of the magnitude bits of the operation will be the final sum.

The following examples will illustrate this method in binary addition using 2’s complement:

In a 5-bit register find the sum of the following by using 2’s complement:

(i) – 0011 and – 0101

Solution:

- 0 0 1 1           ⇒          1 1 1 0 1          (2’s complement)

- 0 1 0 1           ⇒          1 1 0 1 1          (2’s complement)

(Carry 1 discarded)               1 1 0 0 0

2’s complement of 1000 is (0111 + 0001) or 1000.

Hence the required sum is – 1000.

(ii) -0111 and – 0010.

Solution:

- 0 1 1 1           ⇒          1 1 0 0 1          (2’s complement)

- 0 0 1 0           ⇒          1 1 1 1 0          (2’s complement)

(Carry 1 discarded)               1 0 1 1 1

2’s complement of 0111 is 1001.

Hence the required sum is – 1001.

• Decimal Number System
• Why Binary Numbers are Used
• Binary to Decimal Conversion
• Conversion of Numbers
• Hexa-decimal Number System
• Conversion of Binary Numbers to Octal or Hexa-decimal Numbers
• Octal and Hexa-Decimal Numbers
• Signed-magnitude Representation
• Arithmetic Operations of Binary Numbers

Didn't find what you were looking for? Or want to know more information about Math Only Math. Use this Google Search to find what you need.

Recent Articles

1. What is a Triangle? | Types of Triangle | Scalene Triangle | Isosceles

Jun 17, 24 11:22 PM

A simple closed curve or a polygon formed by three line-segments (sides) is called a triangle. The above shown shapes are triangles. The symbol of a triangle is ∆. A triangle is a polygon with three s…

2. Interior and Exterior of an Angle | Interior Angle | Exterior Angle

Jun 16, 24 05:20 PM

Interior and exterior of an angle is explained here. The shaded portion between the arms BA and BC of the angle ABC can be extended indefinitely.

3. Angles | Magnitude of an Angle | Measure of an angle | Working Rules

Jun 16, 24 04:12 PM

Angles are very important in our daily life so it’s very necessary to understand about angle. Two rays meeting at a common endpoint form an angle. In the adjoining figure, two rays AB and BC are calle

4. What is a Polygon? | Simple Closed Curve | Triangle | Quadrilateral

Jun 16, 24 02:34 PM

What is a polygon? A simple closed curve made of three or more line-segments is called a polygon. A polygon has at least three line-segments.