The number of 1’s present in the binary representation of (3×512 + 7×64 + 5×8…

2006

The number of 1’s present in the binary representation of (3×512 + 7×64 + 5×8 + 3)₁₀ is:

  1. A.

    8

  2. B.

    9

  3. C.

    10

  4. D.

    11

Attempted by 110 students.

Show answer & explanation

Correct answer: B

First, express each term as a sum of powers of 2. For 3 × 512, we get 2^10 + 2^9. For 7 × 64, we get 2^8 + 2^7 + 2^6. For 5 × 8, we get 2^5 + 2^3. Finally, 3 is 2^1 + 2^0. Counting all distinct powers gives a total of nine set bits.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Nta Ugc Net Paper 1