Analog and Digital Conversion/Fixed Wordlength Effects

From Wikibooks, the open-content textbooks collection

< Analog and Digital Conversion
Jump to: navigation, search

Contents

[edit] Practical Wordlengths

Computer systems, as we know, are commonly 16, 32, or 64 bits. This means that these computers can easily handle data of these lengths. However, smaller hardware and embedded computers can have wordlengths of 4 or 8 bits! If we have a converter that has a resolution of 12 bits, and we attach it to an 8 bit input bus for an embedded controller, we have a severe problem! a full 4 bits of our signal must be truncated.

Also, converters often come prepackaged, with a set number of resolution bits that aren't negotiable. This means that if you need a converter with 13 bits of resolution for your circuit, you will have to make due with a converter that is only 12 bits, or one that is 16!

Some common ADC converter resolution lengths are listed below:

  • 4
  • 8
  • 12
  • 16
  • 24
  • 32

[edit] Round-Off

Let's say that we do have a 12 bit converter, and we need to output the data onto an 8-bit bus. We can either ignore the bottom 4 bits, or the top 4 bits, or we can ignore some combination of both. If we ignore bits from the bottom of the word, we are essentially rounding the signal down, and the signal will lack detail.

[edit] Truncation

The act of simply ignoring bits from either end of the word is called Truncation, but when we truncate the bits from the LSB side of the word, we call that action "Rounding". When we truncate the bits off the top of the machine word, we are potentially losing large amounts of data. For instance, if we have the bit pattern 101001, and we truncate the two MSB bits, we are left with the bit pattern 1001. Let's convert this to decimal:

  • 101001 (binary) = 41 (decimal)
  • 1001 (binary = 9 (decimal)

There is a big difference betweenthe value 9 and 41. As we can see, all our highest values will appear to be low values, and the output will be nonsensical. Another option is called saturation. Saturation is like rounding, except that we round up. We truncate the top bits off, and if they aren't zero, then we round the rest of the number up to the maximum value. For instance, if we have the same bit pattern as above (101001), and we truncate off the two MSB bits and then we saturate, we will get the value 1111. Now, we can define this value to be an overflow condition, and we won't be compounding needless errors.

[edit] Spectral Effects

Personal tools
Create a book
  • Add wiki page
  • Collections help