Download presentation
Presentation is loading. Please wait.
Published byNoah Carson Modified over 9 years ago
1
CSCI 465 D ata Communications and Networks Lecture 9 Martin van Bommel CSCI 465 Data Communications & Networks 1
2
Errors An error occurs when a bit is altered between transmission and reception – binary 1 is transmitted and binary 0 is received or binary 0 is transmitted and binary 1 is received Single bit error – isolated error that alters one bit but not nearby bits – caused by white noise Burst error – contiguous sequence of B bits where first and last bits and any number of intermediate bits are received in error – caused by impulse noise or by fading in wireless – effects greater at higher data rates CSCI 465 Data Communications & Networks 2
3
Error Detection regardless of design you will have errors can detect errors by using an error-detecting code added by the transmitter code is also referred to as “check bits” recalculated and checked by receiver still chance of undetected error CSCI 465 Data Communications & Networks 3
4
Parity Check parity – parity bit set so character has even or odd # of ones even parity – used in synchronous transmission odd parity – used in asynchronous transmission – even number of bit errors goes undetected problem – noise impulses often long enough to destroy more than one bit, especially at high data rates CSCI 465 Data Communications & Networks 4
5
Cyclic Redundancy Check (CRC) one of most common and powerful checks for a block of k bits, transmitter generates an n-bit frame by adding an (n-k)-bit frame check sequence (FCS) Transmits n bits which is exactly divisible by some predetermined number receiver divides frame by that number – if no remainder, assume no error CSCI 465 Data Communications & Networks 5
6
Side: Modulo-2 Arithmetic Modulo-2 addition uses no carries – Addition and subtraction via exclusive-OR (XOR) 1100 0110 11011 + 1010 – 1100 X 101 –––––– –––––– –––––– 0110 1010 11011 11011 –––––––– 1110111 CSCI 465 Data Communications & Networks 6
7
CRC Using Mod-2 Arithmetic Define – T = n-bit frame to be transmitted – D = k-bit block of data (message), first k bits of T – F = (n – k)-bit FCS, last (n – k) bits of T – P = pattern of n – k + 1 bits (predetermined divisor) Want T / P to have no remainder – T = 2 n-k D + F (Note: 2 n-k D shifts D (n-k) bits left) F = remainder after dividing 2 n-k D by P Receiver will check that T / P has no remainder CSCI 465 Data Communications & Networks 7
8
CRC Mod-2 Example Given n = 15, k = 10, (n – k) = 5 – Message D = 1010001101 (10 bits) Pattern P = 110101 (6 bits) FCS F = to be calculated (5 bits) Transmission T = 2 n-k D + F – Note: 2 n-k D = 2 5 D = 101000110100000 – 2 n-k D / P = 1101010110 Remainder 01110 = F – Thus T = 1010001101 01110 CSCI 465 Data Communications & Networks 8
9
CRC Mod-2 Example (2) T / P Mod-2 should have no remainder – T / P = 1010001101 01110 / 110101 110101 111011 110101 111010 110101 111110 110101 101111 110101 110101 110101 00 CSCI 465 Data Communications & Networks 9
10
CRC Polynomials Express all values as polynomials in dummy variable X, with binary coefficients – E.g. for D = 110011, D(X) = X 5 + X 4 + X + 1 for P = 11001, P(X) = X 4 + X 3 + 1 – This gives R(X) = X 3 + X 2 + X and thus F = 1110 CSCI 465 Data Communications & Networks 10
11
Error Detection Probability An error E(X) will be undetectable only if it is divisible by P(X) The following are detectable if suitable P(X) – All single-bit errors (if P has at least two terms) – All double-bit errors (if P “primitive”) – Any odd number of errors (if P has (X+1) as factor) – Burst error of length less than (n-k) – length of F – Many others CSCI 465 Data Communications & Networks 11
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.