floating point - How can I convert a 16-bit floatingpoint to a binary number? -


i have 2 following mini-floats:

1 11010 0100010111

0 10111 0010001100

i want covert these 2k number hand. question is, can give me "hint" how can double check results? maybe quick conversion program can find online?

depending on language want use, can like:

int sign = val >> 15; int exp = (val >> 10) & 0x1f; int significand = val & 0x3ff; float value = (1 - 2*sign) * (significand / 1024.0) * (1 << exp); // display value. 

Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -