BITOR

  • Updated

Returns a bitwise boolean 'OR' of two numbers.

Sample Usage

BITOR(1,5)
BITOR(C5,C6)

Syntax

BITOR(number1,number2)

  • number1 - The first number.
  • number2 - The second number.

Examples

BITOR(1,5) returns a value of 5.
BITOR(C5,C6) returns the bitwise boolean OR of the two numbers contained in C5 and C6.

Notes

  • In the result, each bit position is 1 if any of the parameter's bits at that position are 1.
  • The values returned from the bit positions progress from right to left as powers of 2. The rightmost bit returns 1 (2^0), the bit to its left returns 2 (2^1), and so on.
  • If either argument is less than 0, BITOR returns the #NUM! error value.
  • If either argument is a non-integer or is greater than (2^48)-1, BITOR returns the #NUM! error value.
  • If either argument is a non-numeric value, BITOR returns the #VALUE! error value.