Page 49 - Digital Electronics by harish
P. 49

2.1.3  Representation of negative numbers

               In decimal systems, we use (+) sign for positive numbers and (–) sign for negative numbers.
               But in binary numbers, complement method is used for representing negative numbers. Two
               types of complement methods are available.

               1)      1‟s complement method
               2)      2‟s complement method

               Either 1‟s complement or 2‟s complement method is adopted in a particular digital system.

               1’s complement

               1‟s complement is used to represent negative numbers. Each bit is subtracted from 1 (borrow
               is ignored) to get the 1‟s complement. A shortcut method is also used. Each bit in the given
               number is complemented (0 to 1, 1 to 0) to get its 1‟s complement.

               Examples :

               1)      Find the 1‟s complement of 101011.

                       010100               ----   0 to 1, 1 to 0

                       Answer :10100

               2)      Find the 1‟s complement of 11110.

                       00001         ----   0 to 1, 1 to 0

                       Answer : 1


               2’s complement

               2‟s complement is used to represent negative numbers. When we add 1 to 1‟s complement,
               we will get the 2‟s complement of the given number.

               Examples :

               1)      Find the 2‟s complement of 101011.

                        1‟s complement              010100  ----    0 to 1, 1 to 0
                        Add 1                     + 000001
                        2‟s complement              010101

                       Answer : (010101) 2

               2)      Find the 2‟s complement of 11110.

                        1‟s complement               00001  ----    0 to 1, 1 to 0
                        Add 1                      + 00001
                        2‟s complement               00010

                       Answer :(00010) 2





                                                           49
   44   45   46   47   48   49   50   51   52   53   54