Skip to content

Glossary: Algorithms Beyond the Basics in Rust

XOR (exclusive or)

Also written: XOR, ^, exclusive or

A bit operation that gives 1 where two bits differ. Because `x ^ x` is 0, XORing a list cancels pairs and leaves the one unpaired value.

Where the book teaches it

Related terms

Bit operators