This page is to help lost souls searching for the algorithm for calculating the last digit (check digit) of the Identification Number of Ocean Ship Containers (according to ISO 6346).After reading through everything on that topic that showed up on Google and Google-groups (spending several hairpulling days) we were unable to determine how exactly to compute the last digit (CRC?) of the 11 digit (actually alphanumeric) number.
All available information on the subject was several commercial products that can calculate it for you (and want money), one algorithm that was incorrect (almost random hits) and a lot of sites that decided that the algorithm is too complicated to be worth mentioning (or attempting).
We wrote a program in java swing which will clarify this mysterious algorithm - source code is available as well as demo.
note* - above is the map (11, 22 and 33 are multiples of the modulus)
note** - 10 is also a possible remainder when we divide by 11 and it must be replaced by 0 although it is recommended that it is not used at all.
Z E P U 0 0 3 7 2 5
maps to :
38 15 27 32 0 0 3 7 2 5
1 2 3 4 16 32 64 128 256 512
38 30 108 256 0 0 192 896 512 2560
reminder mod 11:
4592 mod 11 = 5
Check digit is 5.
CheckDigitApplet.java - the JApplet above
ContCheckDigit.java -static function that does the algorithm
CheckDigitCalculator.java - swing application
|Feel free to use it as you please - we are not
responsible for any harm caused by its use.
(program was written in Netbeans so contact us if you need the .form file)