
On Sunday, September 8, 2002, at 09:34 pm, Björn De Meyer wrote:
Reuben Thomas wrote:I'll add this routine (and band and bor) to the Lua standard libraries project, for those who have a similar problem.  http://www.mupsych.org/~rrt/  wit, n. educated insolence (Aristotle)Well, bor is simply the sum of two positive numbers, IIRC.
Bit OR is analogous to addition, and often uses the same notation for it's operator. However, if you add two numbers, the result's bit vector will not (in general) be an elementwise xor of the argument's bit vectors.
Similarly, bit AND is analogous to multiplication, but (in general) multiplying two bit vectors wont yield their elementwise AND as a result.
Cheers, Benjohn