Secret Squirrel writes: > Out of all possible N-bit numbers, how many have exactly M ones (M <= N) ? > > (Yes, I am ashamed that I can't remember combinatorial logic, and that > I am too lazy to open a book, so spare me the BS.) Since you ask, I will spare you more than that. I will spare you the answer.