IEEE 754 Floating-Point Converter

Decimal to IEEE 754 single and double precision bits.

Ad placeholder (leaderboard)
Enjoying the tools? Go Pro for £4.99 (one-time) and remove all ads — forever, on this device. Remove ads — £4.99

IEEE 754 floating-point converter

Convert any decimal number into its IEEE 754 representation in 32-bit single or 64-bit double precision. IEEE 754 is the floating-point standard used by virtually every programming language and CPU, so this tool is handy for developers debugging precision bugs, students learning binary representation, and anyone curious why 0.1 + 0.2 is not exactly 0.3.

How it works

A floating-point number is split into three fields. The converter writes your value into a typed array (setFloat32 for single, setFloat64 for double) in big-endian order, then reads the raw bytes back as an unsigned integer to derive the hexadecimal and binary patterns. It then splits the binary into:

  • Sign bit — 1 bit; 0 is positive, 1 is negative.
  • Exponent — the stored (biased) exponent; subtract the bias (127 single / 1023 double) to get the real power of two.
  • Mantissa — the fraction bits (23 single / 52 double).
FieldSingle (32-bit)Double (64-bit)
Sign1 bit1 bit
Exponent8 bits (bias 127)11 bits (bias 1023)
Mantissa23 bits52 bits

Example

Entering 3.14159 in single precision yields hex 0x40490FD0, binary 01000000 01001001 00001111 11010000: sign 0 (positive), exponent 10000000 (unbiased 1), and a 23-bit mantissa. Because many decimals cannot be stored exactly in binary, the bits represent the nearest representable value.

Everything is computed locally in your browser — nothing is uploaded.

Ad placeholder (rectangle)