I am doing a project on ISBN barcode scanning. I have tried many scanning applications but after scanning this barcode:
the app only gives me back the barcode 9780749423490. But what I need to obtain is the ISBN code 0749423498 instead, as it is in the database of my library. Is there any method to get it?
Can anyone explain the difference between these two codes? Why is the barcode number and ISBN barcode number different? Is it the same for some books and different for some ? thanks!
It looks like the confusion is the difference between the "ISBN 10" and "ISBN 13" standards.
The ISBN Agency website FAQ says:
"Does the ISBN-13 have any meaning imbedded in the numbers?
The five parts of an ISBN are as follows:
1. The current ISBN-13 will be prefixed by "978"
2. Group or country identifier which identifies a national or geographic grouping of publishers
3. Publisher identifier which identifies a particular publisher within a group
4. Title identifier which identifies a particular title or edition of a title
5. Check digit is the single digit at the end of the ISBN which validates the ISBN"
So the 978 is clearly just filler. After that, the next 9 numbers are obviously the same in both numbers. The last digit in both numbers is a check digit, which is different in ISBN 10 and ISBN 13. See this Wikipedia article for details, but the two formulas are:
For ISBN 10 (the top one), the sum of all digits multiplied by mutlipliers 10-9-8-7-6-5-4-3-2-1 mod 11 should be 0:
0*10 + 7 *9 + 4*8 + 9*7 + 4*6 + 2*5 + 3*4 + 4*3 + 9*2 + 8*1 % 11 == 0
For ISBN 13 (the bottom one) the sum of the odd digits * 1 plus the sum of the even digits * 3 should be 0. This is including the leading 978. (this is similar to the UPC code as "user..." mentioned but a little different as noted in the Wikipedia article):
9*1 + 7*3 + 8*1 + 0*3 + 7*1 + 4*3 + 9*1 + 4*3 + 2*1 + 3*3 + 4*1 + 9*3 + 0*1 % 10 == 0
So you can get the ISBN 10 code (top) from the ISBN 13 (bottom) code as follows:
isbnBaseCode = <9780749423490 from the 4th to 12th characters>
isbn10CheckDigit = 11 - (isbnBaseCode[0]*10 + isbnBaseCode[1]*9 + ... + isbnBaseCode[8]*2) % 11
isbnCode10 = isbnBaseCode + isbn10CheckDigit