Pregunta de entrevista de Chelsio Communications

Then asked to use exclusively bitwise operators to solve the problem without using any other extra variable(completely optimized)?