Error detection and correction

Slides:



Advertisements
Similar presentations
10. Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Advertisements

Noise, Information Theory, and Entropy (cont.) CS414 – Spring 2007 By Karrie Karahalios, Roger Cheng, Brian Bailey.
Cyclic Code.
Computer Interfacing and Protocols
Error Control Code.
10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
NETWORKING CONCEPTS. ERROR DETECTION Error occures when a bit is altered between transmission& reception ie. Binary 1 is transmitted but received is binary.
Chapter 10 Error Detection and Correction
Transmission Errors1 Error Detection and Correction.
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.
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
Error Detection and Reliable Transmission EECS 122: Lecture 24 Department of Electrical Engineering and Computer Sciences University of California Berkeley.
Error Detection and Correction Rizwan Rehman Centre for Computer Studies Dibrugarh University.
Hamming Code Rachel Ah Chuen. Basic concepts Networks must be able to transfer data from one device to another with complete accuracy. Data can be corrupted.
Chapter 10 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.
Copyright © NDSL, Chang Gung University. Permission required for reproduction or display. Chapter 10 Error Detection and Correction 長庚大學資訊工程學系 陳仁暉 副教授.
British Computer Society
CIT 307 Online Data Communications Error Detection Module 11 Kevin Siminski, Instructor.
Error Coding Transmission process may introduce errors into a message.  Single bit errors versus burst errors Detection:  Requires a convention that.
10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Data Link Layer: Error Detection and Correction
MIMO continued and Error Correction Code. 2 by 2 MIMO Now consider we have two transmitting antennas and two receiving antennas. A simple scheme called.
Chapter 10. Error Detection and Correction
Data Communications, Kwangwoon University10-1 Part 3 Data Link Layer Chapter 10 Error Detection and Correction Chapter 11 Data Link Control Chapter 12.
Data and Computer Communications by William Stallings Eighth Edition Digital Data Communications Techniques Digital Data Communications Techniques Click.
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.
Practical Session 10 Error Detecting and Correcting Codes.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Data Link Layer PART III.
Error Detection and Correction
COMPUTER NETWORKS Ms. Mrinmoyee Mukherjee Assistant Professor St. Francis Institute of Technology, Mount Poinsur, S.V.P Road, Borivli (west), Mumbai
Error Detection and Correction
Computer Communication & Networks Lecture 9 Datalink Layer: Error Detection Waleed Ejaz
Lecture Focus: Data Communications and Networking  Data Link Layer  Error Control Lecture 19 CSCS 311.
CHAPTER 3: DATA LINK CONTROL Flow control, Error detection – two dimensional parity checks, Internet checksum, CRC, Error control, Transmission efficiency.
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.
1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.
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.
Chapter 10 Error Detection And Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Data Link Layer. Data Link Layer Topics to Cover Error Detection and Correction Data Link Control and Protocols Multiple Access Local Area Networks Wireless.
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.
Data Communications and Networking
Hamming Distance & Hamming Code
Transmission Errors Error Detection and Correction.
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
Data Link Layer 1. 2 Single-bit error 3 Multiple-bit error 4.
Practical Session 10 Computer Architecture and Assembly Language.
Computer Architecture and Assembly Language
Error Detection and Correction
Subject Name: COMPUTER NETWORKS-1
Communication Networks: Technology & Protocols
DATA COMMUNICATION AND NETWORKINGS
Part III Datalink Layer 10.
Chapter 10 Error Detection And Correction
Chapter 10 Error Detection And Correction
Welcome to the presentation. Linear Block Codes Almost all block codes used today belong to a subset called linear block codes. The exclusive OR of two.
Error Detection and Correction
Error Detection and Correction
Error Detection and Correction
Computer Architecture and Assembly Language
Types of Errors Data transmission suffers unpredictable changes because of interference The interference can change the shape of the signal Single-bit.
Chapter 10 Error Detection and Correction
Presentation transcript:

Error detection and correction How can the receiver determine if there was an error in the message the sender sent? How can these errors be fixed?

Types of errors Single-bit: Only one bit is changed. Very rare. Burst: Many bits are changed over a duration of time. More common

Block coding In block coding, we convert chunks of k bits, called datawords, into somewhat longer chunks of n words, called codewords. Just like when we did line coding at the physical layer to give ourselves synchronization, the fact that there are more codewords than datawords means that some are valid and some are not.

Hamming distance Researchers who try to develop better and more efficient error detection schemes use the Hamming distance to measure how different two words of equal bit length are. We use XOR to calculate the difference. When designing a particular coding scheme, what we use is the minimum Hamming distance between all possible pairs of codewords (dmin).

dmin and error detection What qualifies as a good dmin? In order to detect up to s errors in a transmission, dmin must equal s + 1. If it is only s, then the received codeword could be mistaken for a valid one. If it is s + 1, it never can be. Since error correction requires more information, it requires a bigger dmin. 2s, to be precise.

Linear block codes Linear block codes are specially designed codes where the XOR of any two codewords yields another valid codeword. To find dmin for any block code, find the valid codeword with the least number of 1s (that has at least 1). dmin is the number of 1s in that codeword.

Simple parity The simplest linear block code is the parity check. n = k + 1. The extra bit simply encodes whether the number of 1’s in the data word is odd (parity=0) or even (parity=1). The idea is that the total number of 1’s in the codeword is even. What is dmin?

Two-dimensional parity Extends the idea of parity to allow for detection of larger errors. Datawords are organized into a table. Parity bits are calculated for each row and column in the table. If the table is k x r bits, the codeword is (k+1) x (r+1) bits.

Hamming codes Designed so that dmin = 3, meaning they can detect two bit errors or correct one bit errors. The relationship between n and k is defined such that n = 2m - 1, and k = n - m. m is the number of check bits we want to have. Our discussion will focus on C(7, 4).

Generating the Hamming code The top four bits of the codeword are the dataword. The bottom three bits are calculated as follows: r0 = a2 + a1 + a0 r1 = a3 + a2 + a1 r2 = a1 + a0 + a3

Checking the Hamming code The receiver gets the codeword and uses it to calculate three syndrome bits: s0 = b2 + b1 + b0 + q0 s1 = b3 + b2 + b1 + q1 s2 = b1 + b0 + b3 + q2 The pattern of syndrome bits tells us what bit was in error, so the receiver can fix it.

Cyclic codes Cyclic codes are special linear block codes with the property that if you bit shift any codeword, you get a new valid codeword. Used exclusively for error detection, but use is very widespread because they are very easy to implement in hardware.

Cyclic Redundancy Check (CRC) Once again, for C(7,4)…. Encoding: The dataword becomes the top four bits of the codeword. The bottom three bits are calculated as follows: Take the dataword and tack three 0’s onto the end. This is divided by a pre-arranged divisor. The remainder becomes the bottom three bits Decoding: Divide the codeword by the divisor. If the remainder is 0, the dataword is good. If not, there was an error.

Choosing a divisor How good a given CRC is at detecting errors depends on the divisor that is chosen. Think of a bit pattern in terms of polynomials, so the pattern 100101 would be x5 + x2 + 1. Now let’s analyze what happens in terms of polynomial functions. The codeword received is equal to the sent codeword, c(x), plus the error, e(x). To extract the dataword from the codeword, we divide by the divisor, g(x), so:

By definition, c(x)/g(x) has no remainder. So, if Codeword/g(x) has a remainder, there must be an error. If it has no remainder, one of two things is true: Either e(x) = 0 (good!) Or e(x)/g(x) has no remainder (bad!) So, we need to pick our divisor, g(x), such that it will only very infrequently lead to the second case.

Isolated single bit errors Any single bit error is xi. Any polynomial of the form xk + 1 will always have a remainder when dividing with xi. Isolated single bit errors e(x) = xj + xi = xi(xj-i + 1) Odd numbers of errors: Make x - 1 one of the factors Burst errors: e(x) = xj + … + xi = xi(xj-i +… + 1) We are worried about if (xj-i +… + 1)/(xr + … + 1) has a remainder or not. If j-i < r, the remainder will never be 0. (L ≤ r) If j-i = r, the remainder can be 0 with a probability of (1/2)r-1 If j-i > r, the remainder can be 0 with a probability of (1/2)r