Placement AptitudeVery hardInfosys SP · Goldman Sachs aptitude

How many integers from 1 to 100 have exactly three 1s in their binary representation?

  1. A. 35
  2. B. 32
  3. C. 20
  4. D. 33

Correct answer: D. 33

Numbers below 128 have at most 7 bits, and C(7, 3) = 35 of them have exactly three 1s. Only 104 (1101000) and 112 (1110000) exceed 100, so 33 remain; 100 = 1100100 itself counts. 35 forgets to remove those above 100, 32 also drops 100, and 20 = C(6, 3) stops at 6 bits (below 64).

More Advanced Quantitative Ability (Placement) questions

Exams that ask this topic