IEEE 754 Floating Point Converter
Break a decimal number into 32-bit and 64-bit IEEE 754, and decode hex/binary bit patterns back into numbers.
Category: Converters
When to use?
Use it to learn how floating point is stored, or to decode float bit patterns in embedded/low-level debugging. It breaks numbers into sign, exponent and mantissa, and shows why values like 0.1 aren’t stored exactly.
How to use
- On the "Decimal → IEEE 754" tab, enter a number to see the 32- and 64-bit breakdown.
- Or on the "Hex/Binary → Decimal" tab, enter a bit pattern and precision.
- Inspect and copy the sign/exponent/mantissa bits, hex, and stored value.
Input Explanation
Enter a decimal number (e.g. 0.1, -3.14, 1e10, Infinity) or an IEEE 754 bit pattern (8/16 hex digits or 32/64 binary digits).
Calculation Basis
Bits are extracted with ArrayBuffer/DataView setFloat32/setFloat64 and split into sign, exponent and mantissa. Decoding reads the pattern back as a float to show the stored value.
Usage Examples
- Learning floating point - See the sign/exponent/mantissa structure and rounding error directly.
- Low-level debugging - Decode float bit patterns (hex) from memory dumps into real numbers.
Examples
- 0.1 → 32-bit 0x3DCCCCCD, stored value 0.10000000149011612
- 0x3FB999999999999A (64-bit) → 0.1
Cautions
- 32-bit single precision has limited accuracy, so the stored value may differ from your input (rounding).
- Bytes are interpreted in big-endian order.
FAQ
Why isn’t 0.1 stored exactly?
0.1 has no finite binary fraction, so it is rounded to the nearest representable value.
Single vs double precision?
Single (32-bit) uses 8 exponent + 23 mantissa bits; double (64-bit) uses 11 + 52 bits for more precision.
Can I decode from hex?
Yes — enter a hex or binary bit pattern with the precision to decode the original number.
Related Tools
- Number Base Converter - Convert between binary, octal, decimal, and hexadecimal.
- Unit Converter - Freely convert units of length, weight, temperature, area, and volume.
- Hash Generator - Convert text into SHA-1, SHA-256, and SHA-512 hashes.
- URL Encode / Decode - Encode text into URL-safe form (%XX) or decode an encoded URL back to text.
- Base64 Converter - Encode text to Base64 or decode a Base64 string back to text.
- HTML Escape / Unescape - Convert HTML special characters to entities, and restore entity strings back to characters.