Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "2.2 Interfacing Computers MR JOSEPH TAN CHOO KEE TUESDAY 1330 TO 1530"— 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 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 When will the parity bit be set? This is known as the Even parity bit This is known as the Even parity bit Purpose: To make the total number of ‘ON’ bits even 11001101100110 Example: 7 data bits + 1 parity bit

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 Work out the Even parity bit? 00110000011000

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 When will the parity bit be set? This is known as the ODD parity bit This is known as the ODD parity bit Purpose: To make the total number of ‘ON’ bits ODD 00110010011001

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 Work out the Odd parity bit? 11001111100111

9 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 How does it work? Odd Parity Received Data Parity Bit-Pattern 1 1 1 1 1 0 0 1

10 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 Loop holes: Odd Parity Received Data Parity Bit-Pattern 1 1 1 0 1 0 0 1

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 Plain text Hash Function cipher 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


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

Similar presentations


Ads by Google