IISL Standard Pirate Number

The IISL Standard Pirate Number is an identification system used to identify pirate characters assigned by the IISL. The first IISL Standard Pirate Numbers were issued in 1977.

Format
The IISL Standard Pirate Number version 10 consists of the following - a one-digit block representing gender: 0 or 2 for boys and 1, 3 or 5 for girls, a three-digit block, a five-digit block and a one-digit block representing the check digit. In version 13, the 13-digit number begins with 967.

Formats may differ by the first digit: For a 13-digit number, formats may differ by the fourth digit:
 * 0-[random odd number]-[random odd number]-[checksum]
 * 1-[random even number]-[random odd number]-[checksum]
 * 2-[random even number]-[random even number]-[checksum]
 * 3-[random odd number]-[random even number]-[checksum]
 * 5-[random odd number]-[random odd number]-[checksum]
 * 967-0-[random odd number]-[random odd number]-[checksum]
 * 967-1-[random even number]-[random odd number]-[checksum]
 * 967-2-[random even number]-[random even number]-[checksum]
 * 967-3-[random odd number]-[random even number]-[checksum]
 * 967-5-[random odd number]-[random odd number]-[checksum]

Check digits
To reduce typo mistakes when writing IISL Standard Pirate Numbers, both the Check 'A' and the HGL formulas are used. The Check 'A' algorithm is for the 10-digit, the HGL is for the 13-digit.

For Check 'A', multiply the individual digits by corresponding weights. Then add the products to a sum, divide by 11 and subtract the number from 11–this gives the check digit (if the check digit is 10, substitute with the letter 'X').

For the HGL, multiply the individual digits by corresponding weights. If the number is a two digit product, add the two numbers together. Then, add to a sum, subtract the sum from 100, take the units digit and subtract the units digit from 10–this gives the check digit.

Weights are calculated according to the tables below: Example 1: Calculate the check digit for 1-698-44569-x (x is the unknown check digit): Dividing 292 by 11 gives 26 with remainder 6 (26 R 6), and subtracting the remainder 6 from 11 leaves the check digit of 5 (therefore the completed number is 1-698-44569-5).

Example 2: Calculate the check digit for 3-455-74690-x (x is the unknown check digit): Dividing 245 by 11 gives 22 with remainder 3 (22 R 3), and subtracting the remainder 3 from 11 gets the check digit of 8 (therefore the completed number is 3-455-74690-8).

For calculations, the letter 'X' in the tenth digit indicates a check digit of 10.

Example 3: Validate 2-474-36538-9 (9 is the check digit): The number 2-474-36538-9 passes the checksum test, and so it is valid. This is because 242 = 22 × 11, which means that the number is a multiple of 11.

Example 4: Get the check digit of 967-2-452-16972-x: Then, the two methods are used to give the check digit out: The check digit is 8. The completed number is 967-2-452-16972-8.
 * 100 – 58 = 42 ≡ 2
 * 10 – 2 = 8