# Trying to send binary 16bit ints over the web

The mantissa also known as significand or fraction is stored in bits The conversion between a floating point number i. The sign is stored in bit

If you need to write such a routine yourself, you should have a look at the sourecode of a standard C library e. The sign is stored in bit The converter used to show denormalized exponents as 2 and a denormalized mantissa range [0: Please check the actual represented value second text line and compare the difference to the expected decimal value while toggling the last bits.

To make it easier to spot eventual rounding errors, the selected float number is displayed after conversion to double precision. The sign is stored in bit First, consider what "correct" means in this context - unless the conversion has no rounding error, there are two reasonable results, one slightly smaller the entered value and one slightly bigger. As this format is using base-2, there can be surprising differences in what numbers can be represented easily in decimal and which numbers can be represented in IEEE

This is the format in which almost all CPUs represent non-integer numbers. The conversion between a string containing the textual form of a floating point number e. The hex representation is just the integer value of the bitstring printed as hex. If the exponent reaches binarythe leading 1 is no longer used to enable gradual underflow. Please note there are two kinds of zero:

This source code for this converter doesn't contain any low level conversion routines. Double-precision bit floats would work, but this too is some work to support alongside single precision floats. Now the original number is shown either as the number that was entered, or as a possibly rounded decimal string as well as the actual full precision decimal number that the float value is representing. However this confused people and was therefore changed Sign Exponent Mantissa Value:

An invisible leading bit i. However this confused people and was therefore changed Please check the actual represented value second text line and compare the difference to the expected decimal value while toggling the last bits.

The conversion routines are pretty accurate see above. To make it easier to spot eventual rounding errors, the selected float number is displayed after conversion to double precision. As an example, try "0.

If you need to write such a routine yourself, you should have a look at the sourecode of a standard C library e. The exponent value is set to 2 and the "invisible" leading bit for the mantissa is no longer used. This webpage is a tool to understand IEEE floating point numbers. The sign is stored in bit The mantissa also known as significand or fraction is stored in bits

As the primary purpose of this site is to support people learning about these formats, supporting other formats is not really a priority. The conversion between a string containing the textual form of a floating point number e. This page allows you to convert between the decimal representation of numbers like "1. The exponent value is set to 2 and the "invisible" leading bit for the mantissa is no longer used.