Sorry Garry,
Having just read that last post I made, I decided it was less than helpful. Let's start again.... There are numerous different types of check digit algorithms around, probably the most popular being Modulus 10 and Modulus 11. These are used in credit card, bar codes and ISBN checks for example. What you need to do is decide which you wish to use.
MOD10 is an algorithm of all the digits bar the last, and the last digit is what is required to make the number divisible by 10. eg a 6 digit number of which the first 5 digits are 32653 would have be multiplied or added to give a number. For simplicity's sake, let's add them:
3+2+6+5+3 = 19, so the check digit for this would be 1 ie. the number needed to take it to 20. The type of math performed on each digit can vary in complexity. Credit card validation works differently on odd and even digits.
MOD11 is a weighted system where each digit is multiplied by a number which is dependent on it relationship in the number. eg in a 7 digit number the first digit is multiplied by 7, the next by 6, then 5 etc. The calculated number is then divided by 11 to give a remainder, and this remainder is subtracted from 11 to give a check digit.
If I've managed to confuse you totally, then sorry, but I didn't want to go on too long. Try
for a much better description of mod11, and
or
for a mod10.
HTH
Marc