0.1 in binary32 is hex 3DCCCCCD: sign 0, exponent 01111011 (unbiased −4), mantissa 1001100… The exact stored decimal is 0.100000001490116119384765625, not 0.1. This page encodes and decodes float32/float64 with DataView, colours the fields, and lets you click a bit to toggle it.
Need a repeating expansion instead of a rounded float? That is decimal to binary with steps, which prints 0.0(0011). For every integer base at once, keep all bases at once in the binary converter.
0.1 as float64 is 3FB999999999999A. 5.75 is a finite value in both widths (binary 101.11). −2 sets the sign bit. Specials: ±0, ±Infinity, NaN, and the smallest float32 subnormal 1.401298464324817e-45 (hex 00000001).
Layouts: binary32 is 1 sign + 8 exponent + 23 mantissa, bias 127. binary64 is 1 + 11 + 52, bias 1023. Clicking a bit rewrites hex, the exact BigInt decimal, and the rounding error (stored − input).
This is not an integer two’s complement tool. Integers at a width belong on decimal to binary and the two’s complement calculator. Close the tab when you are done — FlashKit does not store the encoding.
How to inspect IEEE 754 bits
- Type a decimal (0.1, 5.75, −2, Infinity, NaN) or paste hex such as 3DCCCCCD.
- Choose 32-bit or 64-bit. Read sign, exponent, mantissa, hex, the exact stored decimal, and the rounding error.
- Click any bit to toggle it. Fields stay colour-coded (sign / exponent / mantissa).
- Compare ±0, ±Infinity, NaN and subnormals. Copy hex or bits when you are done.
Key Features
- Decimal ↔ float32 / float64 bits and hex via DataView
- Click-to-toggle bits; colour-coded sign, exponent, mantissa
- Exact stored decimal (BigInt) and rounding error
- ±0, ±Infinity, NaN, subnormals including 0x00000001
- Local, no upload
Fields, bias, and the 0.1 example
- binary32: 1 + 8 + 23, bias 127. binary64: 1 + 11 + 52, bias 1023. All-zero exponent with a non-zero mantissa is subnormal.
- 0.1 as float32 is 0x3DCCCCCD. Exact stored value 0.100000001490116119384765625. Rounding error is that value minus 0.1.
- 0.1 as float64 is 0x3FB999999999999A. 5.75 is exact (101.11). −2 is a 1 sign bit and exponent for 2^1 with a zero mantissa.
- Toggling the least bit of 0x00000000 yields the smallest positive float32 subnormal, 1.401298464324817e-45.
Specials: zeros, infinities, NaN, subnormals
- +0 is 000…0. −0 has only the sign bit set (0x80000000 in float32). They compare equal in JS but print differently here.
- Exponent all 1s and mantissa 0 is Infinity (sign chooses ±). Any non-zero mantissa with exponent all 1s is NaN.
- Subnormals use exponent 0 and the stored mantissa as an integer over 2^(bias+mantissaBits−1). They fill the gap near zero.
- Hex 7FC00000 is a common quiet NaN in float32. This page labels it NaN rather than inventing a payload decoder.
Common mistakes
- Calling 0x3DCCCCCD “exactly 0.1”. It is the rounded float32; the repeating rational is 0.0(0011) on decimal-to-binary.
- Mixing two’s complement integers with IEEE fields. −2 as int8 is 11111110; −2 as float32 is a sign bit plus an exponent, not invert+1.
- Editing hex with the wrong width (8 hex digits are float32, 16 are float64).
- Assuming NaN has one encoding. Any exponent-all-1s with a non-zero mantissa is NaN.
- Using JS Number.toString() as the exact stored value. This page prints a BigInt decimal of the actual significand.
Integer and float ranges
- int8…int64 and uint widths are two’s complement / unsigned maxima. float32/float64 rows use this encoder’s finite min/max.
| Type | Min | Max |
|---|---|---|
| int8 | -128 | 127 |
| uint8 | 0 | 255 |
| int16 | -32768 | 32767 |
| uint16 | 0 | 65535 |
| int32 | -2147483648 | 2147483647 |
| uint32 | 0 | 4294967295 |
| int64 | -9223372036854775808 | 9223372036854775807 |
| uint64 | 0 | 18446744073709551615 |
| float32 | -340282346638528859811704183484516925440 | 340282346638528859811704183484516925440 |
| float64 | -1.7976931348623157e+308 | 1.7976931348623157e+308 |
Frequently Asked Questions
What is 0.1 in IEEE 754 binary32?
Hex 3DCCCCCD. The exact stored decimal is 0.100000001490116119384765625, not 0.1.
What is 0.1 in binary64?
Hex 3FB999999999999A. JavaScript Number uses this format, which is why 0.1 + 0.2 is 0.30000000000000004.
What is the smallest positive float32?
The subnormal 1.401298464324817e-45, encoded as 0x00000001. Clicking bit 31 of +0 yields it.
How are Infinity and NaN encoded?
Exponent all 1s. Mantissa 0 is ±Infinity (sign bit). Any other mantissa is NaN.
Is −0 different from +0?
Yes in the bits: float32 −0 is 0x80000000. This page prints −0. IEEE comparison still treats them as equal.
Does clicking a bit upload anything?
No. Toggle, encode and decode all run with DataView in this tab.
Why is 5.75 exact when 0.1 is not?
5.75 = 23/4, a dyadic rational that fits the mantissa. 1/10 does not, so the encoder rounds.