Bitwise Operator:
The table for explanation of bitwise operator is given below.
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.
The table for explanation of bitwise operator is given below.
| Operator | Expression | Result |
|---|---|---|
| & | 9&3 | 1 |
| | | 3|4 | 7 |
| ~ | ~8 | -9 (one's complement) |
| ^ | 3^5 | 6(exor same 0 different 1) |
| >> | 78>>2 | 19 (right shift) |
| << | 9<<3 | 72 (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:
| Operator | Expresion/ example | |
|---|---|---|
| = | x=9 | |
| +=, -=, *=, /=, %= | x+=8 | |
| &=, |=,^= | 6^=2 | |
| >>=, <<= | 4>>=2 |
Be First to Post Comment !
Post a Comment