Download presentation
Presentation is loading. Please wait.
1
Protocols and the TCP/IP Suite
Lecture 4 Error Detection Forward Error Correction (Hamming Code) Chapter 2
2
Protocols and the TCP/IP Suite
1- Error Detection 1.1 Parity check 1.2 Two dimensional parity check 1.3 Checksum 1.4 Cyclic redundancy check Chapter 2
3
Protocols and the TCP/IP Suite
1.1 Parity check - Appends a parity bit to the end of the data. Even Odd - It can detect all single bit errors. It can also detect burst errors, if the number of bits in error is odd. Chapter 2
4
1.2 Two Dimensional Parity Check
Protocols and the TCP/IP Suite 1.2 Two Dimensional Parity Check Parity check bits are calculated for each row, which is equivalent to a simple parity check bit. Parity check bits are also calculated for all columns. Both are sent along with the data. Chapter 2
5
1.2 Two Dimensional Parity Check
Protocols and the TCP/IP Suite 1.2 Two Dimensional Parity Check Chapter 2
6
Protocols and the TCP/IP Suite
1.3 Checksum - At the sender’s end, the data is divided into segments. The segments are added using ones complement arithmetic to get the sum. The sum is complemented to get the checksum which is sent along with the data segments. At the receiver, the received segments are added using ones complement arithmetic to get the sum. If the complement of the sum is zero, the received data is accepted. Chapter 2
7
Protocols and the TCP/IP Suite
1.3 Checksum Ex: Find the checksum at the sender and receiver for the following sequence: __________ 1 _______________ ______________ _____________ ________________ Sum: Checksum: __________ 1 _______________ ______________ _____________ sum: Checksum: Chapter 2
8
1.4 Cyclic Redundancy Check
Protocols and the TCP/IP Suite 1.4 Cyclic Redundancy Check The sender generates a bit sequence known as a frame check sequence (FCS), so that the resulting frame consisting of the original data followed by this FCS. - FCS is the remainder which obtained from dividing the original data M(X) by generator polynomial G(x). - The receiver divides the incoming frame by G(X), if there is no remainder the received data has no errors. Chapter 2
9
1.4 Cyclic Redundancy Check
Protocols and the TCP/IP Suite 1.4 Cyclic Redundancy Check ________ _________ __________ 0 0 0 1011 1001 ________ _________ __________ FCS 1011 1001 Chapter 2
10
1.4 Cyclic Redundancy Check
Protocols and the TCP/IP Suite 1.4 Cyclic Redundancy Check C3 C1 C0 + 000 001 010 101 100 011 1 Initial FCS Chapter 2
11
2- Forward Error Correction
Protocols and the TCP/IP Suite 2- Forward Error Correction Forward Error correction (FEC) which based on the receiver only is used mainly when retransmissions cannot be requested, e.g., simplex links. Backward error correction which based on retransmission of the frame when an error is detected is commonly used. Hamming Code: It can correct any single bit error Bits in power of 2 positions (1,2,4,8,) are check bits, the rest are m data bits Check bit forces the parity of some collection of bit “1” to be even To see which check bits the data bit in position k contributes to, rewrite k as a sum of powers of 2. 11=1+2+8, 29= Chapter 2
12
Protocols and the TCP/IP Suite
Hamming Code EX: If a 12-bit hamming code arrives at receiver, is there any bit error? If so, which bit is wrong? = =4+1 6=4+2 7= = = = =8+4 Check bit Checked Data bits Bits Sequence 1 (Yes) 2 (No) 4 (No) 8 (Yes) Hence bit 6 = 2+4 is wrong, so correct hamming code should be Chapter 2
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.