Skip to content

Glossary: Algorithms Beyond the Basics in Java

XOR (exclusive or)

Also written: XOR, ^

A bit operator that gives 1 where two bits differ. Since `x ^ x` is 0, XOR-ing an array cancels pairs and leaves the one unpaired number.

Where the book teaches it

Related terms

bit operators