Wiki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
resources:tools-software:sigmastudio:usingsigmastudio:numericformats [29 Nov 2018 21:04] – [8.24 (Decimal) Format] KenMresources: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, please read the comprehensive article on Wikipedia here: [[http://en.wikipedia.org/wiki/Two%27s_complement|Two's complement]]+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, please read the comprehensive article on Wikipedia here: [[wp>Two%27s_complement|Two's complement]]
  
  
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 24-bit value
  
 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 '1' to the left or right will double or halve the value, respectively.+Note that moving a leading '1' to the left or right will double or halve the value, respectively.
  
   0000 0000 0000 0000 0000 0000 0000 0000 =  0.0   0000 0000 0000 0000 0000 0000 0000 0000 =  0.0
resources/tools-software/sigmastudio/usingsigmastudio/numericformats.txt · Last modified: 27 Jan 2021 22:35 by Robin Getz