IEEE‑754 floating point
The anatomy of a floating‑point number — click a bit to flip it.
How to use
Encode a value into IEEE‑754 bits: pick Decimal or Binary as the input format, type a number (scientific notation works: 1.5e-10 or, in binary, 1.101e+4), and choose a width. Auto shows every format that can represent the value; explicit widths show just that one, or suggest the next width up if it doesn’t fit.
Decode a hex bit pattern: switch to the Decode tab, choose a width, and paste the bits (0x40490FDB, spaces and underscores are ok).
Click a bit in any result card to flip it. The formula and decoded value update live. The hex field in each card is editable, too — a third way to drive the same view.
Why bias? The exponent is stored biased so the bit pattern can be compared as an unsigned integer for ordering. For width k, bias = 2k−1 − 1: 15 for half (5 exp bits), 127 for single (8), 1023 for double (11).
Categories: Normal numbers have an implicit leading 1. When the exponent field is all zeros, you get subnormals (implicit leading 0, smallest non-zero magnitudes) or ±0. When the exponent field is all ones, you get ±∞ (mantissa zero) or NaN (mantissa non-zero).
02 · Representations
A floating-point number is a product: sign × significand × 2exponent. The genius of IEEE‑754 is choosing offsets and implicit bits so that almost every bit pattern corresponds to exactly one real number, and comparing them is as cheap as comparing integers.