Example 82

There are many ways to translate data into binary equivalents. Example 8.1 showed one way to convert text into 4-PAM and then into binary. Another way exploits the Matlab function text2bin. m and its inverse bin2text. m, which use the 7-bit version of the ASCII code (rather than the 8-bit version). This representation is more efficient, since each pair of text letters can be represented by 14 bits (or seven 4-PAM symbols) rather than 16 bits (or eight 4-PAM symbols). On the other hand, the 7 bit version can only encode half as many characters as the 8 bit version. Again, it is important to be able to correctly identify the start of each letter when decoding.

8.1. The Matlab code in naivecode.m, which is on the CD, implements the translation from binary to 4-PAM (and back again) suggested in (8.2). Examine the resiliency of this translation to noise by plotting the number of errors as a function of the noise variance v. What is the largest variance for which no errors occur? At what variance are the errors near 50%?

8.2. A Grey code has the property that the binary representation for each symbol differs from its neighbors by exactly one bit. A Grey code for the translation of binary into 4-PAM is

Mimic the code in naivecode.m to implement this alternative and plot the number of errors as a function of the noise variance v. Compare your answer with Problem 8.1. Which code is better?

Even though the original message is translated into the desired alphabet, it is not yet ready for transmission: it must be turned into an analog waveform. In the

0 0

Post a comment

  • Receive news updates via email from this site