Function Bitwise Class

XorValuesAlt

"Binary Exclusive Or Alternate" Perform the logical "Xor" ("Exclusive Or") operation on the corresponding bits from two values. Similar to the XorValues function except that this one performs the Xor operation four bytes at a time.

Signature (Visual Basic / VBA)

Public Function XorValuesAlt( _
      ByVal vOne As Variant _
    , ByVal vTwo As Variant _
    ) As Variant

Code Examples

    XorValuesAlt(23, 45) = 58
    XorValuesAlt(23, "A") = Chr$(0) + Chr$(86)
    XorValuesAlt("A", "B") = Chr$(3)
    XOR     Var2
             0 1
           +-----
    Var1 0 | 0 1
         1 | 1 0

Parameters

Parameter Description
vOne First of two values whose corresponding bits are to be operated upon.
vTwo Second of two values whose corresponding bits are to be operated upon.

Notes & Version History

Note This function uses the FixUpBitwiseArguments function to decide how the bits within the two values should be coerced to Strings then aligned.