Skip to main content

Bitwise Operations

Bitwise XOR (^)

variable_1variable_2resultstatus
truetruefalsesame
truefalsetruedifferent
falsetruetruedifferent
falsefalsefalsesame

Bitwise Left Shift (<<)

Bitwise Right Shift (>>)

Bitwise Unsigned Left Shift (<<<)

This operator is a binary operator, denoted by ‘<<<’. It returns the value of the first operand, left shifted by the number of bits specified by the second operand, with zeros placed in the least significant bits.

variable_1variable_2result
112
124
138
1416

Bitwise Unsigned Right Shift (>>>)

This operator is a binary operator, denoted by ‘>>>’. It returns the value of the first operand, right shifted by the number of bits specified by the second operand, with zeros placed in the most significant bits.

variable_1variable_2result
1618
1624
1632