> [!tldr] Definition > The **weight** of a [[Binary digits and bitstrings|bitstring]] is the number of $1$ bits it contains. Notes - The number of bitstrings of length $n$ that have weight $k$, is given by the [[binomial coefficient]] $n \choose k$. ## Examples | Bitstring | Weight | | --------- | ------ | | $101$ | $2$ | | $111101$ | $5$ | | $00000$ | $0$ | | $111111$ | $6$ |