Monday, December 31, 2018

1.1.3(e): identify and describe methods of error detection and correction


Check digit
A check digit Is the final digit in a code, calculated using all the other digits of the code.
They are used for barcodes, product codes, International Standard Book Numbers (ISBN) and Vehicle Identifications Numbers (VIN)
Used for identifying errors in data entry (e.g typo)
They usually can identify:
·       An incorrect digit entered
·       Transposition errors
·       Omitted or extra digits
·       Phonetic errors in speech

e.g: ISBN-13

The last digit (13th) is calculated as follows:
       1. Sum all the odd digits (excluding the check digits)
       2. Sum all the even digits and multiply by 3
       3. Add the sums and mod (%) it to get the remainder
       4. If it is 0, this is the check digit. Otherwise, subtract the remainder from 10 to get the check digit

example: VALID
Calculate the check digit for this code

Finally, to validate the code:
1.  Sum all the odd digits (including the check digit)
2.  Sum all the even digits and multiply by 3
3.  Add the sums and mod (%) it to get the remainder
4.  The code is valid if the remainder is 0



Checksums:
A checksum is another method of error detection in data transmission
Data is sent in blocks and at the end of each block another value is added- this is checksum

No comments:

Post a Comment