but anyways, just an example to show you how to convert floating point number to base 10
Q:Write IEEE 754 floating point number for
01011100001010001111011
first things first, this thing suppose to have more 0's at the end, but i'm too lazy, so whatever.
here we go.
first, chop your string of 1 and 0s into sections
0 1011 1000 0101 0001 1110 11
0 indicates that it is possitive :D
now look at 1011 1000, covert that into decimal
that's 128+0+32+16+8+0+0+0 = 184
and remember that the exponent is biased 127
so 184 - 127 = 57
now onto the next section 0101 0001 1110 11
ok, so in binary, this strings represent 1.0101 0001 1110 11
so then you'll get
then multiply the whole thing by your biased exponent which is 2^57
then bust our your calculator for this fancy thing, or in my case, i just turned it in as is xD
No comments:
Post a Comment