Sigma Designs interview question

Endian swap and count bits set