Possible Duplicate:
What are bitwise operators?
Recently I came across a few samples that used the | and ^ operator. I am guessing these are or
and negation
operators.
So what actually do these operators stands for?
|
= (bitwise/non-short-circuiting) "or"^
= "xor"and for info, "not" (bitwise negation) is ~
If you apply it to integral types, they are bitwise or and xor operator. However if you apply them to boolean types, they are logical or and xor. Look at an explanation of or operator and xor operator
You can get more details on boolean operations from the wikipedia truth table
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With