calculating check digit. formula issue
2 posts • Page 1 of 1
calculating check digit. formula issue
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
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
- harker(Legacy Member)
Re: calculating check digit. formula issue
The check digit is the number whihc adds the remainder to 10. So you need a further step: 10-8=2
See explanation here:
http://www.morovia.com/education/utility/upc-ean.asp
See explanation here:
http://www.morovia.com/education/utility/upc-ean.asp
- glitch (legacy member)
2 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 0 guests