Just like we discussed bitwise operator &, we will discuss this operator with the help of statement if.
Statement if for || (OR)
condition 1 condition 2 result
false false false
true false true
false true true
true true true
So, just like the if statement , the operator | t\does the same but with bits.
example
000001110100
|
000000011100
=
000001111110
Statement if for || (OR)
condition 1 condition 2 result
false false false
true false true
false true true
true true true
So, just like the if statement , the operator | t\does the same but with bits.
example
000001110100
|
000000011100
=
000001111110
No comments:
Post a Comment