Check a code digit
Check a code digit
The video could not load. Check your connection and try again, or download it directly.
Download video
Open Chinese transcript
- 本题规则是:四位码的末位,要等于前三位数字和的个位。收到的码是3521。
- 先只算前三位:3加5加2等于10。
- 10的个位是0,所以按规则,正确校验位应该是0。
- 收到的末位却是1,1不等于0,因此这个编码没有通过检查。
- 改成3520后,末位0与计算结果一致,可以通过这条规则。
- 这条简单检查只能说明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
4+6+3=13, whose ones digit is 3.