4.4.1.3 Fixed-Point Numbers

A fixed-point number is represented in Q-15 format. This means that 15 bits are used to represent the fractional portion of the number. The most significant bit is the sign bit, followed by an implied binary point, and 15 bits of magnitude, for example:

bit no.15.141312...10
value±20.2-12-22-3...2-142-15

The smallest number in this format is -1, represented by:

0x8000 (1.000 0000 0000 0000)

the largest number is nearly 1 (.99996948), represented by:

0x7FFF (0.111 1111 1111 1111)

A fixed-point number is written in the same format as a floating-point number, but its value is constrained to be in the range [-1.0, 1.0).