Bitwise AND and OR

BlitzMax Forums/BlitzMax Programming/Bitwise AND and OR

AND is &
OR is |
XOR is ~

XOR is ~

Thanks

~ is for bitwise compliment too... :o)
A ~ B = A XOR B
     _
~A = A


In other words

AND is &
OR is |
XOR is ~
NOT is ~

As per previous discussions in other threads, when you do:

a=~b

it does a `NOT B` operation and puts it in a

When you do:

a=b~c

(ie when you include a second variable), it does a `B XOR C` operation and puts it in a.

Cool :)