1 / 18

CS 6021 - Chapter 2

CS 6021 - Chapter 2. Dr. Clincy Professor of CS. Error Control Techniques. Trade off between detection probability and processing requirements. Approaches Detection Simple Parity (Double Parity) – Already Covered Cyclic Redundancy Checksum Error correction Hamming Approach.

wmeneses
Download Presentation

CS 6021 - Chapter 2

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS 6021 - Chapter 2 Dr. Clincy Professor of CS Lecture 3

  2. Error Control Techniques Trade off between detection probability and processing requirements Approaches Detection • Simple Parity (Double Parity) – Already Covered • Cyclic Redundancy Checksum Error correction • Hamming Approach Lecture 9 and 10

  3. Conceptually, How does CRC works ? On the Tx side • An agreed-to divisor is used by both the Tx and Rx • The dataword is augmented (zeros added) based on the size of the divisor (setting up the dataword to be divided) • The “augmented dataword” is divided by the divisor • The quotient is discarded and the remainder is subtracted from the divisor to get the data that needs to be appended to the “augmented dataword” • Append the results in 4 to the “augmented dataword” • The result in 5 is sent to the receiver On the Rx side • The augmented dataword with “divisor subtract remainder” appended is received • The Rx uses the same divisor as the Tx and divides the data in 1 • If no errors occurred, the remainder will be zero

  4. Conceptually, How does CRC works ? Example using decimal numbers On the Tx side • Shift 546 to the left (adding the appropriate amount of zeros) - 5460 • Divide 5460 by 8 – get quotient 682 and remainder 4 • Subtract remainder 4 from divisor 8 – get 4 • Append or add the results in step 3 to 5460 - 5464 • Send 5464 to the receiver On the Rx side • Divide 5464 by the same divisor – 5464/8 • Quotient equals 683 and the remainder equals 0 • No errors occurred because the remainder is zero Data needing to be sent is 546 and let the common divisor be 8

  5. CRC using regular binary division Appropriate # of zeros added to dividend 1001 Determine remainder Rx performs the same calculation using the new dividend and gets a remainder of zero Subtract remainder from divisor to determine what to append Append result to dividend

  6. Recall that “Black Boxes” do not subtract. In making the CRC approach less complex, Modulo-2 division is used Modulo-2 division uses XOR versus regular subtraction The remainder result from Modulo-2 division is the final product (no need to subtract it from the divisor) – the Tx simply adds it to the augmented dataword

  7. Introducing Modulo-2 Arithmetic Modulo-2 is used for error detection and correction Modulo-2 has no carry over for addition and subtraction Use the exclusive OR (XOR) for modulo-2 XORing of two single bits or two words 0 if two bits are the same 1 if two bits are different

  8. Division for CRC using Modulo-2 Tx Rx Looking at the # of bits to divide 1 0 1 0 1 0 1 0 Module-2 arithmetic here

  9. CRC using Modulo-2 Division More Examples

  10. Cyclic Code Representation Typically, a frame or packet of data is represented as a mathematical polynomial

  11. Error Detection: Cyclic Redundancy Check • Treat the frame or packet of data/bits as a mathematical polynomial • Right-most bit corresponds to x0 • Next bit corresponds to x1 • …Etc… • nth bit corresponds to xn • If the bit is 1, include x(i) in the polynomial • If the bit is 0, do not include x(i) in the polynomial • For example, 101001101 would correspond to: • x8 + x6 + x3 + x2 + x0 • The Tx would take this polynomial and divide it by a given generated polynomial

  12. CRC Approach using polynomials Example • Using the generator polynomial of x5 + x4 + x2 + 1, send the message 1010011010 • 1st: append some zeros to the end of the message you are sending. The number of zeros to append will depend on the degree of the polynomial (i.e. x4 + x3 +x0 has a degree of 4) • In our example, we have a degree of 5 – so add five 0’s • 101001101000000 • 2nd: x5+x4+x2+1 translate to bit stream 110101 • 3rd: Divide 101001101000000 by 110101 using modulo-2 • 4th: Append remainder to original message and send to Rx

  13. Understanding Hamming Distance Concept

  14. D-001 C-011 A-000 B-010 H-101 G-111 F-110 E-100 Error Correction – Hamming Code Concept • Computers make errors occasionally due to voltage spikes and etc. • Recall Encoding Concept – codes representing characters • Hamming Distance of 1: change in 1 bit creates a new code What happens with 1 bit in error ?

  15. 001 B-011 A-000 010 D-101 111 C-110 100 Hamming Distance of 2 What happens with 1 bit in error ? What happens with 2 bits in error ?

  16. 001 011 A-000 010 101 B-111 110 100 Hamming Distance of 3 What happens with 1 bit in error ? What happens with 2 bits in error ? What happens with 3 bits in error ?

  17. Hamming Error Correcting Approach • 1st: Determine the number of parity bits to add to the code word for checking • 2nd: determine bit positions of each added parity bits • 3rd: Determine what each parity bit checks

  18. Hamming Code Example(Understand the “how” vs “why”) • Example: Given a 4-bit code and even parity request – recall parity • Determine number of parity bits to add: 20=1, 21=2, 22=4: also determine bit positions of parity bits – 1, 2 and 4 (with labels C1, C2 and C4) • Let the 4-bit code have labels I3, I5, I6 and I7 due to the parity bit positions • Therefore the seven bits would be transmitted in the following order: C1 C2 I3 C4 I5 I6 I7 • Determine what each parity bit checks: add the parity positions to determine this (must be less than or equal to 7 in this case): C1 case: 1+2=3, 1+4=5, 1+2+4=7;C2 case: 2+1=3, 2+1+4=7, 2+4=6;C4 case: 4+1=5, 4+2=6, 4+2+1=7 • For example, transmitting the 4-bit code of 0101 (I3I5I6I7) would be 0100101 (red bits are parity bits) • If I3 was corrupted during transmission, C1 and C2 would detect it (1+2=3) • If I5 was corrupted during transmission, C1 and C4 would detect it (1+4=5) • If I6 was corrupted during transmission, C2 and C4 would detect it (2+4=6) • If I7 was corrupted during transmission, C1 , C2 and C4 would detect it (1+2+4=7)

More Related