Wilang Documentation1.0.0+4

bitOr#

Bitwise OR operation. Performs the logical inclusive OR operation on each pair of corresponding bits of the two given values. The result in each position is 1 if the first bit is 1 or the second bit is 1 or both bits are 1, otherwise, the result is 0.

Available in: math cells, REPL.

Syntax#

x | y
bitOr(x, y)

Arguments and behavior#

Arguments must match one of the syntax forms above. Use the example as a starting point; arrays and numeric types are accepted only by compatible overloads. The example returns scalar (number).

Example#

Edit the inputs, then use Run or Reset. Changes stay in this example.

Example
bitOr(4,1)

Expected result: 5.

See also#

bitAnd · bitNot · bitXor · leftShift · rightArithShift · rightLogShift

All functions · Math guides