Practical Session 10 Error Detecting and Correcting Codes.

Slides:



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

Computer Interfacing and Protocols
10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Introduction to Information Technologies
Chapter 6 Errors, Error Detection, and Error Control.
Transmission Errors Error Detection and Correction
Error Detection and Correction
PART III DATA LINK LAYER. Position of the Data-Link Layer.
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.
Shashank Srivastava Motilal Nehru National Institute Of Technology, Allahabad Error Detection and Correction : Data Link Layer.
Transmission Errors Error Detection and Correction
Data link layer: services
1 Data Link Layer Lecture 20 Imran Ahmed University of Management & Technology.
PART III DATA LINK LAYER. Position of the Data-Link Layer.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Data Link Layer PART III.
British Computer Society
جلسه هشتم شبکه های کامپیوتری به نــــــــــــام خدا.
Data Link Layer: Error Detection and Correction
Data and Computer Communications by William Stallings Eighth Edition Digital Data Communications Techniques Digital Data Communications Techniques Click.
Unit 5 Lecture 2 Error Control Error Detection & Error Correction.
EEC4113 Data Communication & Multimedia System Chapter 5: Error Control by Muhazam Mustapha, October 2011.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Data Link Layer PART III.
Error Detection and Correction
PREPARED BY: ENGR. JO-ANN C. VIÑAS
Computer Science Division
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.
1 © Unitec New Zealand CRC calculation and Hammings code.
Error Detection.
10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
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.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Data Link Layer PART III.
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.
Network Layer4-1 Chapter 5: The Data Link Layer Our goals: r understand principles behind data link layer services: m error detection, correction m sharing.
Data Link Layer 1. 2 Single-bit error 3 Multiple-bit error 4.
Chi-Cheng Lin, Winona State University CS412 Introduction to Computer Networking & Telecommunication Error Correction/Detection.
Practical Session 10 Computer Architecture and Assembly Language.
ERROR DETECTION AND CORRECTION Chapter 8 Data Communications & Networking ERROR DETECTION AND CORRECTION Chapter 8 First Semester 2007/2008.
Dr. Clincy Professor of CS
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.
Modulo-2 Digital coding uses modulo-2 arithmetic where addition becomes the following operations: 0+0= =0 0+1= =1 It performs the.
Computer Architecture and Assembly Language
Introduction to Information Technologies
ERROR DETECTION AND CORRECTION
Data Link Layer.
ERROR CORRECTING CODES
Error Detection and Correction
Advanced Computer Networks
CIS 321 Data Communications & Networking
Part III Datalink Layer 10.
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
Introduction to Information Technologies
DATA COMMUNICATION Lecture-33.
Error Detection and Correction
Computer Architecture and Assembly Language
Error Detection and Correction
DATA COMMUNICATION Lecture-34.
Types of Errors Data transmission suffers unpredictable changes because of interference The interference can change the shape of the signal Single-bit.
Error Detection and Correction
Data Link Layer. Position of the data-link layer.
Presentation transcript:

Practical Session 10 Error Detecting and Correcting Codes

Error detection and correction channel noise communication channels are subject to channel noise, and thus errors may be introduced during data transmission techniques that enable reliable delivery of digital data over unreliable communication channels we need techniques that enable reliable delivery of digital data over unreliable communication channels detecting errors reconstructing the original data

Error detection and correction redundancy extra data General idea: add some redundancy (i.e. some extra data) to a message This extra data is used – to check consistency of the delivered message – to recover data determined to be corrupted – to recover data determined to be corrupted

Hamming Distance Hamming distance (d) amount of 1-bit changes Hamming distance (d) between two code words of equal length is an amount of 1-bit changes required to reach from one word to the other number of 1’s in the XOR between the words d(000, 011) = d(10101, 11110) = 3

Hamming Distance Minimum Hamming distance smallest Hamming distance all possible pairs Minimum Hamming distance is the smallest Hamming distance between all possible pairs in a set of words. Example Given the following coding scheme, let’s find the minimum Hamming distance d(00000,01011)=3 d(00000,10101)=3 d(00000,11110)=4 d(01011,10101)=4 d(01011,11110)=3 d(10101,11110)=3 minimum Hamming distance is d=3

Hamming Distance - Error Detection Minimum Hamming Distance: d Can detect (at least) d-1 errors Example d=3 3 errors can take us from one legal code word to another 01011

Hamming Distance - Erasures Fixing Minimum Hamming Distance: d Can fix (at least) d-1 erasures _0000_0_ Example d=3 3 erasures can take us from one legal code word to another 0_0__

Hamming Distance - Error Correction Minimum Hamming Distance: d Can correct (at least) errors Example d=3 2 errors can take us from two different legal code words to the same illegal word

Hamming Distance - Example Given four data words, can we use 5-bit code words for fixing 1 error? independent graphs of a single error code words Answer: yes. We need a hamming distance d=3 to fix 1 error. We can create code words with independent graphs of a single error code words. d(00000,11100)=3 d(11100, 10111)=3 d(10111, 01011)=3 d(00000,10111)=4 d(11100, 01011)=4 d(00000,01011)=

Parity Check parity bit Given a data word, a code word is created by adding a parity bit to the end of the data word d=2 d=2 (why?) Can detect odd number of errors (1,3,5,…) Can detect odd number of errors (1,3,5,…) send: or receive: 1 or 3 errors occur Code word Data word

Longitudinal Redundancy Checking (LRC) Block Check Adds an additional character called Block Check Character (BCC) Character (BCC) to a data word. 1.determine vertical and horizontal parity bits Even parity calculated for each row (1 if number of ‘1’ bits is 1,3,5,7,…) Odd parity calculated for each column (1 if number of ‘1’ bits is 0,2,4,6,…) 2.calculate BCC character 1st bit of BCC  number of 1’s in the 1st bit of characters 2nd bit of BCC  number of 1’s in the 2ndt bit of characters … 8’th bit of BCC  number of 1’s in the parity bits column Example data word suppose a data word “DATA” ASCII Letter D A T ABCC Parity bit code word a code word is “DATA”

2 errors occurred Longitudinal Redundancy Checking (LRC) Block Check Adds an additional character called Block Check Character (BCC) Character (BCC) to a data word. d=2 d=2 (why?) ASCII Letter D A T ABCC Parity bit ASCII Letter D A T ABCC Parity bit These two errors would not change BCC character

Cyclic Redundancy Check CRC is an error-detecting code Given a data, its non trivial (cryptographic) challenge to find another data with the same CRC code.  CRC can protect data (even from deliberate damage)

Binary Pattern as Polynomial

CRC Polynomials (common) CRC-8-ATM x 8 + x 2 + x + 1 CRC-16-IBM x 16 + x 15 + x CRC-16-CCITT x 16 + x 12 + x CRC-32-IEEE x 32 + x 26 + x 23 + x 22 + x 16 + x 12 + x 11 + x 10 + x 8 + x 7 + x 5 + x 4 + x 2 + x + 1

Sending – Calculation Steps 1.Generator 1.Generator is chosen – sequence of bits, of which the first and last are 1 2.CRC check sequence is computed 2.CRC check sequence is computed by long- division of message by generator – check sequence has 1 fewer bits than generator appended 3.Check sequence is appended to the original message

Sending – Calculation Steps Compute 8-bit CRC a message ‘W’ (0x57). 1.Select Generator: CRC-8-ATM 1.x 8 + x 2 + x + 1 = ‘W’ is = x 6 + x 4 + x 2 + x Extend ‘W’ with 8 bits: Perform XOR of the word get in step (3) by generator – CRC code is the remainder 5.Append CRC code to ‘W’

Generating CRC Code Generating CRC Code long-division of message by generator CRC Code: xor Each time apply XOR on the extended message, when place a generator from the left-most ‘1’ bit of the extended message Stop when CRC code has 1 fewer bits than generator

Receiving – Calculation Steps Append CRC code to the message: Perform long division by the generator reminder is not 0 If the reminder is not 0: an error occurred result: xor There is no errors in received message.