The composition $n_1+\ldots+n_k=n$ corresponds to the string $1^{n_1-1}01^{n_2-1}01^{n_3-1}\dots01^{n_k-1}$, where the exponents indicate number of copies.
One way to think of this is to imagine a string of $n$ white marbles. The composition of $n$ into the $k$ parts $n_1,n_2,\dots,n_k$ corresponds to a division of this string into $k$ blocks of lengths $n_1,n_2,\dots,n_k$. We can indicate where each block starts by painting the first marble of each block red. However, since the first marble of the string is bound to be the first marble of the first block, there’s no need to paint it. Thus, we need only paint $k-1$ of the last $n-1$ marbles to indicate unambiguously where all $k$ blocks are. This is the same as deciding which $k-1$ bits of an $n-1$ bit binary string are to be $0$.