Difference between revisions of "Manuals/calci/BITOR"

From ZCubes Wiki
Jump to navigation Jump to search
 
Line 1: Line 1:
<div style="font-size:30px">'''BITXOR(n1,n2)'''</div><br/>
+
<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 XOR operation is to be performed.
+
*where <math>n1</math> and <math>n2</math> specify the numeric values on which the bitwise OR operation is to be performed.
  
  
 
== Description ==
 
== Description ==
  
*BITXOR() returns the result of bitwise XOR operation performed on numeric values.
+
*BITOR() returns the result of bitwise OR operation performed on numeric values.
*<math>n1</math> and <math>n2</math> must be greater or equal to '0'.
+
*<math>n1</math> and <math>n2</math> must be in decimal form and greater than or equal to 0.
*In the result, each bit position is 1 if the values of the parameters <math>n1</math> and <math>n2</math> at that bit position are not equal; in other words, one value is 0 and the other is 1.
+
*In the result, each bit position is 1 if any of the parameter's <math>n1</math> or <math>n2</math> bits at that position are 1.
*If either argument is a non-numeric value, BITXOR returns the #VALUE! error value.
+
*If either argument is a non-numeric value, BITOR returns the #VALUE! error value.
  
 
For Example,
 
For Example,
  
BITXOR(1,6) = '''7'''   
+
BITOR(1,6) = '''7'''   
  
BITXOR(true, true) =  '''0'''  
+
BITOR(true, true) =  '''1'''  
  
  
 
== Examples ==
 
== Examples ==
  
#=BITXOR(3,5) = 6
+
#=BITOR(3,5) = 7
#=BITXOR(17,-22) = -5
+
#=BITOR(17,-22) = -5
#=BITXOR(-9,-3) = 10
+
#=BITOR(-9,-3) = -1
#=BITXOR(0.5,0.1) = 0
+
#=BITOR(0.5,0.1) = 0
#=BITXOR(12, 7) = 11
+
#=BITOR(12, 7) = 15
  
  
Line 34: Line 34:
 
==See Also==
 
==See Also==
  
*[[Manuals/calci/BITOR | BITOR]]
+
*[[Manuals/calci/BITXOR | BITXOR]]
 
*[[Manuals/calci/BITAND | BITAND]]
 
*[[Manuals/calci/BITAND | BITAND]]
 
*[[Manuals/calci/BITNOT  | BITNOT]]
 
*[[Manuals/calci/BITNOT  | BITNOT]]

Latest revision as of 07:20, 5 May 2017

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 than or equal to 0.
  • In the result, each bit position is 1 if any of the parameter's or bits at that position are 1.
  • If either argument is a non-numeric value, BITOR returns the #VALUE! error value.

For Example,

BITOR(1,6) = 7

BITOR(true, true) = 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