a) you have 12C3 ways to pick the location of the 1s, and the rest must be 0s,
so (12x11x10)/(3x2x1) = 220 ways.
b) at most 3 ones: add 12C2 = (12x11)/(2x1) = 66 and 12C1 = 12 and 12C0 = 1:
220 + 66 + 12 + 1 = 299 ways.
c) this is just the total number of possible 12-bit strings minus the number of strings with 2, 1, or 0 1s(at least three 1s):
2^12 - (66 + 12 + 1)
= 4096 - 79 = 4017
d) to have an equal number of 1s and 0s, there must be 6 1s and 6 0s.
There are 12C6 = (12x11x10x9x8x7)/(6x5x4x3x2x1) = 924 ways to choose the locations of the 1s...and the rest have to be 0s,
so 924 is the answer.