Error getting tags :
error 404Error getting tags :
error 404 bitOr | revDocs | RunRev
Welcome Guest (Log in)
Product Edition
Version
bitOr
Basics
Expander triangle
Type
Operator
Syntax
number1 bitOr number2
Introduced
1.0
Environment
Desktop, Web and Server
Platform Support
MacOS,Mac OS X,Windows,Linux
Security
None required
Summary
Performs a "bitwise or" operation on the binary representation of two numbers.
Examples

1 bitOr 0 -- evaluates to 1
6 bitOr 2 -- in binary: 110 bitOr 010; evaluates to 110; converted to 6

Additional Comments
Expander triangle

Use the bitOr operator to operate directly on the bits of two numbers.

Parameters:

The number1 and number2 are numbers, or expressions that evaluate to numbers, between zero and 4,294,967,295 (2^32 - 1).

Comments:

To perform the bitOr operation, Revolution first converts both operands to their binary equivalent, a string of ones and zeroes. 1 is equivalent to true, and 0 is equivalent to false.

For each bit of number1, Revolution performs an or operation with the corresponding bit of number2 to produce a result. A bit is 0 if the corresponding bits of number1 and number2 are both 0. Otherwise, the bit is 1.

Finally, the binary number thus created is converted back to decimal.

User Comments
Expander triangle