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.

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
Ch 2.7 Error Detection & Correction CS-147 Tu Hoang.
Introduction to Information Technologies
CSE 461: Error Detection and Correction. Next Topic  Error detection and correction  Focus: How do we detect and correct messages that are garbled during.
NETWORKING CONCEPTS. ERROR DETECTION Error occures when a bit is altered between transmission& reception ie. Binary 1 is transmitted but received is binary.
EEC-484/584 Computer Networks Lecture 6 Wenbing Zhao
PART III DATA LINK LAYER. Position of the Data-Link Layer.
The OSI Reference Model
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.
EEC-484/584 Computer Networks Lecture 7 Wenbing Zhao (Part of the slides are based on materials supplied by Dr. Louise Moser at UCSB and.
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.
Unit 1 Protocols Learning Objectives: Understand the need to detect and correct errors in data transmission.
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.
Data link layer: services
PART III DATA LINK LAYER. Position of the Data-Link Layer.
British Computer Society
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.
Data Link Layer: Error Detection and Correction
COEN 180 Erasure Correcting, Error Detecting, and Error Correcting Codes.
Data and Computer Communications by William Stallings Eighth Edition Digital Data Communications Techniques Digital Data Communications Techniques Click.
Practical Session 10 Error Detecting and Correcting Codes.
ECE453 – Introduction to Computer Networks Lecture 4 – Data Link Layer (I)
Unit 5 Lecture 2 Error Control Error Detection & Error Correction.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Data Link Layer PART III.
Error Detection and Correction
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.
CSCI 465 D ata Communications and Networks Lecture 9 Martin van Bommel CSCI 465 Data Communications & Networks 1.
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.
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.
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 – Hamming Code
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.
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.
Part III: Data Link Layer Error Detection and Correction
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
Error Detection and Correction
Dr. Clincy Professor of CS
CIS 321 Data Communications & Networking
Error Detection Bit Error Rate(BER): It is the ratio of number Ne of errors appearing over a certain time interval t to the number Nt of 1 and 0 pulses.
Chapter 7 Error Detection and Correction
Chapter 9 Error Detection and Correction
Introduction to Information Technologies
EEC-484/584 Computer Networks
Chapter 9 Error Detection and Correction
Computer Architecture and Assembly Language
Error Detection and Correction
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
Presentation transcript:

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 word to the other. Binary case: Number of 1’s in the XOR between the words. Hamming Distance is the minimum distance between the code words.

Hamming Distance Intuition (code graph): Example: d=

Error Detection Hamming Distance: d. Can Detect d-1 errors.

Fixing Erasures Can fix d-1 erasures.

Error Correction Can fix Errors

Example Given four “data” words, can we use 5-bit code words for fixing 1 error? Answer: Yes. We need a hamming distance of 3 to fix 1 error. We can create code words with independent graph “spheres”

Parity Check The most basic error check. Used to test one character. Appended to the end of the message. Can detect 1 error. Example (Even parity):

Block Character Checksum Uses vertical and horizontal parity bits to detect double errors. Used for transmitting a block of characters. BCC is used to detect two errors. Odd parity calculated for each row. Even parity calculated for each column.

BCC - Example Two errors in the character ‘N’. Parity doesn’t change. BCC changed.

Cyclic Redundancy Check A CRC is an error-detecting code An n-bit CRC, applied to a data block of arbitrary length, will detect any single error burst not longer than n bits Will detect a fraction 1-2 -n of all longer error bursts The simplest error-detection system, the parity bit, is in fact a trivial CRC: it uses the two-bit-long divisor 11.

Calculation Steps - Sending 1.A generator is chosen. – This is a sequence of bits, of which the first and last are 1. – This sequence is used with the bits of the message to calculate a check sequence which has 1 fewer bits than the generator. 2.The check sequence is appended to the original message

Calculation Steps - Receiving At the receiver, the same calculation is performed on the message and check sequence combined. If the result is 0 no transmission error is assumed to have occurred.

Example Compute 8-bit CRC for an 8-bit message: ‘W’. ASCII for ‘W’: = Select Generator: CRC-8-ATM – Polynomial: x 8 + x 2 + x + 1 – Corresponds to: Two different orders are possible for the message. – Msbit-first: = x 6 + x 4 + x 2 + x + 1 – Lsbit-first: = x 7 + x 6 + x 5 + x 3 + x

Example – Generating CRC Code We will focus on Msbit-first order. Append 8 bits to message: Perform long-division of message by generator. – Quotient is not needed. – Instead of subtraction perform simple XOR. – CRC code is the reminder.

Example – Generating CRC Code CRC Code: xor

Example – Checking Message Similar to generating the CRC code. Append CRC code to the message (instead of 0’s): Perform long division by the generator. If the reminder is not 0: An error occurred.

Example – Checking Message Result:

CRC Polynomials (Common) CRC-8-ATMx 8 + x 2 + x + 1 CRC-16-IBMx 16 + x 15 + x CRC-16-CCITTx 16 + x 12 + x CRC-32-IEEE 802.3x 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