A seven-bit weighted code, two bits of which are used to indicate whether the encoded number (a decimal digit) is or is not at least 5 in value, the remaining five bits comprising four zeros and a single one whose position is used to determine the number completely. Thus from left to right the weights of the bits are 5, 0, 4, 3, 2, 1, and 0. The weighted sum gives the value of the encoded decimal digit; for example, 3 is represented by
0101000
and 9 is represented by
1010000