floating point question..

Discussion in 'Homework Help' started by transgalactic, May 20, 2008.

  1. transgalactic

    Thread Starter Active Member

    Apr 29, 2008
    74
    0
    a number of 36 bits with the representation of a floating point has 8 bits plus the sign bit for the exponent and 26 bits plus a sign bit for "mantissa"(what is that??)
    the mantissa is normalized(whats normalized mantissa??)
    the exponent and the mantissa numbers are represented by a sign bit
    and the absolute value.

    what is the biggest and the smallest number we can represent in this way excluding zero??

    i am new to this consept
    where can i read about this stuff
    ????
     
  2. Papabravo

    Expert

    Feb 24, 2006
    10,157
    1,796
    Any number can be expressed as a fraction(aka mantissa) f, where 0 <= f < 1 , times the base of the number system raised to some power(exponent).

    The answer to your psersistent questions about where you can read about things is wikipedia, google, and books, not necessarily in that order.

    Top Google Hit for "mantissa"
    http://en.wikipedia.org/wiki/Mantissa

    follow the links
     
  3. transgalactic

    Thread Starter Active Member

    Apr 29, 2008
    74
    0
    i read the article
    i understand that there is the integer part the mantissa part which is the fracture or all the letters before the point.

    plus there is the exponent (10^x)which can move the point in our number.

    i have trouble to image this number and how looks this exponent
    how looks this whole thing
    so i could see what its maximal range
    ???
     
  4. Papabravo

    Expert

    Feb 24, 2006
    10,157
    1,796
    It seems that you read it, but I don't think you understood much.

    Reread what I wrote. There is a mantissa which is a number greater than or eqaul to zero and strictly less than one. There is no integer part.

    The same rules apply for base-10 and base-2

    Example: 3-bit mantissa and three bit exponent
    Code ( (Unknown Language)):
    1.  
    2. Manitssa    Value        Detail
    3. (Binary)    (Decimal)  
    4. 000         .000
    5. 001         .125         0*(.5) + 0*(.25) + 1*(.125)
    6. 010         .250         0*(.5) + 1*(.25) + 0*(.125)
    7. 011         .375         0*(.5) + 1*(.25) + 1*(.125)
    8. 100         .500         1*(.5) + 0*(.25) + 0*(.125)
    9. 101         .625         1*(.5) + 0*(.25) + 1*(.125)
    10. 110         .750         1*(.5) + 1*(.25) + 0*(.125)
    11. 111         .875         1*(.5) + 1*(.25) + 1*(.125)
    12.  
    13. NOTE:
    14. 2^-1 = 0.500
    15. 2^-2 = 0.250
    16. 2^-3 = 0.125
    17.  
    Now that we have the mantissa laid out you can see how the maximum value is determined. The exponent will be treated like a signed twos complement number so a three bit quantity will be in the range -4 to +3.

    Some examples

    111 exp 011 is (0.875) * (2 ^ 3) = 7 largest positive number
    001 exp 100 is (0.125) * (2 ^ -4) = .0078125 smallest non-zero number
    000 exp 000 is (0.000) * (2 ^ 0) = 0

    Does that clarify things
     
  5. Mark44

    Well-Known Member

    Nov 26, 2007
    626
    1
    Floating point numbers as used in computers generally adhere to the IEEE 754 standard. As you mentioned in your first post, the three parts are the sign (1 bit), the mantissa (more frequently called the significand these days), and the exponent.

    A good way to think about this is by looking at a number in scientific notation, such as Avogadro's Number:
    6.023 x 10^{-23}

    Here the sign is positive, the significand is 6.023, and the exponent is -23.

    Floating point numbers as they are used in computers are similar but not identical. Two significant differences are 1) they are stored using binary digits, not decimal digits, and 2) the radix is 2, not 10.

    So a number such as 2.375 (base 10) would look like this as a binary number, including its part to the right of the "binary" point:
    10.011 (base 2).

    The part to the left of the "binary" point is 2 (base 10).
    The part to the right of the "binary" point is 0*.5 + 1*.25 + 1*.125 (base 10).

    Our binary number, 10.011 (base 2) is not normalized, since there is more than one digit to the left of the binary point. We can normalize it by moving the binary point and adjusting the exponent, like so:
    1.0011 * 2^{1}.

    So, in the context of your question, the sign is positive (usually represented with a 0 bit, with a 1 bit used for negative numbers), the normalized significand (aka mantissa) is 1.0011, and the exponent is 1.

    You need to figure out how large a number and and how small a number you can represent with 8 bits for the exponent, 1 bit for the sign, and 27 bits for the significand.

    Mark
     
Loading...