/tools/datatype-converter
Datatype Converter
Edit decimal, hexadecimal or binary. The other representations update automatically.
Ready · float32
Bits & details
Edit bits
Most significant firstToggle a bit to edit the value.
Exact decimal & rounding
- Exact stored value
- Stored − input
Byte order
- Big-endian bytes
- Little-endian bytes
Your decimal input is kept as entered. The stored value shows the nearest representable number.
/usage
Convert a value or inspect its bits
- Choose IEEE-754 float or Integer, then select the width.
- Edit a decimal field, Hexadecimal or Binary. Integer mode has both Signed decimal and Unsigned decimal. The other representations update immediately; your source is kept as entered.
- Copy a representation, or open Bits & details for editable bits, exact decimals and byte order. Copy preserves the spelling shown in each field.
Bookmark your current setup: the URL records mode, width and whether Bits & details is open. Entered values are not included. Start with 8-bit or 16-bit integers. Changing mode preserves each mode’s input while the page remains open.
/floats
IEEE-754 single and double precision
A 32-bit float uses one sign bit, eight exponent bits and 23 fraction bits. A 64-bit float uses one sign bit, 11 exponent bits and 52 fraction bits. Inspect the exact stored decimal and the signed conversion error to see why values such as 0.1 are rounded.
Positive and negative zero, subnormal values, infinities and NaN are identified explicitly. Raw NaN payload bits are preserved. Hexadecimal input is the encoded bit pattern, so 3F800000 means the 32-bit float 1.
Reference: Oracle’s IEEE arithmetic guide.
/integers
Signed and unsigned integers without precision loss
Select 8, 16, 32 or 64 bits. Signed decimal uses two’s complement; Unsigned decimal starts at zero. Enter a value in either field to see both interpretations of the same bits. Hex and binary are bit patterns; short patterns are padded with leading zeros.
At 8 bits, entering 255 in Unsigned decimal gives -1 signed, FF hex and 11111111 binary. The signed range is -128 through 127, and the unsigned range is 0 through 255. At 64 bits, unsigned values reach 18446744073709551615 without precision loss. Values outside the selected range are reported without changing width, wrapping or truncation.