通用产品代码 (Universal Product Code)

特性

识别

从左到右扫描, 将第一个黑条长度定为长为 1 位的标准长度, 并对下一个白条采取相同的措施; 完成 95 位标准长度的识别.

校验

解码

BBBAABA = 0
BBAABBA = 1
BBABBAA = 2
BAAAABA = 3
BABBBAA = 4
BAABBBA = 5
BABAAAA = 6
BAAABAA = 7
BAABAAA = 8
BBBABAA = 9

To the extent possible under law, the person who associated CC0 with this work has waived all copyright and related or neighboring rights to this work.