You are on page 1of 12

Hamming code C(7, 4)

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.

• Repeat using the Go-back-N ARQ Protocol with a window


size of 7. Ignore the overhead due to the header and trailer.

• Repeat using the Selective-Repeat ARQ Protocol with a


window size of 4. Ignore the overhead due to the header and
the trailer.
Problems on ALOHA
We have a pure ALOHA network with 100 stations. If
Tfr = 1 micro sec, what is the number of frames/s each
station can send to achieve the maximum efficiency.
• Repeat for slotted ALOHA.
One hundred stations on a pure ALOHA network
share a l-Mbps channel. If frames are 1000 bits long,
find the throughput if each station is sending 10
frames per second.
• Repeat for slotted ALOHA.
Problems on CSMA / CD
• In a CDMAlCD network with a data rate of 10 Mbps, the
minimum frame size is found to be 512 bits for the correct
operation of the collision detection process. What should
be the minimum frame size if we increase the data rate to
100 Mbps? To 1 Gbps? To 10 Gbps?
• In a CDMAlCD network with a data rate of 10 Mbps, the
maximum distance between any station pair is found to be
2500 m for the correct operation of the collision detection
process. What should be the maximum distance if we
increase the data rate to 100 Mbps? To 1 Gbps? To 10
Gbps?

You might also like