IEEE 754 float converter
Inspect the sign, exponent and fraction of a single-precision float. Your inputs stay on your device.
Set up your task
Starting local processing
Ready. Processing stays in this browser.
2 Your result
Your result updates in this browser. Check your input if the result looks unexpected.
How to use IEEE 754 float converter
Inspect the sign, exponent and fraction of a single-precision float. The pre-filled problem gives you a worked starting point. Compare the response with your own working before trying the self-check below.
- Check the example inputs: Decimal value.
- Change the inputs for your problem. Results update as you type, so finish entering the values before copying an answer.
- Use the working to check an intermediate value or assumption. Then change the example as suggested in the self-check and compare the result.
Supported inputs and limits
Enter a finite decimal value or scientific notation. The browser parses the text as binary64 before rounding to binary32.
How it works
Binary32 divides the bit pattern into one sign bit, eight exponent bits and twenty-three stored fraction bits. For a normal value, the exponent is biased by 127 and the significand begins with an implicit one. Subnormal values use an implicit zero instead and fill the gap down to zero.
A fixed number of fraction bits means many decimal values are rounded. Exponent 255 is reserved for infinities and NaNs. In this converter, a finite decimal can overflow when stored in binary32. The stored-value line is a decimal rendering of the actual value represented by the bytes.
Example
Run the pre-filled example. Its first result is “Hex: C1540000”.
- Decimal value
- -13.25
Hex: C1540000 Sign | exponent | fraction: 1 | 10000010 | 10101000000000000000000 Stored value: -13.25 Class: Normal Exponent field: 130 (unbiased 3)
Questions about IEEE 754 float converter
Does the sign bit distinguish positive and negative zero?
Yes. Binary32 uses 00000000 in hexadecimal for positive zero and 80000000 for negative zero.
Why does 0.1 change after conversion?
One tenth repeats in base two. Single precision keeps a finite approximation. The converter displays that rounded value.
Try a decimal value of 1.
Expect hex 3F800000, sign zero, biased exponent 127 and a zero stored fraction, giving one times two to the power zero.
Related tools
Last updated