In most barcodes used today each digit is encoded as 7 bits. The coding used isn't the regular binary representation of the digit being encoded. The left and right halves of the code use entirely different coding schemes, too, which allows the scanning machine to determine whether the product being scanned is upside down or not. The codes used are as follows (go and find a tin of beans or something if you don't believe me):

```DIGIT   LEFT SIDE   RIGHT SIDE
0      0001101     1110010
1      0011001     1100110
2      0010011     1101100
3      0111101     1000010
4      0100011     1011100
5      0110001     1001110
6      0101111     1010000
7      0111011     1000100
8      0110111     1001000
9      0001011     1110100
```

The code on the left and right is "101" (or 5, if you like) and the code in the centre is "01010" (or 10).

It is hard to see how people read it as 666. To say "most bar codes have a double bar in those spaces. That is a 6" is misleading. The binary representation of 6 is "110" which would be a single fat bar followed by a space. What we actually see in the centre of a barcode is two twin bars with spaces before, after and between them, or "01010".