Skip to content

Glossary: Algorithms Beyond the Basics in C++

power of two

Also written: powers of two

A number such as 1, 2, 4, 8 with exactly one 1 bit. `(n & (n - 1)) == 0` is true for these when n is above 0.

Where the book teaches it

Related terms

bit operators