ISRO Computer Science (CSE) 2007 - Question 18

All ISRO Computer Science (CSE) papers | ISRO Computer Science (CSE) 2007

The number of digit 1 present in the binary representation of 3 x 512 + 7 x 64 + 5 x 8 + 3 is

  • A. 8
  • B. 9
  • C. 10
  • D. 12

Answer: B. 9

Explanation: 3*512 = 3 * 2^9 = 11000000000 (binary 11 followed by 9 zeros? No. 3 is 11. 11 << 9). 7*64 = 111 << 6. 5*8 = 101 << 3. 3 = 11. 11000000000 + 111000000 + 101000 + 11. All non-overlapping. Total 1s = 2 + 3 + 2 + 2 = 9.

| | All questions of ISRO Computer Science (CSE) 2007