Page 18 - DCAP104_EXPOSURE_TO_COMPUTER_DISCPLINES
P. 18

Unit 1: Data Information



                                                                                                  Notes
                           Arithmetic addition          Arithmetic Subtraction
                          Arithmetic addition: Complexity   Arithmetic Subtraction:  The sub-
                          of arithmetic addition is dependent   traction  can be  easily done  using
                          on the representation        the 2’s complement by taking the
                                                       2’s complenient of the subtractend
                                                       (inclusive of sign bit) and then adding
                                                       the two numbers.

            1.2.5 Decimal Fixed Point Representation

            A decimal digit is represented as a combination  of four bits; thus, a four digit decimal number
            will require 16 bits for decimal digits representation and additional 1 bit for sign. Normally to
            keep the convention of one decimal digit to 4 bits, the sign sometimes is also assigned a 4-bit code.
            This code can be the bit combination which has not been used to represent decimal digit e.g., 11
            00 may represent plus and 1 101 can represent minus.
            Although this scheme wastes considerable amount of storage space yet it do not require conversion
            of a decimal number to binary. Thus, can be used at places where the amount of computer
            arithmetic is less than the amount of input output of data e.g. calculators or business data
            processing. The arithmetic in decimal can also be performed as in binary except that instead of
            signed one’s complement, signed nine’s complement is used and instead of signed 2’s complement
            signed 10’s complement is used.
            1.2.6 Floating Point Representation

            Floating-point number representation consists of two parts. The first part of the number
            is a signed fixed point number. which is termed as mantissa. and the second part specifies
            the decimal or binary point position and is termed as an Exponent. The mantissa can be an
            integer or a fraction. Please note that the position of decimal or binary point is assumed
            and it is not a physical point, therefore, wherever we are representing a point it is only
            the assumed position.

                              A decimal +12.34 in a typical floating point notation is:

                  Solution

                               sign                      sign


                               0    1234                 0    02
                               Mantissa (fraction)       Exponent





                               sign                      sign


                               0    1234                 0    02
                               Mantissa (integer)        Exponent









                                             LOVELY PROFESSIONAL UNIVERSITY                                    11
   13   14   15   16   17   18   19   20   21   22   23