ProgrammingModerateGATE CS · Campus placements

How many trailing zero bits does 96 have? (96 is 1100000 in binary.)

  1. A. 5
  2. B. 4
  3. C. 6
  4. D. 3

Correct answer: A. 5

96 = 2^5 * 3, so five low bits are zero. Lowest set bit tricks such as x & -x find the same position.

More C Programming questions

Exams that ask this topic