July 1998
Intermediate to advanced
1456 pages
65h 5m
English
^ — NN 2 IE J1 ECMA 1
The bitwise exclusive OR (XOR) operator. This operator performs binary math on two operands (their binary values). Each column of bits is subjected to the Boolean XOR operation. If the value of a column in either operand (but not both operands) is 1, the result for that column position is 1. All other combinations yield a 0. The resulting value of the operator is the decimal equivalent of the binary result. For example, the binary values of 3 and 6 are 0011 and 0110, respectively. After an XOR operation on these two values, the binary result is 0101; the decimal equivalent is 5.
var n = 3 ^ 6
Read now
Unlock full access