Skip to main content
Version: 2.18.x.x LTS

Binary Number Manipulations

As JUEL does not provide operators for binary numbers, data functions are provided for this purpose. They can be applied on int and on long integral numbers.

Every function is provided with either the int or the long prefix. For example: int:binaryAnd.

The list of functions:

prefix:binaryAnd(num1, num2)
prefix:binaryOr(num1, num2)
prefix:binaryXor(num1, num2)
prefix:binaryNot(num)
prefix:binaryShiftLeft(num1, num2)
prefix:binaryShiftRight(num1, num2)
prefix:binaryUnsignedShiftRight(num1, num2)

In addition, functions to conversion between int and long are provided:

int:toLong(num)
long:toInt(num)