June 16, 2011
Andrew Moylan, Technical Communication & Strategy
Got questions about Mathematica? The Wolfram Blog has answers! We’ll regularly answer selected questions from users around the web. You can submit your question directly to the Q&A Team using this form.
This week’s question comes from Adri, an engineer:
How can I calculate the check digit in freight container codes like MSKU3881107?
We had to start with some quick research for this question: it turns out that freight (shipping) container identification is covered by the ISO 6346 standard (Wikipedia). Under ISO 6346, each container is labeled with an 11-digit code (four letters + seven numerals) in which the last digit is a “check” digit that is computed from the other 10 digits, according to a fixed rule. For example, in MSKU3881107, the final “7” is the check digit.
The rule specified by ISO 6346 for computing the check digit is designed so most accidental changes or misreadings of a single digit in a code will also change the check digit. This means you can use the check digit to catch most such errors; whenever you see a code, you calculate the check digit yourself and see if it matches up with the one in the code.
More »