How many 1’s are present in the binary representation of 3 × 512 + 7 × 64 + 5…
2009
How many 1’s are present in the binary representation of 3 × 512 + 7 × 64 + 5 × 8 + 3
- A.
8
- B.
9
- C.
10
- D.
11
Attempted by 104 students.
Show answer & explanation
Correct answer: B
Rewrite terms as powers of 2: 3x2^9 + 7x2^6 + 5x2^3 + 3. Convert coefficients to binary: 3=112, 7=1112, 5=1012. Count set bits: 2, 3, and 2. The last term is 3=112 , adding 2 more bits. Sum the counts: 2 + 3 + 2 + 2 = 9. The total number of ones is 9.
A video solution is available for this question — log in and enroll to watch it.