Microsoft interview question

A problem related to bit-wise manipulation