Node:Bitwise inclusive OR, Next:Bitwise exclusive OR (XOR/EOR), Previous:Bitwise AND, Up:Truth tables and bit masks
Bitwise inclusive OR
Bitwise OR operates on two values, for example 0 | 1
. The result
is 1 if the first value or the second value is 1, or both
are 1. As a truth table this would be summarized as follows:
value1 | value2 | result
|
0 | 0 | 0
|
0 | 1 | 1
|
1 | 0 | 1
|
1 | 1 | 1
|