Social Media

12/23/2018

Bitwise and Assignment Operator

Bitwise Operator:
The table for explanation of bitwise operator is given below.
OperatorExpressionResult
&9&31
|3|47
~~8-9 (one's complement)
^3^56(exor same 0 different 1)
>>78>>219 (right shift)
<<9<<372 (left shift)

Bitwise operator are those operators which works on bits. First you have to convert the operands into binary and then apply the operation to get the result.

Assignment Operator:
The table for assignment operator is as follows:
OperatorExpresion/ example
=x=9
+=, -=,  *=, /=, %=x+=8
&=, |=,^=6^=2
>>=, <<=4>>=2


Be First to Post Comment !
Post a Comment