Skip to content

Glossary: Algorithms Beyond the Basics in C++

binary

Also written: bit, bits, 0b literal, 0b

Writing whole numbers with only 0s and 1s, where each digit (a bit) is worth 1, 2, 4, 8 and so on from the right, so `1101` means 13. In C++ a `0b` prefix writes a number in binary in code, so `0b1101` is 13.

Where the book teaches it

Related terms

bitmaskstd::bitset