AND

The AND operation compares each bit in two integers; if both bits are set to “1”, then the final result will be “1”, otherwise it will be “0”. This is done “per-bit”, or “bitwise”. Truth Table: AND 1 0 1 1 0...

Bitwise Operators

Bitwise operators are used to manipulate integers that represent bitfields. Click on an operator below to scroll directly to the position of its description. Operator Name Usage Reference & AND integer & integer = integer | OR integer | integer = integer ~...

NOT

NOT is unlike the other bitwise operators in that it does not perform an operation on two bitfields. It only performs an operation on one. What it does is reverse the bitfield; if a bit was previously 0, it is changed to 1, and vice versa.   Truth Table: NOT   1 0 0 1...

OR

OR places a 1 in the bitfield if either bitfields passed to it have a 1 in that position. If neither has a 1, it places a 0 in that position. Truth Table: OR 1 0 1 1 1 0 1 0 Usage: // A bitfield whose binary representation is: 00000000000000000000000000001010 integer...