Computer Interfacing and Protocols

Slides:



Advertisements
Similar presentations
Noise, Information Theory, and Entropy (cont.) CS414 – Spring 2007 By Karrie Karahalios, Roger Cheng, Brian Bailey.
Advertisements

10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Lecture 12 Layer 2 – Data Link Layer Protocols
Introduction to Information Technologies
NETWORKING CONCEPTS. ERROR DETECTION Error occures when a bit is altered between transmission& reception ie. Binary 1 is transmitted but received is binary.
CSCI 4550/8556 Computer Networks Comer, Chapter 7: Packets, Frames, And Error Detection.
Practical Session 11 Codes. Hamming Distance General case: The distance between two code words is the amount of 1-bit changes required to reach from one.
Error detection and correction
Data Communications Chapter 7 Error Detection. Despite the best prevention techniques, errors may still happen. To detect an error, something extra has.
7/2/2015Errors1 Transmission errors are a way of life. In the digital world an error means that a bit value is flipped. An error can be isolated to a single.
Error Detection and Correction
Chapter 10 Error Detection and Correction
Rutvi Shah1 ERROR CORRECTION & ERROR DETECTION Rutvi Shah2 Data can be corrupted during transmission. For reliable communication, errors must be detected.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 PART III: DATA LINK LAYER ERROR DETECTION AND CORRECTION 7.1 Chapter 10.
Shashank Srivastava Motilal Nehru National Institute Of Technology, Allahabad Error Detection and Correction : Data Link Layer.
Data link layer: services
1 Data Link Layer Lecture 20 Imran Ahmed University of Management & Technology.
Part 2: Packet Transmission Packets, frames Local area networks (LANs) Wide area networks (LANs) Hardware addresses Bridges and switches Routing and protocols.
10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Cyclic Redundancy Check CRC Chapter CYCLIC CODES Cyclic codes are special linear block codes with one extra property. In a cyclic code, if a codeword.
Unit 5 Lecture 2 Error Control Error Detection & Error Correction.
EEC4113 Data Communication & Multimedia System Chapter 5: Error Control by Muhazam Mustapha, October 2011.
PREPARED BY: ENGR. JO-ANN C. VIÑAS
Overview All data can be corrupted, for reliable communications we must be able to detect and correct errors implemented at the data link and transport.
Lecture 5 Checksum. 10.2CHECKSUM Checksum is an error-detecting technique that can be applied to a message of any length. In the Internet, the checksum.
Computer Communication & Networks Lecture 9 Datalink Layer: Error Detection Waleed Ejaz
Error Detection.
10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
10.1 Chapter 10 Error Detection and Correction Data can be corrupted during transmission. Some applications require that errors be detected and.
1 Kyung Hee University Position of the data-link layer.
Error Detection. Data can be corrupted during transmission. Some applications require that errors be detected and corrected. An error-detecting code can.
Error Detection and Correction
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 PART III: DATA LINK LAYER ERROR DETECTION AND CORRECTION 7.1 Chapter 10.
10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Part III: Data Link Layer Error Detection and Correction
Chi-Cheng Lin, Winona State University CS412 Introduction to Computer Networking & Telecommunication Error Correction/Detection.
ERROR DETECTION AND CORRECTION Chapter 8 Data Communications & Networking ERROR DETECTION AND CORRECTION Chapter 8 First Semester 2007/2008.
Error Detection and Correction
Simple Parity Check The simplest form of error detection is the parity check used with ASCII codes, originally on asynchronous modem links Each 7 bit ASCII.
Introduction to Information Technologies
ERROR DETECTION AND CORRECTION
Data Link Layer.
Error Detection and Correction
Subject Name: COMPUTER NETWORKS-1
Cyclic Redundancy Check (CRC)
Communication Networks: Technology & Protocols
DATA COMMUNICATION AND NETWORKINGS
CIS 321 Data Communications & Networking
Part III Datalink Layer 10.
Chapter 10 Error Detection And Correction
EEC4113 Data Communication & Multimedia System Chapter 5: Error Control by Muhazam Mustapha, August 2010.
Packetizing Error Detection
Packetizing Error Detection
Basic concepts Networks must be able to transfer data from one device to another with complete accuracy. Data can be corrupted during transmission. For.
Chapter 7 Error Detection and Correction
Chapter 9 Error Detection and Correction
Introduction to Information Technologies
Transmission Errors Error Detection and Correction
Error Detection Neil Tang 9/26/2008
Packetizing Error Detection
COMPUTER NETWORKS CS610 Lecture-5 Hammad Khalid Khan.
Chapter 9 Error Detection and Correction
Error Detection and Correction
Error Detection and Correction
Transmission Errors Error Detection and Correction
Data Link Layer. Position of the data-link layer.
Chapter 10 Error Detection and Correction
Presentation transcript:

Computer Interfacing and Protocols Error Detection Data transmission can contain errors Single-bit Burst errors of length n (n: distance between the first and last errors in data block) How to detect errors If only data is transmitted, errors cannot be detected  Send more information with data that satisfies a special relationship  Add redundancy Winter 2005 ECE ECE 766 Computer Interfacing and Protocols

Error Detection Methods Vertical Redundancy Check (VRC) Append a single bit at the end of data block such that the number of ones is even  Even Parity (odd parity is similar) 0110011  01100110 0110001  01100011 VRC is also known as Parity Check Performance: Detects all odd-number errors in a data block Winter 2005 ECE ECE 766 Computer Interfacing and Protocols

Error Detection Methods Longitudinal Redundancy Check (LRC) Organize data into a table and create a parity for each column 11100111 11011101 00111001 10101001 11100111 11011101 00111001 10101001 10101010 11100111 11011101 00111001 10101001 10101010 Original Data LRC Winter 2005 ECE ECE 766 Computer Interfacing and Protocols

Error Detection Methods Performance: Detects all burst errors up to length n (number of columns) Misses burst errors of length n+1 if there are n-1 uninverted bits between the first and last bit If the block is badly garbled, the probability of acceptance is Checksum Used by upper layer protocols Similar to LRC, uses one’s complement arithmetic Winter 2005 ECE ECE 766 Computer Interfacing and Protocols

Cyclic Redundancy Check Powerful error detection scheme Rather than addition, binary division is used  Finite Algebra Theory (Galois Fields) Can be easily implemented with small amount of hardware Shift registers XOR (for addition and subtraction) Winter 2005 ECE ECE 766 Computer Interfacing and Protocols

Cyclic Redundancy Check Let us assume k message bits and n bits of redundancy Associate bits with coefficients of a polynomial 1 0 1 1 0 1 1 1x6+0x5+1x4+1x3+0x2+1x+1 = x6+x4+x3+x+1 xxxxxxxxxx yyyy k bits n bits Block of length k+n Winter 2005 ECE ECE 766 Computer Interfacing and Protocols

Cyclic Redundancy Check Let M(x) be the message polynomial Let P(x) be the generator polynomial P(x) is fixed for a given CRC scheme P(x) is known both by sender and receiver Create a block polynomial F(x) based on M(x) and P(x) such that F(x) is divisible by P(x) Winter 2005 ECE ECE 766 Computer Interfacing and Protocols

Cyclic Redundancy Check Sending Multiply M(x) by xn Divide xnM(x) by P(x) Ignore the quotient and keep the reminder C(x) Form and send F(x) = xnM(x)+C(x) Receiving Receive F’(x) Divide F’(x) by P(x) Accept if remainder is 0, reject otherwise Winter 2005 ECE ECE 766 Computer Interfacing and Protocols

Proof of CRC Generation Remainder 0 Remainder 0 Note: Binary modular addition is equivalent to binary modular subtraction  C(x)+C(x)=0 Winter 2005 ECE ECE 766 Computer Interfacing and Protocols

Computer Interfacing and Protocols Example Send M(x) = 110011  x5+x4+x+1 (6 bits) P(x) = 11001  x4+x3+1 (5 bits, n = 4)  4 bits of redundancy Form xnM(x)  110011 0000  x9+x8+x5+x4 Divide xnM(x) by P(x) to find C(x) Receive = C(x) No remainder  Accept Send the block 110011 1001 Winter 2005 ECE ECE 766 Computer Interfacing and Protocols

Computer Interfacing and Protocols Properties of CRC Sent F(x), but received F’(x) = F(x)+E(x) When will E(x)/P(x) have no remainder, i.e., when does CRC fail to catch an error? Single Bit Error  E(x) = xi If P(x) has two or more terms, P(x) will not divide E(x) 2 Isolated Single Bit Errors (double errors) E(x) = xi+xj, i>j E(x) = xj(xi-j+1) Provided that P(x) is not divisible by x, a sufficient condition to detect all double errors is that P(x) does not divide (xt+1) for any t up to i-j (i.e., block length) Winter 2005 ECE ECE 766 Computer Interfacing and Protocols

Computer Interfacing and Protocols Properties of CRC Odd Number of Bit Errors If x+1 is a factor of P(x), all odd number of bit errors are detected Proof: Assume an odd number of errors has x+1 as a factor. Then E(x) = (x+1)T(x). Evaluate E(x) for x = 1  E(x) = E(1) = 1 since there are odd number of terms (x+1) = (1+1) = 0 (x+1)T(x) = (1+1)T(1) = 0  E(x) ≠ (x+1)T(x) Winter 2005 ECE ECE 766 Computer Interfacing and Protocols

Computer Interfacing and Protocols Properties of CRC Short Burst Errors (Length t ≤ n, number of redundant bits) E(x) = xj(xt-1+…+1)  Length t, starting at bit position j If P(x) has an x0 term and t ≤ n, P(x) will not divide E(x) All errors up to length n are detected Long Burst Errors (Length t = n+1) Undetectable only if burst error is the same as P(x) P(x) = xn+ … + 1 n-1 bits between xn and x0 E(x) = 1 + … + 1 must match Probability of not detecting the error is 2-(n-1) Longer Burst Errors (Length t > n+1) Probability of not detecting the error is 2-n Winter 2005 ECE ECE 766 Computer Interfacing and Protocols

Computer Interfacing and Protocols Properties of CRC Example: CRC-12 = x12+x11+x3+x2+x+1 CRC-16 = x16+x15+x2+1 CRC-CCITT = x16+x12+x5+1 CRC-16 and CRC-CCITT catch all Single and double errors Odd number of bit errors Bursts of length 16 or less 99.997% of 17-bit error bursts 99.998% of 18-bit and longer error bursts Winter 2005 ECE ECE 766 Computer Interfacing and Protocols

Hardware Implementation Usual practice: After taking k data bits, n 0s are padded to the stream, then divided by the generator Aim: Introduce the last n bits of 0s without requiring n extra shifts Eliminate the need to wait for all data to enter the system to start generating CRC Approach: Guess the next n bits of message as all 0s Correct the guess as the actual bits arrive Winter 2005 ECE ECE 766 Computer Interfacing and Protocols

Hardware Implementation Message = 1011011 k = 7 P(x) = 1101 = x3+x2+x0 n = 3 Circuit: 1 Message Conventional Method: Winter 2005 ECE ECE 766 Computer Interfacing and Protocols

Hardware Implementation Transmit: Data 1 SQ 1 Bit 2 1 Bit 1 1 Bit 0 1 MSB + Data Input x3 Serial Quotient (SQ) 2 1 x0 x2 Message LSB CRC Send MSB first k shifts later, CRC is in register Shift out (without any XOR) in n shifts Winter 2005 ECE ECE 766 Computer Interfacing and Protocols

Hardware Implementation Receive: Data 1 SQ 1 Bit 2 1 Bit 1 1 Bit 0 1 Message LSB MSB + Data Input x3 Serial Quotient (SQ) 2 1 x0 x2 CRC LSB MSB n+k shifts later, remainder is 0 Data accepted Winter 2005 ECE ECE 766 Computer Interfacing and Protocols

Hardware Implementation Data Out A A Data In + 2 x2 1 x0 Data OK Control Line A: 1: Make/Test CRC 0: Shift Out CRC For Transmitting: Assert A true while feeding k bits of message Assert A false for n clock cycles to output CRC For Receiving: Assert A true while feeding k+n bits of message and CRC Ignore Data Out, check Data OK for correctness Winter 2005 ECE ECE 766 Computer Interfacing and Protocols