1 / 19

2.2 Interfacing Computers MR JOSEPH TAN CHOO KEE TUESDAY 1330 TO 1530

2.2 Interfacing Computers MR JOSEPH TAN CHOO KEE TUESDAY 1330 TO 1530 http://computing2013.wiki.hci.edu.sg/. Error Detection & Correction. In computer science and telecommunication, error detection and correction or error control are techniques that enable

Download Presentation

2.2 Interfacing Computers MR JOSEPH TAN CHOO KEE TUESDAY 1330 TO 1530

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. 2.2 Interfacing Computers MR JOSEPH TAN CHOO KEE TUESDAY 1330 TO 1530 http://computing2013.wiki.hci.edu.sg/

  2. Error Detection & Correction In computer science and telecommunication, • error detection and correction or error control are techniques that enable • reliable delivery of digital data over unreliable communication channels.

  3. Why? Many communication channels are subject to channel noise, and thus errors may be introduced during transmission from the source to a receiver. • Error detection techniques allow detecting such errors, • Error correction enables reconstruction of the original data.

  4. Purpose: Detecting Transmission Errors • Parity Check: Parity bit • Checksums The most common approach when any error is detected is retransmission.

  5. Example: 7 data bits + 1 parity bit Parity Bit-Pattern 1 0 1 1 0 1 1 1 1 0 1 0 1 1 0 0 1 1 1 0 1 1 1 1 1 0 0 0 1 0 0 0 1 0 1 0 1 0 1 1 1 1 0 1 1 1 1 1 1 1 1 0 0 1 1 0 When will the parity bit be set? This is known as the Even parity bit Purpose: To make the total number of ‘ON’ bits even

  6. Parity Bit-Pattern 1 1 1 1 0 1 1 1 0 0 1 0 1 1 0 1 1 1 1 0 1 1 0 1 1 0 0 0 1 0 0 1 1 0 1 0 1 1 1 1 1 1 0 1 1 1 0 0 1 0 0 1 1 0 0 0 Work out the Even parity bit?

  7. Parity Bit-Pattern 1 0 1 1 0 1 1 1 1 0 1 0 1 1 0 0 1 1 1 0 1 1 1 1 1 0 0 0 1 0 0 0 1 0 1 0 1 0 1 1 1 1 0 1 1 1 1 1 1 0 0 1 1 0 0 1 When will the parity bit be set? This is known as the ODD parity bit Purpose: To make the total number of ‘ON’ bits ODD

  8. Parity Bit-Pattern 1 1 1 1 0 1 1 1 0 0 1 0 1 1 0 1 1 1 1 0 1 1 0 1 1 0 0 0 1 0 0 1 1 0 1 0 1 1 1 1 1 1 0 1 1 1 0 0 1 1 1 0 0 1 1 1 Work out the Odd parity bit?

  9. How does it work? Odd Parity Received Data Parity Bit-Pattern 1 1 1 1 1 0 0 1 Odd Parity Sent Data Parity Bit-Pattern 1 1 1 1 1 0 1 1 Received with Parity ‘1’ when it should be ‘0’ … => Data received with errors, detected

  10. Loop holes: Odd Parity Received Data Parity Bit-Pattern 1 1 1 01 0 0 1 Odd Parity Sent Data Parity Bit-Pattern 1 1 1 1 1 0 1 1 2 data bits altered but parity bits reflects that it is correct. => Data received with errors but not detected

  11. Check digit • Similar to the concept of check digit for bank account numbers • Check digit Approach • take the weighted sum of the digits, • modulo 10, with different weights for each number position • Weights: 5, 3, 2, 7 • Number to be coded: 4871 • 5×4 + 3×8 + 2×7 + 7×1 = 65 • 65 modulo 10 • Check digit would be 5 • Result: 48715.

  12. Check digit • Similar to the concept of check digit for bank account numbers • Check digit Approach • take the weighted sum of the digits, • modulo 10, with different weights for each number position • Weights: 1, 2, 7, 8 • Number to be coded: 7898

  13. Check digit • Similar to the concept of check digit for bank account numbers • Check digit Approach • take the weighted sum of the digits, • modulo 10, with different weights for each number position • Weights: 1, 2, 7, 8 • Number to be coded: 7898 • 7×1 + 8×2 + 9×7 + 8×8 = 150 • 150 modulo 10 • Check digit would be 0 • Result: 78980.

  14. Checksum: Hash Function

  15. Checksums • Checksum is a fixed-size datum computed from an arbitrary block of digital data • for the purpose of detecting accidental errors • that may have been introduced during its transmission or storage.  How to check for errors? • Re-computing the checksum and comparing it with the stored one Hash Function cipher text Plain text

  16. MD5 • What is MD5 checksum? • Uses of MD5 Checksum • Checking the MD5

  17. MD5 Checksum https://www.youtube.com/watch?v=2tuRHBkvbgs

  18. MD5 Checksum • A hash function to check if a file is legit. • In Hexadecimal, 128 bits, 32 Characters • If the checksum matches the given than its legit else there is a possibility it is altered. • The checksum will be different for different file. • There are programs/utilities to calculate/compare MD5 Checksum. • MD5 Checksum are available for check. • Other Checksums: SHA-1, SHA-2 (Secure Hash Algorithm)

  19. Disadvantage of any hash function • Hash Collision • 2 input value hash to the same result

More Related