5.3.3 Bitwise logical operators
The bitwise logical operators are used to perform logical operations on variable values in bits. The following table lists and describes the bitwise logical operators supported by JP1/Advanced Shell.
Bitwise logical operator |
Description |
---|---|
num1&num2 |
Returns the result of bitwise AND operation on num1 and num2. |
num1|num2 |
Returns the result of bitwise OR operation on num1 and num2. |
num1^num2 |
Returns the result of bitwise EXCLUSIVE-OR operation on num1 and num2. |
num1<<num2 |
Returns the result obtained by shifting num1 by num2 bits to the left. |
num1>>num2 |
Returns the result obtained by shifting num1 by num2 bits to the right. |
~num |
This is the result of bitwise negation of num. It returns a complement of 1. |