Pregunta de entrevista de Tesla

How I would solve a bitwise operation problem.