Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - xor() perform a bitwise exclusive or on two arguments http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 xor()               Perform a bitwise exclusive OR on two arguments
------------------------------------------------------------------------------
 Declaration
   bit.hdr

 Syntax
   func uint xor extern
   param value uint uNumber1, ;
         value uint uNumber2

 Arguments
   uNumber1 is a numeric expression.
   uNumber2 is a numeric expression.

 Return
   The result of the XOR operation.

 Description
   The xor() function performs a bitwise XOR on the two parameters uNumber1
   and uNumber2.

 Example
   #define EXAMPLE_MATH
   #include example.hdr

   proc Test_xor
   /* decimal representation   binary representation
   
            7                           00000111
            2                           00000010
                 XOR                    --------
            5                   Result: 00000101
   */
   ? xor( 7, 2 )                   // prints 5
   ? xor( 00000111B, 00000010B )   // prints 5
   endproc

   proc main
   Test_xor()
   endproc

See Also: and() not() or()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson