Professional Documents
Culture Documents
r0=a2+a1+a0 modulo-2
r1 =a3+a2+a1 modulo-2
r2=a1+a0+a3 modulo-2
s0=b2+b1+b0+q0 modulo-2
s1=b3+b2+ b1+q1 modulo-2
s2=b1+b0+b3+q2 modulo-2
Logical decision made by the correction logic analyzer
Show that the Hamming code C(7,4) can
detect two-bit errors but not necessarily
three-bit error by testing the code in the
following cases. The character "V” in the
burst error means no error; the character
"E" means an error.
a. Dataword: 0100 Burst error: VEEVVVV
b. Dataword: 0111 Burst error: EVVVVVE
c. Dataword: 1111 Burst error: EVEVVVE
d. Dataword: 0000 Burst error: EEVEVVV
Solution
• Dataword: 0100 → Codeword: 0100011 → Corrupted: 0010011.
This pattern is not in the table. → Correctly discarded.
• Dataword: 0111 → Codeword: 0111001 → Corrupted: 1111000 .
This pattern is not in the table. → Correctly discarded.
• Dataword: 1111 → Codeword: 1111111 → Corrupted: 0101110.
This pattern is in the table. → Erroneously accepted as 0101.
• Dataword: 0000 → Codeword: 0000000 → Corrupted: 1101000.
This pattern is in the table. → Erroneously accepted as 1101.
Show that the Hamming code C(7,4) can
correct one-bit errors but not more by
testing the code in the following cases.
The character "V" in the burst error
means no error; the character "E" means
an error.
a. Dataword: 0100 Burst error: EVVVVVV
b. Dataword: 0111 Burst error: VEVVVVV
c. Dataword: 1111 Burst error: EVVVVVE
d. Dataword: 0000 Burst error: EEVVVVE
Solution
• Dataword: 0100 → Codeword: 0100011 → Corrupted: 1100011 → s2s1s0
= 110 Change b3 → Corrected codeword: 0100011 → dataword: 0100
The dataword is correctly found.
• Dataword: 0111 → Codeword: 0111001 → Corrupted: 0011001 → s2s1s0
= 011 Change b2 → Corrected codeword: 0111001→ dataword: 0111 The
dataword is correctly found.
• Dataword: 1111 → Codeword: 1111111 → Corrupted: 0111110 → s2s1s0
= 111 Change b1 → Corrected codeword: 0101110→ dataword: 0101 The
dataword is found, but it is incorrect. C(7,4) cannot correct two errors.
• Dataword: 0000 → Codeword: 0000000 → Corrupted: 1100001 → s2s1s0
= 100 Change q2 → Corrected codeword: 1100101→ dataword: 1100 The
dataword is found, but it is incorrect. C(7,4) cannot correct three errors.
Problem on CRC
Given the dataword 10100111 and the divisor
10111,
a. Show the generation of the codeword at the
sender site (using binary division).
b. Show the checking of the codeword at the
receiver site (assume no error).
c. Use polynomial representation to solve a.
and b.
Problem on Internet Checksum
A sender needs to send the four data items Ox3456,
OxABCC, Ox02BC, and OxEEEE.
Answer the following:
a. Find the checksum at the sender site.
b. Find the checksum at the receiver site if there is no
error.
c. Find the checksum at the receiver site if the second
data item is changed to OxABCE.
d. Find the checksum at the receiver site if the second
data item is changed to OxABCE and the third data
item is changed to Ox02BA.
Problems
• A system uses the Stop-and-Wait ARQ Protocol. If each packet
carries 1000 bits of data, how long does it take to send 1
million bits of data if the distance between the sender and
receiver is 5000 Km and the propagation speed is 2 x 10 8 m?
Ignore transmission waiting, and processing delays. We
assume no data or control frame is lost or damaged.