Pergunta de entrevista da empresa Tesla

How I would solve a bitwise operation problem.