How it works
- Decimal input is converted by value:
-1as int8 is0xFF(two’s complement),0.1as fp32 is the nearest float,0x3DCCCCCD. - Prefixed input (
0x…,0b…,0o…) is taken as the raw bit pattern, so you can paste a register or memory dump and see what it means as any type. - Click a bit to flip it; the input switches to the raw hex pattern.
- Bytes in memory shows the order a little-endian MCU (Cortex-M, ESP32, RP2040, x86) or a big-endian wire format would store them.
Float formats
| Format | Sign | Exponent | Mantissa | Bias | Typical use |
|---|---|---|---|---|---|
| fp16 (half) | 1 | 5 | 10 | 15 | GPU inference, Cortex-M55 Helium |
| bfloat16 | 1 | 8 | 7 | 127 | ML training: fp32 range, less precision |
| fp32 | 1 | 8 | 23 | 127 | default float |
| fp64 | 1 | 11 | 52 | 1023 | double, JavaScript numbers |
A normal value is (−1)^sign × 1.mantissa × 2^(exponent − bias). Exponent 0 encodes zero and subnormals; all-ones encodes infinity and NaN. Conversions round to nearest, ties to even, like the hardware does.