1 Replies - 2250 Views - Last Post: 21 April 2010 - 10:09 AM

#1 Guest_jake*


Reputation:

Single precision floating-point format

Posted 21 April 2010 - 07:27 AM

Hello,
So ive been trying to totally understand floating point formats. I realize theres an sign bit, exponent, and fraction part of any floating point value. So I go on wiki to see exactly how the bits are allocated for single precision and it has
http://upload.wikime...mple.svg/590px- for single precision floating-point format.
I did the binary to decimal myself and get something like 0.25e124 . So how is 0.25e124 = 0.15625. Or I guess a better question would be how is the answer 0.15625 ?
Thank you

Is This A Good Question/Topic? 0

Replies To: Single precision floating-point format

#2 mojo666   User is offline

  • D.I.C Addict
  • member icon

Reputation: 409
  • View blog
  • Posts: 885
  • Joined: 27-June 09

Re: Single precision floating-point format

Posted 21 April 2010 - 10:09 AM

the wiki article your picture is from gives the following equation.

(-1)^signbits*2^(exponentbits-127)* 1.significandbits

(-1)^0*2^(124-127)*1.25 = 0.15625
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1