Page 16 - DCAP104_EXPOSURE_TO_COMPUTER_DISCPLINES
P. 16

Unit 1: Data Information



            Please note how easy is to add two numbers using signed 2’s Complement. This procedure requires   Notes
            only one control decision in one circuit for adding the two numbers. But it put additional condition
            that the negative numbers should be stored in signed 2’s complement form in the registers. This
            can be achieved by complementing the positive number bit by bit and then incrementing the
            resultant by 1 to get signed 2’s complement.

            Signed 1’s Complement Representation: Another possibility, which also is simple, is use of
            signed 1’s complement. Signed 1’s complement has a rule. Add the two numbers, including the
            sign bit. If carry of the most significant bit or sign bit is one, then increment the result by 1 and
            discard the carry over. Let us repeat all the operations with
            1’s complement.





























            Since, the carry out is 1, so add I to sum and discard the carry
            1   000    111

                              1
            1    001   000
            +55   is                 0   110   111

            –55   is 1’s complement   1   001   000
            Another interesting feature about these representations is the representation of 0. In signed
            magnitude and 1’s complement there are two representations for zero as:

            Signed magnitude      + 0        -0
                                  0 000000   1 000000
            Signed 1’s complement   0 000000   1 111111
            But in signed 2’s complement there is just one zero and there is no positive or negative zero.












                                             LOVELY PROFESSIONAL UNIVERSITY                                     9
   11   12   13   14   15   16   17   18   19   20   21