Manuals/calci/BITOR

From ZCubes Wiki
Revision as of 05:50, 4 May 2017 by Swapna (talk | contribs) (Created page with "<div style="font-size:30px">'''BITOR(n1,n2)'''</div><br/> *where <math>n1</math> and <math>n2</math> specify the numeric values on which the bitwise OR operation is to be per...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
BITOR(n1,n2)


  • where and specify the numeric values on which the bitwise OR operation is to be performed.


Description

  • BITOR() returns the result of bitwise OR operation performed on numeric values.
  • and must be in decimal form and greater or equal to '0'.
  • Each bit is set to 1 if the corresponding bit is either or is 1. The bit is set to 0 only if the corresponding bit is 0 in both and .
  • If either argument is a non-numeric value, BITOR returns the #VALUE! error value.

For Example,

BITOR(1,6) = 7 (The binary representation of 1 is 1, and the binary representation of 6 is 110. Result is returned as 7 i.e 111.

BITOR(true, true) = 1 (Bit AND value of 'true' is '1'. Hence result is 1.)


Examples

  1. =BITOR(3,5) = 7
  2. =BITOR(17,-22) = -5
  3. =BITOR(-9,-3) = -1
  4. =BITOR(0.5,0.1) = 0
  5. =BITOR(12, 7) = 15


Related Videos

BITWISE OPERATORS


See Also


References