For product number 854, a4=7, since 8+5+4=17 and 7 is the last digit in 17. The identification number is therefore 8547. The number 1090 would be a valid identification number, since the sum of the first three digits is 10 (1+0+9=10) and 0, the last digit of 10, equals the last digits (the check digit) of 1090. The number 7352 would be invalid, however, since the sum of the first three digits is 15 (7+3+5=15) and 5, the last digit of 15, does not equal 2, the last digit (the check digit) of 7352.
The check digit or digits can appear in any position in the number. However, the check often appears at the end as last digit in the identification number.