Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: IEEE short real floating point format  (Read 8889 times)

0 Members and 1 Guest are viewing this topic.

stevthym

    Topic Starter


    Newbie

    • Experience: Beginner
    • OS: Unknown
    IEEE short real floating point format
    « on: March 26, 2012, 06:48:35 AM »
    Hi!

    I have a decimal number (e.g 6433) and would like to see the process of converting this to IEEE short real floating point format!

    Any help is appreciated ;)

    Allan

    • Moderator

    • Mastermind
    • Thanked: 1260
    • Experience: Guru
    • OS: Windows 10
    Re: IEEE short real floating point format
    « Reply #1 on: March 26, 2012, 06:51:19 AM »
    Sorry, we don't help with homework.

    Ironman



      Hopeful
    • Virtus, Veneratio, Fidelitas
    • Thanked: 15
      • Yes
      • My Personal Site
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 10
    Re: IEEE short real floating point format
    « Reply #2 on: April 07, 2012, 11:25:51 PM »
    The rules for converting a decimal number into floating point are as follows:

    A. Convert the absolute value of the number to binary, perhaps with a fractional part after the binary point. This can be done by converting the integral and fractional parts separately. The integral part is converted with the techniques examined previously. The fractional part can be converted by multiplication. This is basically the inverse of the division method: we repeatedly multiply by 2, and harvest each one bit as it appears left of the decimal.
       
    B. Append × 20 to the end of the binary number (which does not change its value).

    C. Normalize the number. Move the binary point so that it is one bit from the left. Adjust the exponent of two so that the value does not change.

    D. Place the mantissa into the mantissa field of the number. Omit the leading one, and fill with zeros on the right.
       
    E. Add the bias to the exponent of two, and place it in the exponent field. The bias is 2k−1 − 1, where k is the number of bits in the exponent field. For the eight-bit format, k = 3, so the bias is 23−1 − 1 = 3. For IEEE 32-bit, k = 8, so the bias is 28−1 − 1 = 127.

    F. Set the sign bit, 1 for negative, 0 for positive, according to the sign of the original number.

    Read this for more info:
    http://en.wikipedia.org/wiki/Decimal_floating_point

    And you can Google a bunch of convertors that you can use.


    Geek-9pm


      Mastermind
    • Geek After Dark
    • Thanked: 1026
      • Gekk9pm bnlog
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 10
    Re: IEEE short real floating point format
    « Reply #3 on: April 08, 2012, 02:05:01 AM »
    The IEEE 754 is not the ultimate floating point format. But it is called a standard and has been adjusted and modified.
    http://en.wikipedia.org/wiki/IEEE_754-2008
    If using Intel based systems, one should read this:
    http://www.intel.com/standards/floatingpoint.pdf
    Read it! Impress your teacher!
    The link below is only for Math Majors.
    What Every Computer Scientist Should Know About Floating-Point Arithmetic
    The best way to convert a number to floating pewit is with a computer.
    Tell your teacher I said that.