Quote:
Like C, Perl has bitwise AND, OR, and XOR (exclusive OR) operators: &, |, and ^. Note from the table at the start of this section that bitwise-AND has a higher precedence. These operators work differently on numeric values than they do on strings. (This is one of the few places where Perl cares about the difference.) If either operand is a number (or has been used as a number), then both operands are converted to type integer, and the bitwise operation is performed between the two integers. These integers are guaranteed to be at least 32 bits long, but may be 64 bits on some machines. The point is that there's an arbitrary limit imposed by the machine's architecture.
If both operands are strings (and have not been used as numbers since being set), these operators do bitwise operations between corresponding bis from the two strings. In this case, there's no arbitrary limit, since strings aren't arbitrarily limited in size. If one string is longer than the other, the shorter string is considered to have a sufficient number of 0 bits on the end to make up the difference.
So that's the formal answer. I'm afraid I can't explain it much further in laymans terms either, because I'm not much of an expert on bitwise operations. However, as an alternative to Javascript, I would think that PHP would be a much better language to be writing your application in. It would be much better equipped to store information like that client-side, and their functions for retrieval are very easy if you are at all familiar with perl. It also has support for the XOR operator. It's just