tutorial6_sol
tutorial6_sol
Tutorial 6 (Solutions)
1.
(b)
0
s0 0.25 0.25 0.25 0.25 0.5 0.5
0 1
s1 0.25 0.25 0.25 0.25 0.25 0.5
0 1
s2 0.125 0.125 0.25 0.25 0.25
0 1
s3 0.125 0.125 0.125 0.25
0 1
s4 0.125 0.125 0.125
0 1
s5 0.0625 0.125
1
s6 0.0625
Huffman codewords
1
ETM2046 Analog & Digital Communications
s0 10
s1 11
s2 001
s3 010
s4 011
s5 0000
s6 0001
(c)
s0 s1 s2 s3 s4 s5 s6
1
0
s2 s3 s4 s5 s6
s0 s1
0 1
0 1
s2 s3 s4 s5 s6
s0 s1
0 1
0 1
s2 s3
s5 s6
s4
0 1
s5 s6
Shannon-Fano codewords
s0 00
2
ETM2046 Analog & Digital Communications
s1 01
s2 100
s3 101
s4 110
s5 1110
s6 1111
ABCD
0 1
BCD
A
0 1
B CD
0 1
D
C
Shannon-Fano codewords
A 0
B 10
C 110
D 111
3
ETM2046 Analog & Digital Communications
0
A 0.5 0.5 0.5
0 1
B 0.25 0.25 0.5
0 1
C 0.125 0.25
1
D 0.125
Huffman codewords
A 1
B 01
C 000
D 001
5. 1 0 1 1 0 1 0 0 1 1 0 0 = 1 0 0 0 0 1
Hamming distance = weight of 1 0 0 0 0 1 = 2
= [(0 0 0 0) (0 0 0 0) (0 0 1 0) (0 0 0 1)
(0 0 1 0) (0 0 0 1) (0 0 1 1)]
= 0 0 1 1 1 1 0 encoded codeword
4
ETM2046 Analog & Digital Communications
Syndrome is the same as the 3rd column (from left) of check matrix.
Bit 3 (from left) is in error. The corrected codeword is 1010010.