a) With 4 data bits we need 3 parity bits.
p1 = d1 + d2 + d4
p2 = d1 + d4 + d3
p3 = d2 + d4 + d3
+ is XOR operation here.
The transmitted string will be d1d2d3d4p1p2p3.
So the three parity bits will be
p1 = 1 + 1 + 1 = 1
p2 = 1 + 1 + 1 = 1
p3 = 1 + 1 + 1 = 1
So transmitted data will be all 1's, i.e., 1111111.
b) i)It is said that p1 gets flipped so the received data will be 1111011.
Now here again we check parities:-
p1 = 1 + 1 + 1 = 1 (but p1
is 0 here)
p2 = 1 + 1 + 1 = 1
p3 = 1 + 1 + 1 = 1
Error detected successfully.
ii) If it would have been an error in one of the data bits then it would have been reflected in two or more parity checks but there is an error in only one calculation, which means the parity bit p1 was flipped. So to correct it we can simply flip the parity bit again. It really doesn't matter because we have correctly received all the data bits.
Hope this helps. If you have any queries or suggestions regarding the answers please leave them in the comments section so I can update and improve the answer. Thank you
Get Answers For Free
Most questions answered within 1 hours.