Sign in to follow this  
coderchris

Converting to/from 10/11 bit floating point number

Recommended Posts

Hello, Im curious if anyone could explain how to go to/from a 10/11 bit float to/from a standard 32 bit float Both 10 and 11 have no sign bit, and 5 bits of exponent. 10 has then 5 bits of mantissa and 11 has 6 bits of mantissa. Obviously there is no sign bit, so I just need to drop the sign off of the 32 bit float. I believe I also understand how to convert the exponent. bias for a 8 bits of exponent = 127 bias for 5 bits of exponent = 15 So the formula to convert from exp32 to exp10/11 is then exp10/11 = (exp32 - 127) + 15 Heres where im not quite sure what to do. if exp10/11 <= 0, I know something special happens to convert it to denormalized or something. If exp10/11 >= 31 then its too large to store, so i guess we set the new float to infinity? And what do we do to the mantissa even when 0 < exp10/11 < 31? Thanks, Chris

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this