Page 52 - Digital Electronics by harish
P. 52

Example 2 :  (54) 10  -  (62) 10

               Binary of 54 (Minuend) = 110110
               Binary of 62 (Subtrahend)  = 111110

               2‟s complement of 111110 = 000010

               Minuend                                     110110
               Add 2‟s complement of Subtrahend          + 000010
                                                           111000      There is no carry.
               Find 2‟s complement                            000111
               (1‟s complement Plus 1)                  +             1
                                                          - 001000  Result is negative.
               Convert to Decimal                            -   8


               Answer :    -  8

               Signed binary numbers

               In decimal systems, we use (+) sign for positive numbers and (–) sign for negative numbers.
               In binary number system, an additional bit is used as the sign bit. A „0‟ is used to represent a
               positive number and a „1‟ is used to represent a negative number.


                                      Sign
                                       bit               Magnitude bits

               For example, an 8-bit signed number 01000100 represents  a positive number, because the
               sign  bit  is  „0‟.  Its  magnitude  is  1000100.  Hence,  the  equivalent  decimal  number  is  +68.
               Similarly, the signed number 11000100 represents a negative number, because the sign bit is
               „1‟. Its magnitude is 1000100. Hence, the equivalent decimal number is -68.

               ie.     01000100 = +68
                       11000100 = -68

               This type of representation for signed numbers is called „sign-and-magnitude representation‟.

               2.2     Half adder

               Half adder adds two binary digits at a time. It has two inputs A and B, and two outputs SUM
               and CARRY.










                                                 Figure : Block diagram


                                                           52
   47   48   49   50   51   52   53   54   55   56   57