Correct Answer - Option 3 : 1010101
Concept:
Hamming (7, 4) code: It is a linear error-correcting code that encodes four bits of data into seven bits, by adding three parity bits.
Example: It is used in the Bell-Telephone laboratory, error-prone punch caret reader to detect the error and correct them.
Hamming code:
Bits #
|
1
|
2
|
3
|
4
|
5
|
6
|
7
|
Transmitted bits
|
P1
|
P2
|
d1
|
P3
|
d2
|
d3
|
d4
|
P1 = d1 ⊕ d2 ⊕ d4
P2 = d1 ⊕ d4 ⊕ d3
P3 = d2 ⊕ d4 ⊕ d3
Solution:
Given data 1101 i.e.
d1 = 1, d2 = 1, d3 = 0, d4 = 1
We can write:
P1 = d1 ⊕ d2 ⊕ d4 = 1 ⊕ 1 ⊕ 1 = 1
P2 = d1 ⊕ d4 ⊕ d3 = 1 ⊕ 1 ⊕ 0 = 0
P3 = d2 ⊕ d4 ⊕ d3 = 1 ⊕ 1 ⊕ 0 = 0
Then transmitted final code is
P1
|
P2
|
d1
|
P3
|
d2
|
d3
|
d4
|
1
|
0
|
1
|
0
|
1
|
0
|
1
|
i.e. 1010101
Option 3 correct
Extra points:
Hamming Distance: The number of bits in which two codewords vary is called hamming distance.
\(\frac{{\begin{array}{*{20}{c}} {1011001}\\ {1101101} \end{array}}}{{3\;bits\;vary}}\)
i.e. 3 Hamming distance.
For Hamming code (n, k):
\(rate\left( R \right) = \frac{K}{n}\)
Where K = 2r – r – 1 (message length)
n = 2
r – 1 (Block-length) (r ≫ 2)