Cookie policy: This site uses cookies (small files stored on your computer) to simplify and improve your experience of this website. Cookies are small text files stored on the device you are using to access this website. For more information please take a look at our terms and conditions. Some parts of the site may not work properly if you choose not to accept cookies.

Join

Subscribe or Register

Existing user? Login

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

  • Print
  • Share
  • Comment
  • Save
  • Print Friendly Version of this pagePrint Get a PDF version of this webpagePDF

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!

Have your say

For commenting, please login or register as a user and agree to our Community Guidelines. You will be re-directed back to this page where you will have the ability to comment.

  • Print
  • Share
  • Comment
  • Save
  • Print Friendly Version of this pagePrint Get a PDF version of this webpagePDF

From: Beyond pharmacy blog

Take a look here for thoughts and musings beyond the pharmacy realm

Newsletter Sign-up

Want to keep up with the latest news, comment and CPD articles in pharmacy and science? Subscribe to our free alerts.