Item 1.7.7.d.

There is a bijection between subsets and bit strings: a 1 means that element in is the subset, a 0 means that element is not in the subset. To get a subset of an 8 element set we have an 8-bit string. To make sure the subset contains exactly 5 elements, there must be 5 1’s, so the weight must be 5.

in-context