Binary operations
|
Operator |
Parameter types |
Result |
|
x >> y |
x,y - integer type values |
The right-shift operator (>>) shifts x right by the number of
bits specified by y. |
|
x << y |
x,y - integer type values |
The left-shift operator (<<) shifts x left by the number of
bits specified by y. |
|
~x |
x - integer type value |
Performs a bitwise complement operation on x |
|
x&y |
x,y - integer type values |
Computes the logical bitwise AND of x and y |
|
x|y |
x,y - integer type values |
Computes the logical bitwise OR of x and y |
|
x^y |
x,y - integer type values |
Computes the logical bitwise XOR of x and y |