Binary Addition using 2’s Complement

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.

Binary Numbers

  • 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
  • Radix Complement
  • Diminished Radix Complement
  • Arithmetic Operations of Binary Numbers


From Binary Addition using 2’s Complement to HOME PAGE




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.



Share this page: What’s this?

Recent Articles

  1. Time Duration |How to Calculate the Time Duration (in Hours & Minutes)

    Apr 16, 24 02:19 AM

    Duration of Time
    We will learn how to calculate the time duration in minutes and in hours. Time Duration (in minutes) Ron and Clara play badminton every evening. Yesterday, their game started at 5 : 15 p.m.

    Read More

  2. Worksheet on Third Grade Geometrical Shapes | Questions on Geometry

    Apr 16, 24 02:00 AM

    Worksheet on Geometrical Shapes
    Practice the math worksheet on third grade geometrical shapes. The questions will help the students to get prepared for the third grade geometry test. 1. Name the types of surfaces that you know. 2. W…

    Read More

  3. 4th Grade Mental Math on Factors and Multiples |Worksheet with Answers

    Apr 16, 24 01:15 AM

    In 4th grade mental math on factors and multiples students can practice different questions on prime numbers, properties of prime numbers, factors, properties of factors, even numbers, odd numbers, pr…

    Read More

  4. Worksheet on Factors and Multiples | Find the Missing Factors | Answer

    Apr 15, 24 11:30 PM

    Worksheet on Factors and Multiples
    Practice the questions given in the worksheet on factors and multiples. 1. Find out the even numbers. 27, 36, 48, 125, 360, 453, 518, 423, 54, 58, 917, 186, 423, 928, 358 2. Find out the odd numbers.

    Read More

  5. Method of L.C.M. | Finding L.C.M. | Smallest Common Multiple | Common

    Apr 15, 24 02:33 PM

    LCM of 24 and 30
    We will discuss here about the method of l.c.m. (least common multiple). Let us consider the numbers 8, 12 and 16. Multiples of 8 are → 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, ......

    Read More