Converting an IEEE 754 single-precision (binary32) number to decimal means decoding its 1 sign bit, 8 exponent bits, and 23 fraction bits into a base-10 value.
For a hands-on conversion, choose bits-or-hex-to-decimal in the IEEE 754 Floating Point Converter, select binary32, enter one exact 32-bit binary or eight-digit hexadecimal pattern, and convert. The result separates the stored value into its sign, exponent, fraction, classification, bits, and hexadecimal interchange form.

The fields inside a single-precision value
IEEE 754 binary32 is a 32-bit interchange format with a predictable field layout. The IEEE 754-2019 standard defines the format and its special-value classes, while the converter makes each field visible in the browser.
| Property | binary32 | binary64 |
|---|---|---|
| Precision | Single | Double |
| Total width | 32 bits | 64 bits |
| Sign field | 1 bit | 1 bit |
| Exponent field | 8 bits | 11 bits |
| Fraction field | 23 bits | 52 bits |
| Exponent bias | 127 | 1023 |
| Hexadecimal width | 8 digits | 16 digits |
The hexadecimal display is ordered most-significant byte first. For binary32 it contains exactly eight digits, and the converter’s copy action omits the optional 0x prefix.
Convert single-precision bits or hex to decimal
Use the bits-or-hex-to-decimal mode whenever the source is an IEEE 754 binary32 bit pattern or hexadecimal interchange value. The input lengths are deliberately strict so the converter cannot guess which format or precision you intended.
- Open the IEEE 754 Floating Point Converter and choose bits-or-hex-to-decimal.
- Select binary32 as the format. Do not select binary64 if the consumer expects a 32-bit single-precision value.
- Enter exactly 32 binary digits or exactly eight hexadecimal digits. The hexadecimal decoder accepts an optional 0x prefix, but the digit count must still be eight.
- Select convert, then inspect the stored decimal number, sign, exponent, fraction, classification, unbiased exponent, binary bits, and hexadecimal output.
- If the value will be placed in a protocol or file, copy the hexadecimal digits and verify the required precision and byte order against the actual consumer.
The conversion runs locally in the browser through the DataView API. For decoding, the selected bits are written into an ArrayBuffer and read as the matching binary32 or binary64 float, so the displayed number comes from the entered pattern rather than from handwritten exponent arithmetic.
Calculate the decimal value from its fields
Let s be the sign bit, E the eight-bit exponent field interpreted as an unsigned integer, and F the 23-bit fraction field interpreted as an unsigned integer.
- If E = 0 and F = 0, the value is zero. The sign bit determines whether it is positive or negative zero.
- If E = 0 and F is nonzero, the value is subnormal: (−1)^s × (F / 2^23) × 2^(−126).
- If E is from 1 through 254, the value is normal: (−1)^s × (1 + F / 2^23) × 2^(E − 127).
- If E = 255, the value is infinity when F = 0 and NaN when F is nonzero.
Worked example: The hexadecimal input 0x3F800000 separates into sign bit 0, exponent field 01111111, and an all-zero 23-bit fraction. It is therefore a normal value, so its decimal value is (−1)^0 × (1 + 0 / 2^23) × 2^(127 − 127) = 1.
For normal binary32 values, the unbiased exponent is simply E − 127. Subnormal values use 1 − 127 as their effective exponent. Infinity and NaN are special classes, so the converter reports their classification rather than assigning them a misleading finite exponent.
Why the decimal can differ from what you entered
Decimal-to-binary conversion is not proof that a decimal value is exact. Many base-ten fractions, including 0.1, have an infinite binary expansion and must be rounded to a representable floating-point value. When the converter encodes a decimal as binary32, the browser first parses it as a double-precision JavaScript Number and then narrows it to binary32, showing the resulting single-precision rounding.
That processing model is consistent with the ECMAScript Number specification. The browser’s double-precision value is an interchange value; it does not retain the original decimal spelling or provide arbitrary-precision decimal arithmetic.
Large integers can also lose unit precision in binary64, and binary32 loses precision much sooner. Use decimal or integer libraries when a domain requires exact money, identifiers, or arbitrary-precision results. A displayed IEEE 754 value should not be treated as an exact accounting record unless the surrounding system defines that guarantee.
Verify precision and byte order before using the output
The converter’s hexadecimal form is a convenient interchange representation, but its byte order does not automatically determine the byte order expected by a file format or network protocol. The converter’s DataView operations use big-endian ordering and display the hexadecimal digits most-significant byte first. A consumer may instead require little-endian bytes, a different field arrangement, or binary64 rather than binary32.
Before copying a value into an interface, compare its total width, bit pattern, and byte order with the language, file format, network protocol, or hardware specification that will consume it. Precision is part of that contract: decoding a 32-bit pattern as binary64 would misinterpret the source format even if both options display a plausible number.
Also decide whether the hexadecimal text itself is what the consumer needs or whether its bytes must be transmitted in a prescribed order. The converter supplies the verified bit pattern and hexadecimal representation; it does not determine a consumer’s storage or transport rules.
Handle signed zero and special values correctly
IEEE 754 represents positive and negative zero with different sign bits. The converter preserves negative zero when it is entered or decoded. The two zeros compare equal in ordinary comparisons, but they can behave differently in operations such as reciprocals, so replacing one with the other can change program behavior.
Subnormal values use an exponent of all zeros with a nonzero fraction. They are valid IEEE 754 values, but their precision is reduced because the fraction field no longer has the normal implicit leading bit. The binary32 effective exponent for this class is −126.
An all-ones exponent with a zero fraction identifies infinity, while an all-ones exponent with a nonzero fraction identifies NaN. When decoding NaN, the entered bits remain visible, but ECMAScript exposes NaN values as NaN without guaranteeing that distinct NaN payloads remain distinguishable through the numeric value alone.
Keep decimal and hexadecimal input modes separate
Strict mode selection prevents a hexadecimal token from being silently interpreted as a decimal number or an expression from being evaluated as JavaScript. Each conversion accepts one value.
| Operation | Mode | Accepted input for binary32 |
|---|---|---|
| Decode binary bits | bits-or-hex-to-decimal | Exactly 32 binary digits |
| Decode hexadecimal | bits-or-hex-to-decimal | Exactly eight hexadecimal digits, with an optional 0x prefix |
| Encode a decimal value | decimal-to-bits | Ordinary base-ten notation with an optional sign, fraction, and decimal exponent; Infinity, -Infinity, and NaN are also accepted |
The decimal-entry field rejects hexadecimal numeric literals, expressions, commas, units, and locale-specific decimal separators. This explicit parsing avoids JavaScript-style coercions such as treating an empty string as zero. For the requested task, select binary32 and supply a correctly sized bit or hexadecimal pattern rather than entering a decimal value in the decoder.
Related reading: How to Convert Decimal to IEEE 754 Floating Point Bits.