BitOr

Revision as of 19:26, 31 December 2015 by Lchrisman (talk | contribs) (Created page with "category:Bit functions ''new in Analytica 4.7'' == BitOr( x'', I'' ) == Returns the bitwise OR of the integer portions of an array of numbers. Each bit in the resul...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


new in Analytica 4.7

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

See Also

Comments


You are not allowed to post comments.