Floating point to binary calculator
Computers store real numbers in a fixed pattern of bits, and the IEEE 754 single-precision format is the most widely used 32-bit layout. This calculator converts any decimal number you enter into its exact IEEE 754 single-precision binary representation. It splits the 32 bits into the three fields the standard defines: one sign bit that is 0 for positive and 1 for negative, an 8-bit biased exponent that encodes the power of two with a bias of 127, and a 23-bit mantissa (also called the fraction or significand) that holds the bits after the implied leading 1. It also shows the full 32-bit string and its compact 8-digit hexadecimal form, which is how the value actually appears in memory or a hex dump. Seeing the fields laid out makes concrete why some innocuous decimals cannot be stored exactly, why rounding creeps in, and how the exponent shifts the binary point. Enter your own value, integer or fractional, positive or negative, to inspect how it is encoded or to check a computer-architecture exercise. The results update as you type. Every field here is produced deterministically by the IEEE 754 single-precision encoding, explained in full below with a worked example that reconciles exactly to the calculator.
IEEE 754 single precision packs a number as 1 sign bit, 8 exponent bits (bias 127), 23 mantissa bits. The value 12.375 encodes to bits 0 10000010 10001100000000000000000, which is hexadecimal 41460000.
IEEE 754 single-precision layout
value = (-1)^sign x 1.mantissa x 2^(exponent - 127)
bit 31 = sign (0 positive, 1 negative)
bits 30..23 = exponent, stored with a bias of 127
bits 22..0 = mantissa (fraction after the implied leading 1)
total = 32 bits = 8 hexadecimal digits
The number is normalized to 1 point something times a power of two. The sign goes in the top bit, the power of two plus 127 goes in the exponent field, and the digits after the binary point go in the mantissa. The leading 1 is implied and not stored.
Worked example
Encode the decimal value 12.375 in IEEE 754 single precision.
- 12.375 in binary is 1100.011
- Normalize: 1.100011 x 2^3, so the exponent is 3
- Biased exponent = 3 + 127 = 130 = 10000010
- Mantissa = 100011 padded to 23 bits = 10001100000000000000000, sign bit = 0
- Bits 0 10000010 10001100000000000000000 = hex 41460000
The value 12.375 encodes to 41460000 in hexadecimal. These are the calculator's default inputs, so the result above matches the widget exactly.
Floating point to binary calculator: frequently asked questions
What is IEEE 754 single precision?
IEEE 754 single precision is a 32-bit standard for storing floating-point numbers, used by the float type in most programming languages. It divides the 32 bits into a sign bit, an 8-bit biased exponent and a 23-bit mantissa, giving about 7 decimal digits of precision.
What is the exponent bias?
The exponent field stores the true power of two plus a fixed bias of 127, so it can represent both positive and negative exponents without a separate sign. A stored value of 130 means an actual exponent of 130 minus 127, which is 3. The bias keeps the field as an unsigned number.
Why is the leading 1 not stored?
Normalized binary numbers always start with a 1 before the binary point, so storing that bit would waste space. IEEE 754 leaves it implied, which gives the mantissa one extra bit of precision for free. The calculator accounts for this implied 1 when it reports the fields.
Why can some decimals not be stored exactly?
Many decimal fractions, such as 0.1, have no finite binary representation, so they are rounded to the nearest value the 23-bit mantissa can hold. That rounding is the source of small floating-point errors. A value like 12.375, which is a sum of exact powers of two, stores perfectly.
How does this relate to double precision?
Double precision uses 64 bits with an 11-bit exponent (bias 1023) and a 52-bit mantissa, giving far more range and precision. This calculator covers the 32-bit single-precision format; our IEEE 754 double calculator handles the 64-bit version. The encoding here is deterministic and reconciles exactly to the worked example.
Official sources
- Numerical computing standards and reference data: US National Institute of Standards and Technology (NIST). As at 25 June 2026.
Reviewed by the CalculatorHub team, edited by James Graham, 25 June 2026. See our methodology. This is general information, not financial, tax, legal or investment advice.