---
aliases: [binary digits, bits, bitstring, bitstrings]
--- 
#computer-arithmetic 
## Definition 
> [!tldr] Definition
> A **binary digit** or "**bit**" is either the number $0$ or the number $1$. A **bitstring** is a sequence of one or more bits.  
Notes: 
- When a positive [[Integers|integer]] is written in [[Base 2 representation|binary representation]], it has the form of a bitstring where each bit represents a power of 2. 
- The length of the bitstring is the number of bits it has in all. 
- The [[Weight of a bitstring|weight]] of the bitstring is the number of $1$ bits it has. 
- The number of bit strings of length $n$ and [[Weight of a bitstring|weight]] $k$ is given by the [[Binomial coefficient|binomial coefficient]] $\displaystyle{\binom{n}{k}}$. 
## Examples 
The [[base 2 representation]] of the positive ([[Base 10 representation|base 10]]) [[Integers|integer]] $214$, is $11010110$. This is a bitstring of length 8 and [[Weight of a bitstring|weight]] 5.