Page 14 - DCAP104_EXPOSURE_TO_COMPUTER_DISCPLINES
P. 14

Unit 1: Data Information



                              The 2’s complement can also be obtained by not complementing        Notes
                              the least significant zeros till the first 1 is encountered. This 1 is also
                              not complemented. After this 1 rest all the bits are complemented
                              on the left.
                              Therefore, 2’s compleme~it of the following number (using this
                              method) should be (you can check it by finding 2’s complement as
                              we have done in the example).

















                          Find the 2’s complement of 11101 and 10000000011.

            1.2.4 Fixed Point Representation
            The fixed-point numbers it 1 binary uses a sign bit. A positive number have a sign bit 0, while
            the negative number has a sign bit 1. In the fixed-point numbers we assume that the position of
            the binary point is at the end. It implies that all the represented numbers should be integers. A
            negative number can be represented in one of the following ways:

            Signed magnitude representation,
            Signed 1’s complement representation, or Signed 2’s complement representation.
            (Assumption size of register = 7 bit, 8th bit is used for error checking and correction or other
            Purposes).


































                                             LOVELY PROFESSIONAL UNIVERSITY                                     7
   9   10   11   12   13   14   15   16   17   18   19