OrBit Function

Bitwise OR operation of two integer numbers


Function

The function OrBit performs a bitwise OR operation of two natural numbers or lists. OrBit is different from OrBitX in the handling of lists.


Syntax

OrBit (a, b)

OrBit (a, list)

OrBit (list, list)

Example

OrBit(12,7)= 15


If one argument is a list and the other is a natural number, each element in the list is OR operated with the number.

OrBit([9,10,11,12,13,14,15],24)= 25 26 27 28 29 30 31


If both arguments are lists, each element of the first list is OR operated to the corresponding element of the second list.

AndBit([8,9,10],[7,8,9])= 15 9 11


If two lists have different lengths, the overhang of the longer list is ignored.