This module regroups the options used to configure the signed fixed point Q format.
This module regroups the options used to configure the signed fixed point Q format.
Here is a description of the Q-Format:
Q-format: Qa.b
Here is the formula linking a Q-format number (x) to a decimal number (d):
The resolution of a Q-formatted number is calculated as follow:
The range of a Q-formatted number x defines the maximum and minimum numbers which frame x. Here is a formula to calculate those values:
Example:
For the Q1.15 type:
For the Q1.31 type:
Here is a link where you can find more information http://en.wikipedia.org/wiki/Fixed-point_arithmetic on fixed-point formats.
Q Format definition for the 16-bit type | |
| |
#define | DSP16_QA 1 |
number of integer bits More... | |
#define | DSP16_QB 15 |
number of fractional bits More... | |
Q Format definition for the 32-bit type | |
| |
#define | DSP32_QA 1 |
number of integer bits More... | |
#define | DSP32_QB 31 |
number of fractional bits More... | |
#define DSP16_QA 1 |
number of integer bits
#define DSP16_QB 15 |
number of fractional bits
#define DSP32_QA 1 |
number of integer bits
#define DSP32_QB 31 |
number of fractional bits