Wiki Home

An Almost Perfect Check Digit Scheme

Namespace: WIN_COM_API
A widely used scheme developed by IBM comes close to being perfect ; it catches all the
single-digit errors and misses only the transposition error 9-0.
The method takes , say, a 13-digit number a(1),a(2),...a(13) and defines the check digit to
-(a(1),a(2),...,a(13))*(2,1,2,1,2,1,...,1,2)-r (mod 10)
where r is the number of the odd-indexed digits, a(1),a(3),a(5)...a(13) that are greater
than 5.

So what's the advantage of this scheme? Fast? Where else is it used? Do you have any sample source? -- Peter Crabtree
Contributors Eduardo Díaz Guerrero
Category Security
( Topic last updated: 2004.08.22 09:37:25 PM )