March 2018
Beginner to intermediate
458 pages
10h 34m
English
Bitwise operators work on bits and perform bit-by-bit operations. The truth tables for &&& (bitwise AND), ||| (bitwise OR), and ^^^ (bitwise exclusive OR) are shown as follows. In the following table, the first variable is X and the second variable is Y:
|
X |
Y |
X &&& Y |
X ||| Y |
X ^^^ Y |
|
0 |
0 |
0 |
0 |
0 |
|
0 |
1 |
0 |
1 |
1 |
|
1 |
1 |
1 |
1 |
0 |
|
1 |
0 |
0 |
1 |
1 |
It also supports ~~~(Unary, effect of flipping bits) , <<< (left shift operator), and >>>(right shift operator).
Read now
Unlock full access