CT_NUMXOR

 NUMXOR()
 Performs a 16-bit "XOR" of two numbers
------------------------------------------------------------------------------
 Syntax

     NUMXOR(<nWORD1|cHexWORD1>,<nWORD2|cHexWORD2>)
         --> nWORD-XOR

 Argument

     <nWORD1|cHexWORD1> and <nWORD2|cHexWORD2>  Designates as either
     decimal numbers or hexadecimal digit strings.

 Returns

     The returned value corresponds to all the values designated as
     parameters joined with a logical exclusive OR.

 Description

     Only those bits that are different in the 2-bit fields and that you want
     to link together, are set to 1 in the result value.  Use NUMXOR() to
     encode smaller numbers.

 Note

     .  An invalid parameter returns a result of -1.

 Examples

     .  Link two numbers with NUMXOR():

        Value 1 in binary:      00000011
        Value 2 in binary:      00000101
                                ________
        The result: (6)         00000110
        ? NUMXOR(3, 5)                  // Result:  6

     .  Encode and decode numbers:

        ? NUMXOR(NUMXOR(nNumber, 9), 9)

See Also: NUMAND() NUMNOT() NUMOR() SETBIT() ISBIT()



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.