IS2012 Homework 6
Due February 27
1. Generate run lengths from the following string and convert them to
- A block code with 2 bits/block (k=2)
- A block code with 3 bits/block (k=3)
- A block code with 4 bits/block (k=4)
1 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1
2. If delta modulation is used to encode the following set of
differences using a code that can represent changes of -3, -2, -1, 0,
+1, +2, +3, or +4. Show the reconstructed signal. For purposes of
computing the first difference, assume the system's "initial state" is
32.
36, 32, 20, 25, 12, 26, 15, 29, 31, 55, 50, 45, 40
3. How many Gray codes are there, that begin with 000, and end with a
code one bit away from 000 (001, 010, or 100)? List all these codes.
How many 4 bit codes are there that begin with 0000 and end one with a
codeword one bit away (you need not list these).
4. Suppose the bits are not independent, but tend to fall in runs,
where the probility of a run of length k is given by p(k) according to
the following distribution: p(0)=0.1 p(1)=0.1 p(2)=0.1 p(3)=0.2
p(4)=0.2, p(5)= 0.3. How would you encode this set of run lengths?
Devise an efficient scheme for encodeing this scheme, and compute the
average length. Use it to encode the following stream:
0 0 0 0 1 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 1 0 0 0 1 0 0 0 1 1