5.7 Data formats
A Q15 value in a 16-bit field is organiz ed as shown in Figure 5.7.
Most significant
Bit position 15 14 13 12
-(20) 2-1 2-2 2-3
Least significant
10
2-14 2-15
binary point
sign bit
Figure 5.7 Q15 data format (16-bits)
The minimum and maximum representable values are as shown in Table 5.9.
Minimum
Maximum
Hex Value
8000
7FFF
Decimal Value
-1
+0.9999
Table 5.9 Q15 limiting values
5.7.5 Q15 in an oversized field
When a Q15 value is stored in an oversized field, e .g.a 32-bit register, the significant
bits are placed at the least significant end of the field, and the v alue is sign-extended
to the width of the whole field.
The value still has the same range (-1 ≤ n < 1) and the same number of significant
bits.
A Q15 value in a 32-bit field is organiz ed as shown in Figure 5.8.
Most significant
Bit position 31 30 29
-(20) -(20) -(20)
16 15 14
-(20) -(20) 2-1
Least significant
210
2-13 2-14 2-15
sign extended
sign bit
binary point
Basic Q15 value
Figure 5.8 Q15 data format (32-bits)
The minimum and maximum representable values are as shown in Table 5.10.
66/205
®