Meaning
Fixed point numeric representation that uses sixteen bits to store a fractional value between negative one and nearly positive one. In the q15.16 format, the most significant bit acts as the sign bit while the remaining fifteen bits represent the fractional component. This system is a standard in digital signal processing for audio and sensor data where precision is required without the overhead of floating point units.
Arithmetic Precision
Calculation accuracy in low power microcontrollers is maintained by performing operations in integer space while interpreting them as fractions. The q15.16 format allows for efficient multiplication because the result of a sixteen bit operation fits within a thirty two bit register before being shifted back. This avoids the rounding errors that occur when repeatedly converting between types.
Engineers select this format when the hardware lacks a hardware floating point unit but must still process complex filtering algorithms.
Memory Usage
Storage requirements are halved compared to thirty two bit representations. Utilizing the q15.16 format enables the storage of large lookup tables in the internal flash of a small chip. This efficiency is vital for edge devices that must run heavy mathematical models on limited hardware.
Signal Processing
Filter coefficients are typically scaled to fit this range during the design phase. Using q15.16 format ensures that the dynamic range of an input signal is preserved throughout the processing chain. This prevents overflow during addition or subtraction.