Skip to content

Glossary: Algorithms Beyond the Basics

Binary

Also written: bit, bits, 0b literal, 0b, bin()

Writing 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 is 8 + 4 + 0 + 1 = 13. In Python, `0b1101` writes 13 in binary, `bin()` shows a number's bits and `int(text, 2)` reads binary text.

Where the book teaches it

Related terms

Bit operatorsBitmask