Welcome

Welcome to Baqer J. Al-Lawati blog.

Friday 22 November 2013

ISBN Calculations (Check Digit)

During the design stage, the designer has to limit the chances of inaccurate data. Therefore, validation checks have to be established. These checks include:-

1) Range Check: Checks whether data is within acceptable boundaries.

2 ) Length Check: Checks if the data is entered with the required number of characters

3) Character Check: Checks that the data entered doesn't include invalid characters

4) Picture Check: Checks that data is entered in a specific format.

5) Limit Check: Similar to "Range Check", only it has one boundary.

6) Presence Check: Checks that data is actually present.

7) Consistency Check: Checks that data field tie up with each other

8) Check Digit: Performs complex calculations on a range of numbers, then compares them with the check digit. (We'll go into this more deeply with the ISBN calculations)

 

  1. Take the first 12 digits of the 13-digit ISBN
  2. Multiply each number in turn, from left to right by a number. The first digit is multiplied by 1, the second by 3, the third by 1 gain, the fourth by 3 again, and so on to the eleventh which is multiplied by 1 and the twelfth by 3.
  3. Add all of the 12 answers.
  4. Do a modulo 10 division on the result from step 2. (Don't know what a modulo 10 division is? It's easy. It's just the remainder from a whole number division by 10. I bet you learned to do that in junior school, before you even learned about decimal fractions.)
  5. Take that remainder result from step 4.If it's a zero, then the check digit is zero. If the remainders isn't zero then subtract the remainder from 10. The answer to that is your check digit.

 

Let's take #9781861972712# as an example:-

9 x 1 = 9
7 x 3 = 21
8 x 1 = 8
1 x 3 = 3
8 x 1 = 8
6 x 3 = 18
1 x 1 = 1
9 x 3 = 27
7 x 1 = 7
2 x 3 = 6
7 x 1 = 7
1 x 3 = 3
 
Add the results 
9 + 21 + 8 + 3 + 8 + 18 + 1 + 27 + 7 + 6 + 7 + 3 = 118 

Modulo 10 the result
118 modulo 10 = 110 remainder 8
 
Work out the digit
8 doesn't equal zero, so check digit = 10 - 8 = 2 

0 comments:

Post a Comment