[expr.xor] # 7 Expressions [[expr]](./#expr) ## 7.6 Compound expressions [[expr.compound]](expr.compound#expr.xor) ### 7.6.12 Bitwise exclusive OR operator [expr.xor] [exclusive-or-expression:](#nt:exclusive-or-expression "7.6.12 Bitwise exclusive OR operator [expr.xor]") [*and-expression*](expr.bit.and#nt:and-expression "7.6.11 Bitwise AND operator [expr.bit.and]") [*exclusive-or-expression*](#nt:exclusive-or-expression "7.6.12 Bitwise exclusive OR operator [expr.xor]") ^ [*and-expression*](expr.bit.and#nt:and-expression "7.6.11 Bitwise AND operator [expr.bit.and]") [1](#1) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/expressions.tex#L7693) The ^ operator groups left-to-right[.](#1.sentence-1) The operands shall be of integral or unscoped enumeration type[.](#1.sentence-2) The usual arithmetic conversions ([[expr.arith.conv]](expr.arith.conv "7.4 Usual arithmetic conversions")) are performed[.](#1.sentence-3) Given the coefficients xi and yi of the base-2 representation ([[basic.fundamental]](basic.fundamental "6.9.2 Fundamental types")) of the converted operands x and y, the coefficient ri of the base-2 representation of the result r is 1 if either (but not both) of xi and yi is 1, and 0 otherwise[.](#1.sentence-4) [*Note [1](#note-1)*: The result is the bitwise exclusive or function of the operands[.](#1.sentence-5) — *end note*]