Fixed-Point (Q-format) Converter
Convert float ↔ Qm.n fixed-point, with range, resolution, hex and binary raw value.
Result
Format
–
Float value
–
Raw (signed dec)
–
Raw (hex)
–
Raw (binary)
–
Resolution
–
Range
–
Quantization error
–
How it works
A Qm.n fixed-point number stores a real value as an integer scaled by
2n, using n fractional bits and m integer bits
(plus a sign bit if signed):
raw = round(float × 2n) float = raw ÷ 2n
The representable range and resolution follow directly from the bit widths. Values outside the range are clamped to the nearest representable value, and the quantization error shows how much precision was lost converting to fixed-point.