Pergunta de entrevista da empresa Arm

Programming puzzle: find the number of ones in the input string using logical XOR