Operator | Compatible types | Description |
& | Integer |
Performs a bitwise ‘and’ operation and returns the result: var x = 4 & 2; |
| | Integer |
Performs a bitwise ‘or’ operation and returns the result: var x = 4 | 3; |
^ | Integer |
Performs a bitwise ‘xor’ operation and returns the result:var x = 4 ^ 1; |
<< | Integer |
Shifts the lhs value by rhs bits to the left, and returns the result: var x = 9 << 2; |
>> | Integer |
Shifts the lhs value by rhs bits to the right, and returns the result: var x = 8 >> 3; |
Bitwise
- Updated
Comments
0 comments
Please sign in to leave a comment.