Fixed-Point Blockset    

Quantization

The quantization Q of a real-world value V is represented by a weighted sum of bits. Within the context of the general [Slope Bias] encoding scheme, the value of an unsigned fixed-point quantity is given by

while the value of a signed fixed-point quantity is given by

where

bi are called bit multipliers and 2i are called the weights.

Example: Fixed-Point Format

The formats for 8-bit signed and unsigned fixed-point values are given below.

Note that you cannot discern whether these numbers are signed or unsigned data types merely by inspection since this information is not explicitly encoded within the word.

The binary number 0011.0101 yields the same value for the unsigned and two's complement representation since the MSB = 0. Setting B = 0 and using the appropriate weights, bit multipliers, and scaling, the value is

Conversely, the binary number 1011.0101 yields different values for the unsigned and two's complement representation since the MSB = 1.

Setting B = 0 and using the appropriate weights, bit multipliers, and scaling, the unsigned value is

while the two's complement value is


  Scaling Range and Precision