Skip to content

Glossary: Algorithms Beyond the Basics in JavaScript

Bit operators

Also written: bitwise operators, &, |, ^, ~

Operators that work on each column of bits in a number separately: `&` (and), `|` (or), `^` (XOR) and `~` (not). They are used to store flags in one number and to list subsets.

Where the book teaches it

Related terms

Bitmask32-bit integerBit shift