This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
resources:tools-software:sigmastudio:usingsigmastudio:numericformats [29 Nov 2018 21:04] – [8.24 (Decimal) Format] KenM | resources:tools-software:sigmastudio:usingsigmastudio:numericformats [27 Jan 2021 22:35] (current) – use wp> interwiki links Robin Getz | ||
---|---|---|---|
Line 9: | Line 9: | ||
To represent non-integer values, all of the SigmaDSP architectures use fixed-point numeric formats (rather than the more common floating point) to maximize the precision needed for audio signal processing. Fixed-point numbers are simply formatted as **A.B**, where A is the number of bits to the left of the decimal point (the integer part) and B is the number of bits to the right of the decimal point (the fractional part). | To represent non-integer values, all of the SigmaDSP architectures use fixed-point numeric formats (rather than the more common floating point) to maximize the precision needed for audio signal processing. Fixed-point numbers are simply formatted as **A.B**, where A is the number of bits to the left of the decimal point (the integer part) and B is the number of bits to the right of the decimal point (the fractional part). | ||
- | The combined value A.B is in 2's complement format enabling both positive and negative values. For more information on two's complement representations, | + | The combined value A.B is in 2's complement format enabling both positive and negative values. For more information on two's complement representations, |
Line 62: | Line 62: | ||
Audio is commonly formatted as a decimal value in the range of (1 - 1 LSB) to -1. A full scale 24-bit input signal has a positive peak value in 24 bit, 2's complement representation of: | Audio is commonly formatted as a decimal value in the range of (1 - 1 LSB) to -1. A full scale 24-bit input signal has a positive peak value in 24 bit, 2's complement representation of: | ||
- | 0111 1111 1111 1111 1111 1111 = 1 - 1 LSB = largest positive value | + | 0111 1111 1111 1111 1111 1111 = 1 - 1 LSB = largest positive |
Adding an LSB to represent a true value of one requires a larger word. If we add 8 bits of headroom (MSB zero padding) and move the sign bit left, the 8.24 representation becomes: | Adding an LSB to represent a true value of one requires a larger word. If we add 8 bits of headroom (MSB zero padding) and move the sign bit left, the 8.24 representation becomes: | ||
Line 68: | Line 68: | ||
0000 0000 1111 1111 1111 1111 1111 1111 = 1 - 1 LSB | 0000 0000 1111 1111 1111 1111 1111 1111 = 1 - 1 LSB | ||
- | Notes that moving a leading ' | + | Note that moving a leading ' |
0000 0000 0000 0000 0000 0000 0000 0000 = 0.0 | 0000 0000 0000 0000 0000 0000 0000 0000 = 0.0 |