Q format
The name of a fixed-point number's scale, such as Q15 (value × 32 768) or Q8.8 (value × 256).
Qm.n notation gives a fixed-point format's m integer bits and n fraction bits (sign bit counted separately here); Q15 stores values from -1 to 1 - 2^-15 in an int16_t, Q8.8 values from -128 to about 127.996 in steps of 1/256.
Examples
In Q8.8 a greenhouse reading of 18.75 °C is stored as 4800, and each step is 1/256 °C.
Q15 stores 0.25 as 8192 but can't hold 1.0 exactly: its largest value, 32 767, is just under.
See also