A check digit is a digit added to a number at the end or at the beginning
to validate the authenticity of the number.
1.Check Digits are used to assure data entered has correct format
2. Check digits are created from data entered using an algorithm or scheme.
National ID number, Credit Card Number and ISBN of a book have check digits.
VISA card has digit 4 as pre-fix (infront 4000)
It has 16 numbers and use LUHN Formula (Mod-10) algorithm
(the first right--hand digit is the check digit.)
MOD 10 Algorithm
Consider account number 4 9 9 2 7 3 9 8 7 1 6
Step 1: Pick each alternate digit starting from second digit from the right ( 9 2 3 8 1 )
Step 2: Multiply each digit selected by two ( 9 x2=18, 2 x2=4 , 3x2=6, 8 x2=16, 1 x2=2)
Step 3: Add individual digits of each result to the unaffected digits in the original number.
4 +(1+8)+ 9 + (4) + 7 + (6) + 9 +(1+6) + 7 + (2) + 6=70
Step 4: The total must be a number ending in zero (30, 40, 50, 60,70 etc.)
Then the first number of check digit added to the account number at last
4 9 9 2 7 3 9 8 7 1 6 7
By running this algorithm, and comparing the check digit you can validate credit card number.
There are many different algorithms for creating check digits.
The ISBN-10 system for books uses 'Modulo-11' division.
In modulo division, the answer is the remainder of the division. For example
8 Mod 3 = 2 i.e. the remainder of dividing 8 by 3 is 2.
Consider the ISBN number:
ISBN 1 84146 201 2
The check digit is the final digit in the sequence (2)
Step 1 : Remove the last digit from the ISBN number (2)
Step 2 : Write out the remaining numbers starting from the right most digit.
1 8 4 1 4 6 2 0 1
Step 3 : Multiply 1st number by 10, 2nd by 9 , 3rd by 8.... and last by 2 etc
10x1 + 9x8 + 8x4 + 7x1 + 6x4 + 5x6 + 4x2 + 3 x0 + 2 x 1
Step 4 : Add the results together:
10 + 72 + 32 + 7 + 24 + 30 + 8 + 0 + 2 = 185
Step 5 : Divide the total by 11 and record the remainder
185 divide by 11 = 16 with 9 remaining
Step 6 : Take the remainder away from 11.
11 - 9 = 2
Step 7: Is the answer the same as check digit that you removed in step 1. (2=2)
If the numbers are the same then the check digit confirms the original number.
NOTE:
If the remainder is 0 then the check digit is 0
If the remainder is 10 then the check digit is X
Are these numbers correct ?
Workout
ISBN 184146208X
ISBN 1841462020
VISA
4556975663185
4556816478975
4532047673486
For Advanced Learning
According to Richard Hamming (Coding and Information Theory, 2e, Prentice-Hall, 1986, p. 27), the two most common human errors are:
- Interchanging adjacent digits of numbers:
67 becomes 76 - Doubling the wrong one of a triple of digits, two adjacent ones of which are the same:
667 becomes 677 - a becomes b
- adding a digit a become ab
- omitting a digit abc become ac
- ab becomes ba
- aa becomes bb
- acb becomes bca
- aca becomes bcb
- a0 becomes 1a
Explore Other methods online
IBM check (used with most credit cards)
Electronic Funds Transfer routing number check
UPC check (used on product bar codes)
Verhoeff's dihedral group D5 check