Q:

Proof that a binary [n, k] code, C, has 2^(n-k) cosets...

I know this is an amateur question, but I am confused as to why this is true.
I've thought about it like this: |C| = 2^k, and |[GF(2)]^n| = 2^n, so there are 2^n - 2^k distinct vectors in GF(2)^n and not in C, and each one generates a single coset.
Thus, there should be 2^n - 2^k + 1 cosets (since C itself is a coset), but I am obviously wrong so I'm not sure how to prove this properly.  Any help is massively appreciated.  Thanks!

A:

You are correct up to this: $|C| = 2^k$, and $|GF(2^n)|=F_2^n = 2^n$, so there are $2^n - 2^k$ distinct vectors in $GF(2^n)$ and not in $C$.
But each one not generates a single coset. In every coset, there are $2^k$ elements, so there are $\frac{2^n}{2^k}= 2^{n-k}$ cosets in $F_2^n$.

