The  logo
Follow our blogs feed  blogs feed

Brought to book: putting the modulus 10 algorithm to practical use

By Footler
20 Feb 2010

I am a man of merely average mathematical ability, although few outside pharmacy will better my dextrous use of the 28-times table. In a quiet moment, however, I do enjoy tackling mathematical puzzles and take some delight in exploring curious formulae. Who, I might ask myself, thought of that? Or why? And what can you do with it?

Take a look at a modulus 10 algorithm, for instance. This was created by computer scientist Hans Peter Luhn and here is an example of what it can do.

You will find a row of 13 numbers, usually associated with a bar-code, on the back cover of most books. This is not just a random figure. It is an International Standard Book Number (ISBN). Being unique to each publication, an ISBN is necessary so that the book trade can identify, locate, order and sell the book. Until three years ago it would have had 10 digits and was calculated using another special formula but I will tease you by saving that for another day.

The 13-digit number in current use is made up of five separate elements: a prefix, a registration group, the registrant, a publication element and the all-important check digit. The check digit enables computer software to validate that the complete ISBN is correct thus avoiding mistakes when making and dispatching orders. Credit card numbers use check digits for a similar reason.

The check digit of an ISBN is calculated using a modulus 10 algorithm. Here is an example using the ISBN 978 0 85369 783 1, which I have taken from the dispensary bookshelf.

Each of the first 12 digits must be alternately multiplied by one or by three. Then the sums are totalled. Thus we take (9 x 1) + (7 x 3) + (8 x 1) + (0 x 3) and so on. I have done it for you this time.

The total is 129. Next, divide this total by 10 and note the remainder. Here it is 9. Subtracting the remainder from 10 gives the check digit. In this case it is 1. If there is no remainder the check digit is taken to be zero. So there you are!