SHARE
SPREAD
HELP

The Tradition of Sharing

Help your friends and juniors by posting answers to the questions that you know. Also post questions that are not available.


To start with, Sr2Jr’s first step is to reduce the expenses related to education. To achieve this goal Sr2Jr organized the textbook’s question and answers. Sr2Jr is community based and need your support to fill the question and answers. The question and answers posted will be available free of cost to all.

 

#
Authors:
M. Morris Mano, Michael D. Ciletti
Chapter:
Digital Systems And Binary Numbers
Exercise:
Problems
Question:20 | ISBN:9780132774208 | Edition: 5

Question

Convert decimal +49 and +29 to binary, using the signed‐2’s‐complement representation and enough digits to accommodate the numbers. Then perform the binary equivalent of (+29) + (-49), (-29) + (+49), and (-29) + (-49). Convert the answers back to decimal and verify that they are correct.

TextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbook

Answer

1.20

Ans:  + 49 is converted as 0 110001 in binary

           2’s complement of + 49 is 001110 + 1 = 001111

          - 49 is written as (- 2’s complement of + 49) = 1 001111

         

          + 29 is converted as 0 011101 in binary

           2’s complement of + 29 is 100010 +1 = 100011

          -29 is written as (-2’s complement of + 29) = 1 100011

(a) (+29) + (-49) = 0011101 + 1001111

                           =  1101100

           Here there is no carry, so find its 2’s complement

           2’s complement of 101100 is 010011 +1 = 1010100

                                                                            = - 20.

(b)  (-29) + (+49) = 1100011 + 0110001

                            = 0010100

        Here there is a carry so by discarding it, the result is +20

(c)  (-29) + (-49) =

Here to increase the number of bits in a representation of an integer in two's complement, add copies of the leftmost bit (the sign bit) to the left until you have the desired number of bits. This is called sign extension.      

                     = 11 100011 + 11 001111

                     = 10 110010 (left most 1 represents sign and remaining represents magnitude)

         Since there is no carry, 2’s complement of 0110010 = 1001101 + 1

                                                                                            = 1001110  

         So the result is 1 1001110 =  - 78.      

0 0

Discussions

Post the discussion to improve the above solution.