BitOr


BitOr(x, I)

Returns the bitwise OR of the integer portions of an array of numbers. Each bit in the result is on only if it is on in every integer in «x» along index «I». «I» can be omitted when taking the bitwise AND across the Implicit dimension.

Each integer may have up to 64 bits.

Examples

To find the bitwise OR of three numbers, the numbers can be listed in brackets (the implicit index) and the index parameter omitted.

BitAnd([21, 13, 25]) → 29

This is more obvious when we write these same numbers in binary notation:

BitAnd([0b10101, 0b01101, 0b11001]) → 0b11101

Suppose x is the following 2-D array of integers

BitOr x.png

which is shown here in binary notation

BitOr x binary.png

then

BitOr(x, I) →
BitOr result1d.png
=
BitOr result1.png
BitOr(x, J) →
BitOr result2.png

History

Introduced in Analytica 5.0.

See Also

Comments


You are not allowed to post comments.