xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

NumXorX()

Performs a bitwise XOR operation with two numeric integer values.

Syntax

NumXOR( <nMaxBits>, ;
        <nInteger1>|<cHex1>, ;
        <nInteger2>|<cHex2>  ) --> nInteger

Arguments

<nMaxBits>
This numeric value specifies the number of bits to use in the operation, beginning with the least significant bit (LSB). The value of <nMaxBits> must be in the range between 1 and 32.
<nInteger1> and <nInteger2>
Two numeric integer value can be specified for both parameters.
<cHex1> and <cHex2>
Alternatively, the two integers can be specified as hex-encoded character strings (see NumToHex()).

Return

The function returns the result of an exclusive OR operation with <nMaxBits> bits of both parameters as a numeric value. The bits are set in the result where the bits of both parameters are different.

Info

See also:IsBit(), NumAndX(), NumNotX(), NumOrX(), NumXOR(), SetBit()
Category: CT:NumBits , Bitwise functions , Numbers and Bits , xHarbour extensions
Source:ct\bit1.c
LIB:xhb.lib
DLL:xhbdll.dll


Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe