The number of 1’s present in the binary representation of 10 × 256 + 5 × 16 +…
2011
The number of 1’s present in the binary representation of 10 × 256 + 5 × 16 + 5 is
- A.
5
- B.
6
- C.
7
- D.
8
Attempted by 82 students.
Show answer & explanation
Correct answer: B
Convert the expression to hexadecimal first: 10 * 256 + 5 * 16 + 5 equals A00_16 + 50_16 + 5_16, summing to A55_16. Convert each hex digit to binary: A is 1010 and 5 is 0101, yielding 1010 0101 0101_2. Count the set bits in this binary string to determine there are exactly 6 ones.
A video solution is available for this question — log in and enroll to watch it.