Introduction to OR Operator
Let's see another Bitwise operator 'OR'. This outputs 1 unless both inputs are 0.
We'll cover the following...
What is the Bitwise OR operator?
This is the same as the OR gate we studied in the digital electronics chapter, as shown below:
The Bitwise OR operator is denoted by |
. When an OR gate is given with two inputs, the corresponding outputs will be:
- If two input bits are 0, the output is 0.