HP 3000 Manuals

Modulus 11 Self-Check Digit [ HP RPG/XL Utilities-Part 3 SIGEDITOR ] MPE/iX 5.0 Documentation


HP RPG/XL Utilities-Part 3 SIGEDITOR

Modulus 11 Self-Check Digit 

To calculate the modulus 11 self-check digit, follow these steps:

   1.  Assign a multiplication factor to each digit position of your
       number as follows:  starting with the rightmost position of your
       number, assign the numbers 2, 3, 4, 5, 6, 7, 2, 3, 4, 5, 6, 7,
       2,...from right to left.

       Example:  If your number is 1 2 3 4 5 6 7, the multiplication
       factor is assigned as follows:

                 Your number:               1  2  3  4  5  6  7

                 Multiplication factor:     2  7  6  5  4  3  2

   2.  Multiply each digit by its multiplication factor.

       Example:

                 Your number:                1  2   3   4   5   6   7

                 Multiplication factor:      2  7   6   5   4   3   2
                 Results after multiplying:  2  14  18  20  20  18  14

   3.  Add the products from the multiplication.

       Example:  2 + 14 + 18 + 20 + 20 + 18 + 14 = 106

   4.  Divide the sum from step 3 by 11.

       Example:  106 divided by 11 is 9 with a remainder of 7.

       If the remainder is 0, the self-check digit is 0.  If the
       remainder is 1, your number does not have a modulus 11 self-check
       digit, and you should not use the number in the fields you define
       with modulus 11 self-check fields.

   5.  Subtract the remainder obtained in step 4 from 11 to obtain the
       self-check digit.

       Example:  The remainder from step 4 is 7; 11 minus 7 is 4, which
       is the self-check digit.



MPE/iX 5.0 Documentation