ExactBench · Engineering calculators

Q Format Converter

Fixed point · Qm.n

Value

Raw integer · Q0.15

24576
0x6000 · represents 0.75

Bit field

1 LSB = 2⁻15
Q0.15 · 16 BITSSIGN0FRACTION (15)110000000000000binary point
Raw integer24576
Raw (hex)0x60 00
Exact represented value0.75
Quantisation error0 — exact
Resolution (1 LSB)0.000030517578125
Representable range-1 … 0.999969482421875
FormatQ0.15 · 16-bit · 0 integer, 15 fractional
How this works. Fixed point stores a fraction as a plain integer with an implied binary point: in Qm.n the raw integer is the real value multiplied by 2n, so the hardware only ever does integer arithmetic. Resolution is constant at 2−n across the whole range — unlike floating point, which trades precision for range as the magnitude grows. That constant step is exactly why control loops and DSP filters prefer it. For signed formats the sign bit takes one bit from the integer part, which is why Q15 holds values in −1 … 0.999969482421875 and cannot represent +1. Conversion rounds half away from zero, and values outside the range clip rather than wrap.
This value is outside the representable range for the chosen format and has been clipped — in a real system this is saturation, and it silently distorts the signal.

Common fixed-point formats

Q15 (Q1.15, 16-bit)±1 · 3.05 × 10⁻⁵DSP audio and filter coefficients; cannot represent +1
Q31 (Q1.31, 32-bit)±1 · 4.66 × 10⁻¹⁰CMSIS-DSP high precision
Q7 (Q1.7, 8-bit)±1 · 7.81 × 10⁻³Neural network weights, tight memory
Q8.8 (16-bit)±128 · 3.91 × 10⁻³General embedded arithmetic with range to spare
Q16.16 (32-bit)±32768 · 1.53 × 10⁻⁵Classic fixed-point graphics and motion
Q24.8 (32-bit)±8.39M · 3.91 × 10⁻³Large counts with a fractional part

Written as range · resolution. The signed formats are asymmetric: Q15 covers −1 to +0.999969482421875, so +1.0 is not representable — a coefficient of exactly 1 has to be handled as a special case or the format widened.