Placement AptitudeVery hardInfosys SP · Goldman Sachs aptitude
How many integers from 1 to 100 have exactly three 1s in their binary representation?
- A. 35
- B. 32
- C. 20
- 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).
Practise more Advanced Quantitative Ability (Placement) questionsAdvanced Quantitative Ability (Placement): notes and key points
More Advanced Quantitative Ability (Placement) questions
- What is the unit digit of 2²⁰²⁶ + 3²⁰²⁶ + 7²⁰²⁶?
- A mother's age is twice the sum of the ages of her two children. After 20 years, her age will equal the sum of their ages. What is the…
- A milkman mixes water with milk and, selling the mixture at the cost price of pure milk, gains 25%. He then raises his price to 10% above…
- A jar is full of a 40% alcohol solution. Part of it is replaced with a 19% alcohol solution, and the jar then holds a 26% solution. What…
- Pipes A and B together fill a tank in 12 minutes. Alone, A fills it 10 minutes faster than B. How long does A alone take?
- A tank has one inlet that fills it in 4 hours and two identical outlets that each empty it in 12 hours. All three are opened on the empty…