( Learn how and when to remove this template message) Please be sure that the supposed source of the copyright violation is not itself a Wikipedia mirror.
Please review the source and remedy this by editing this article to remove any non-free copyrighted content and attributing free content correctly, or flagging the content for deletion. This section may have been copied and pasted from another location, possibly in violation of Wikipedia's copyright policy. Its symbol is | which can be called a pipe.
Its result is a 1 if either of the bits is 1 and zero only when both bits are 0. Similar to bitwise AND, bitwise OR performs logical disjunction at the bit level. The most significant bit of the first number is 1 and that of the second number is also 1 so the most significant bit of the result is 1 in the second most significant bit, the bit of second number is zero, so we have the result as 0. Bitwise binary AND performs logical conjunction (shown in the table above) of the bits in each position of a number in its binary form.įor instance, working with a byte (the char type): It is just a representation of AND which does its work on the bits of the operands rather than the truth value of the operands. The bitwise AND operator is a single ampersand: &.