Skip to main content

Bitwise logic and shifts

Bitwise AND#

Symbol: _&
Translated to JavaScript bitwise AND operator
It takes 2+ parameters.

_& 0 1
_& 0 1 2

Bitwise OR#

Symbol: _|
Translated to JavaScript bitwise OR operator
It takes 2+ parameters.

_| 0 1
_| 0 1 2

Bitwise NOT#

Symbol: _!
Translated to JavaScript bitwise NOT operator
It takes 1 parameter.

_! 0

Bitwise XOR#

Symbol: _^
Translated to JavaScript bitwise XOR operator
It takes 2+ parameters.

_^ 0 1

Right shift#

Symbol: _>>
Translated to JavaScript bitwise right shift operator
It takes 2+ parameters.

_>> 0 1
_>> 0 1 2

Right unsigned shift#

Symbol: _>>
Translated to JavaScript bitwise right unsigned shift operator
It takes 2+ parameters.

_>>> 0 1
_>>> 0 1 2

Left shift#

Symbol: _<<
Translated to JavaScript bitwise left shift operator
It takes 2+ parameters.

_<< 0 1
_<< 0 1 2