The number of 1’s in the binary representation of the value of 163 × 9 + 162 ×…

2023

The number of 1’s in the binary representation of the value of
163 × 9 + 162 × 7 + 16 × 5 + 3 is ______.

Answer: B. 9Concept — In base 16, a positional expansion of the form d3 × 163 + d2 × 162 + d1 × 16 + d0 is simply the hexadecimal numeral d3d2d1d0. Since 16 = 24, every…

  1. A.

    15

  2. B.

    9

  3. C.

    12

  4. D.

    More than one of the above

  5. E.

    None of the above

Attempted by 681 students.

Show answer & explanation

Correct answer: B

Concept — In base 16, a positional expansion of the form d3 × 163 + d2 × 162 + d1 × 16 + d0 is simply the hexadecimal numeral d3d2d1d0. Since 16 = 24, every hexadecimal digit corresponds to a fixed block of 4 binary bits, so the binary form of the whole number is those 4-bit blocks written one after another, and the total number of 1-bits is the sum of the 1-bits in the individual blocks.

Applying it here — In the given expression the multipliers of 163, 162, 16 and 1 are 9, 7, 5 and 3, so the value is the hexadecimal numeral 975316. Expanding each hexadecimal digit into its 4-bit block:

Hexadecimal digit

4-bit block

Number of 1-bits

9

1001

2

7

0111

3

5

0101

2

3

0011

2

Writing the blocks one after another gives 1001 0111 0101 0011, and adding the counts gives 2 + 3 + 2 + 2 = 9 one-bits.

Cross-check (decimal route) — The same total appears if the value is first converted to decimal:

  1. 163 × 9 = 4096 × 9 = 36864

  2. 162 × 7 = 256 × 7 = 1792

  3. 16 × 5 = 80, and the constant term is 3

  4. Sum: 36864 + 1792 + 80 + 3 = 38739

  5. 38739 = 1001011101010011 in binary, where the set bit positions are 15, 12, 10, 9, 8, 6, 4, 1 and 0

Both routes produce the same 16-bit pattern, so the binary representation contains 9 one-bits.

Explore the full course: Bpsc

Loading lesson…