Check a code digit

Logical thinking · Suggested grades 3

Check a code digit

Download video
Open Chinese transcript
  1. 本题规则是:四位码的末位,要等于前三位数字和的个位。收到的码是3521。
  2. 先只算前三位:3加5加2等于10。
  3. 10的个位是0,所以按规则,正确校验位应该是0。
  4. 收到的末位却是1,1不等于0,因此这个编码没有通过检查。
  5. 改成3520后,末位0与计算结果一致,可以通过这条规则。
  6. 这条简单检查只能说明3521不合规则,不保证发现或定位所有可能的抄写错误,规则边界也要一起说明。
Sources for this explanation

Logical thinking

Compute the stated check digit, compare it with the received last digit, and state the rule’s limit.

Worked example

Four-digit rule: the last digit equals the ones digit of the sum of the first three. Does 3521 pass, and what should the check digit be?

3+5+2=10, whose ones digit is 0, so received check digit 1 fails and the correct digit is 0.

Try one question

For first digits 4,6,3, what check digit is required?