Hi
I am obviously not understading the check digit caclulastion for a UPC-13 barcode. or is that EAN-13. Anyway a 13 digit barcode.
I have written something that just makes sure the barcode entered is valid, by chec k the digits against the check digit.
This works with all the barcodes except this one book I have.
the barcode is 9780450022852
now from my understanding if I add the odd digits i get
9+8+4+0+2+8=31
times by 3
31*3 = 93
add the even digits
93+7+0+5+0+2+5=112
the next higher multiple of 10 is 120
120 - 112 = 8
but the barcode check digit is 2
this is for a book as you can see from the 978
This is actually printed on the book and, what's worse, the check digit calculator on this site calcualtes 2 as the check digit, not 8.
Is it actually the nearest multiple rather than the next higher multiple??
please tell my I'm an idiot and have forgotten missed something.
regards
Steve
Edited by harker on June 17 2006 at 2:36am
