Error Detection and Correction

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.
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
Quantum Error Correction SOURCES: Michele Mosca Daniel Gottesman Richard Spillman Andrew Landahl.
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.
Unit 1 Protocols Learning Objectives: Understand the need to detect and correct errors in data transmission.
Synchronous - Asynchronous Data Transmission. Asynchronous ► The sender and receiver are not Synchronised. ► The sender sends only one character at a.
Error Detection and Correction
E RROR D ETECTION A ND C ORRECTION C ODES Error Detection Code (Parity bit) Error Correction Code ( Hamming Code)
Information Coding in noisy channel error protection:-- improve tolerance of errors error detection: --- indicate occurrence of errors. Source.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Data Link Layer PART III.
British Computer Society
CIT 307 Online Data Communications Error Detection Module 11 Kevin Siminski, Instructor.
Error Control Code. Widely used in many areas, like communications, DVD, data storage… In communications, because of noise, you can never be sure that.
Data and Computer Communications
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
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.
Unit 5 Lecture 2 Error Control Error Detection & Error Correction.
Error Control Code. Widely used in many areas, like communications, DVD, data storage… In communications, because of noise, you can never be sure that.
Error Detection and Correction
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.
Computer Communication & Networks Lecture 9 Datalink Layer: Error Detection Waleed Ejaz
1 © Unitec New Zealand CRC calculation and Hammings code.
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.
Error Detection and Correction – Hamming Code
Data Link Layer. Data Link Layer Topics to Cover Error Detection and Correction Data Link Control and Protocols Multiple Access Local Area Networks Wireless.
1/30/ :20 PM1 Chapter 6 ─ Digital Data Communication Techniques CSE 3213 Fall 2011.
10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Data Link Layer 1. 2 Single-bit error 3 Multiple-bit error 4.
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.
Data Transmission and Networks Transmission error checking & correcting.
10.1 Types of Errors 10.2 Detection 10.3 Error Correction.
Hamming Codes The Hamming Code is a Forward Error-correcting Code (FEC) that uses redundant bits to correct a single bit error For 4 bit codes, 3 redundant.
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.
Computer Architecture and Assembly Language
ERROR DETECTION AND CORRECTION
Error Detection and Correction
Cyclic Redundancy Check (CRC)
ERROR CORRECTING CODES
Cyclic Redundancy Check (CRC)
Error Correcting Code.
Advanced Computer Networks
CIS 321 Data Communications & Networking
OCR AS Level F451: Data transmission
Even/odd parity (1) Computers can sometimes make errors when they transmit data. Even/odd parity: is basic method for detecting if an odd number of bits.
Data Link Layer.
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.
Dhanushiya. R I YEAR BSc COMPUTER TECHNOLOGY.  Error is a condition when the output information does not match with the input information. During transmission,
Packetizing Error Detection
Digital Systems: Number Systems and Codes
Packetizing Error Detection
Chapter 7 Error Detection and Correction
EET107/3 DIGITAL ELECTRONICS 1
Packetizing Error Detection
COMPUTER NETWORKS CS610 Lecture-5 Hammad Khalid Khan.
Error Detection and Correction
CS 325: CS Hardware and Software Organization and Architecture
Error Detection and Correction
Reliability and Channel Coding
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.
Presentation transcript:

Error Detection and Correction 350151 – Digital Circuit 1 Choopan Rattanapoka

Problems and Solution Some problems may occur when you transmit digital data. (such as noise) Thus, the solution that can prevent incorrect digital data during the transmission are Error Detection the ability to detect the presence of errors caused by noise or other impairments during transmission from the transmitter to the receiver Error Correction the additional ability to reconstruct the original, error-free data.

Error Detection There are several schemes exist to achieve error detection, and they are quite simple. We need to transmit more bits than in the original data. Example of error detection schemes Repetition schemes Parity schemes Checksum Cyclic redundancy checks Hamming distance based checks Hash function Horizontal and vertical redundancy check

Repetition Schemes Given a stream of data that is to be sent, the data is broken up into blocks of bits, and in sending, each block is sent some predetermined number of times. For example, if we want to send "1011", we may repeat this block three times each. Suppose we send 1011 1011 1011 The receiver receives 1010 1011 1011 As one group is not the same as the other two, we can determine that an error has occurred. This schemes is not efficient If receiver receives 1010 1010 1010 then receiver will think that the data is correct !!

Parity Schemes (1) There are 2 types of parity error detection: Even parity schemes Odd parity schemes The stream of data is broken up into blocks of bits, and the number of 1 bits is counted. We add an extra bit called parity bit during the transmission

Parity schemes (2) Even parity scheme Odd parity scheme The number of bits “1” including parity bit is EVEN. Ex 1 : 10010 parity bit  0 Ex 2 : 11001 parity bit  1 Odd parity scheme The number of bits “1” including parity bit is ODD. Ex 1 : 10010 parity bit  1 Ex 2 : 11001 parity bit  0

Parity schemes (3) The sender calculates parity bit and then send it with the data. When, the receiver receives data and parity bit, it calculate if error occurred during the transmission. Ex 1: Even parity scheme (data error) Sender Receiver 100111 110111 (error) Ex 2: Even parity scheme (parity error) Sender Receiver 100111 100110 (error) However, if there are even number of error bit, the parity scheme can not detect them Sender Receiver 100111 110011 (correct !!!)

How to apply parity bit Transmitting digital System Receiving digital System Parity-bit generator Error detector Alarm

Even –Parity Bit Generator Exercise 1 Find the output (P) of 12 input pulses. 0 1 1 1 1 0 0 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 1 0 1 1 1 0 0 0 1 1 0 1 1 0 0 1 1 0 0 1 1 1 0 0 0 0 0 1 1 0 0 0 0 1 1 l k j i h g f e d c b a A Even –Parity Bit Generator B C P D E

ODD –Parity Bit Error Detector Exercise 2 Find error pulses from 12 input pulses. 1 1 0 1 0 1 0 1 0 1 1 1 0 1 0 0 0 0 1 1 1 1 0 1 0 1 0 0 0 0 1 1 1 0 1 1 1 1 0 0 1 0 1 0 1 1 0 0 0 1 0 0 0 1 1 1 1 0 0 1 l k j i h g f e d c b a A ODD –Parity Bit Error Detector B C Error D P Parity bit

Error Correction 1-bit parity is used to verify the correctness between the data transmission. However, it can’t identify the error bit’s position To correct the error, we use the hamming code If we want to transmit r bits, we need to add m bits parity. (assume: n = r + m ) Hamming code can correct an error if 2m ≥ n + 1 Example : if we want to transmit 4 bits, we need 2m ≥ (m + 4) + 1 2m ≥ m + 5 m ≥ 3 3-bit parity

Hamming code (1) Parity bits will be put in power of 2 positions. (1, 2, 4, 8, …) [position start from 1] Rearrange data bits in order and avoid parity bits position. Example : for 4-bit data(D4, D3, D2, D1), we need at least 3-bit parity (P3, P2, P1). Put parity bits in power of 2 position : 7 6 5 4 3 2 1 P3 P2 P1 Rearrange data bit in order D4 D3 D2 P3 D1 P2 P1

Hamming Code (2) 4-bit data are in position of 7, 6, 5, and 3 digit Convert it to binary D4 : 7  111 D3 : 6  110 D2 : 5  101 D1 : 3  011 Parity bit (P1) use for data bit that LSB of its position is 1. (in this case : D4, D2, and D1) Parity bit (P2) use for data bit that second bit from LSB of its position is 1. (in this case : D4, D3, and D1) Parity bit (P3) use for data bit that third bit from LSB of its position is 1. (in this case : D4, D3, and D2)

Example : Hamming Code (Even Parity Bit) Sender Receiver D4  1 1  D4 D3  0 0  D3 D2  1 1  D2 P3  (D4 D3 D2 )  0 0  P3  0  (D4 D3 D2 ) D1  1 0  D1 P2  (D4 D3 D1 )  0 0  P2  1  (D4 D3 D1 ) P1  (D4 D2 D1 )  1 1  P1  0  (D4 D2 D1 ) There is an error occurred during the transmission !! P2 and P1 got wrong parity bit so D1 is error !! transmission

Hamming Code (3) Formal error detection : Received parity bits XOR Calculated parity bits The result of XOR operation shows the error position. From Example : P3 P2 P1 Received : 0 0 1 Calculated : 0 1 0 Error digit : 0 1 1  3 (D1)