Motor vehicles have a 17-character Vehicle Identification Number or VIN on a metal plate like the one below, usually on the driver’s side dashboard, or on the driver’s side door jamb, or in front of the engine block:
VINs offer an interesting example of check digit calculation. The central digit (or an X representing 10) is a check digit (calculated modulo 11) used to detect errors. Any letters in the rest of the VIN are decoded like this:
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z |
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | – | 1 | 2 | 3 | 4 | 5 | – | 7 | – | 9 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
The check digit calculation involves decoding the VIN, and multiplying the resulting numbers by the weights shown in blue, giving the products in purple:
VIN | L | J | C | P | C | B | L | C | X | 1 | 1 | 0 | 0 | 0 | 2 | 3 | 7 |
Decoded | 3 | 1 | 3 | 7 | 3 | 2 | 3 | 3 | 10 | 1 | 1 | 0 | 0 | 0 | 2 | 3 | 7 |
Weights | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 10 | 0 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 |
Product | 24 | 7 | 18 | 35 | 12 | 6 | 6 | 30 | 0 | 9 | 8 | 0 | 0 | 0 | 8 | 9 | 14 |
These products are added up modulo 11 (meaning the sum is divided by 11 and the remainder taken). In this case, the sum is 186 = 10 = X (mod 11), which makes the VIN valid, because it matches the original central X. What about the VIN on your vehicle?