Total Hamming Distance


"We know that the count of such unique pairs is kC1∗n−kC1=k⋅(n−k){}^kC_1 * {}^{nk}C_1 = k \cdot (nk)kC1∗n−kC1=k⋅(n−k) for this particular bit."....can you please help understand reasoning for it? The way I see it, if there're k numbers which have "ith" bit set, there're (nk) numbers which have "ith" bit unset. Pair each of those k numbers with each of (nk) numbers  there're total of k * (nk) pairs. Each such pair contributes hamming distance of 1