xnor()

Performs a bitwise XNOR (NOT XOR) operation on one or more integers.

Syntax

xnor(value1, [value2, ...])

Parameters

Parameter Type Description
value1 Number The first integer value.
value2..N Number Additional integer values to apply XNOR with. optional

Return Value

Examples

Single value, returns NOT of itself

xnor(5);      // returns 4294967290 (~5)

Bitwise XOR of 5 (0101) and 3 (0011) → 0110
Bitwise NOT of 0110 → 1001

xnor(5, 3);   // returns 4294967289

Bitwise XOR of 1 (0001), 2 (0010), and 3 (0011)

Bitwise NOT of 0000 → 1111

xnor(1, 2, 3); // returns 4294967295

See also

bit
not
and
or
xor
nand
nor
xnor
shl
shr