The bitwise OR operator is a fundamental operator in computer science and digital electronics,
used to manipulate data at the bit level.
This operator is represented by the symbol | in most programming languages.
It performs a binary OR operation on two binary numbers,
comparing corresponding bits and producing a new binary number as the result.
The bitwise OR operator works by comparing each bit of its operands.
If either bit at a given position is 1, the result at that position is 1;
otherwise, it is 0.
Inputs | ||
---|---|---|
Input A | Input B | Output |
0 | 0 | 0 |
1 | 0 | 1 |
0 | 1 | 1 |
1 | 1 | 1 |