I read this on a webpage about the binomial coefficients:
If $\{0,1\}$ are bits and $k$ is the amount of "ones" ${n}\choose{k}$ gives the quantity of strings of length $n$ which have exactly $k$ ones in it.
Why is this true? I thought until now that the binomial coefficient ${a}\choose{b}$ gave only informations about the numbers of ways you can choose a subsets of cardinality $b$ from one whose cardinality is $a$.
Consider the following transformation: let $B$ be a set of cardinality $b$ and let us represent a subset $A$ of $B$ as a binary string of length $b$ with a one if the corresponding element is taken and a zero otherwise.
E.g. $$B=\{ u, v, w, x, y, z\}$$
$$A=\{ u, v, z\}\leftrightarrow 110001.$$
Now how many strings of length $b$ having $a$ ones are there ?