2.2 Interfacing Computers MR JOSEPH TAN CHOO KEE TUESDAY 1330 TO
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.
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.
Purpose: Detecting Transmission Errors Parity Check: Parity bit Checksums The most common approach when any error is detected is retransmission.
Parity Bit-Pattern 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 Example: 7 data bits + 1 parity bit
Parity Bit-Pattern Work out the Even parity bit?
Parity Bit-Pattern 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
Parity Bit-Pattern Work out the Odd parity bit?
Odd Parity Sent Data Parity Bit-Pattern 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
Odd Parity Sent Data Parity Bit-Pattern 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
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: ×4 + 3×8 + 2×7 + 7×1 = modulo 10 Check digit would be 5 Result:
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
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: ×1 + 8×2 + 9×7 + 8×8 = modulo 10 Check digit would be 0 Result:
Checksum : Hash Function
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
MD5 What is MD5 checksum? Uses of MD5 Checksum Checking the MD5
MD5 Checksum
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)
Disadvantage of any hash function Hash Collision 2 input value hash to the same result