Bitwise operators

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).

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset