Pergunta de entrevista da empresa NVIDIA

Count amount of 1-bits in byte

Respostas da entrevista

Sigiloso

12 de mar. de 2011

There are several possible answers, for instance make a loop with bit shifting and check of last bit. More efficient way is to use lookup table

1

Sigiloso

8 de jun. de 2012

Answer to that question along with other bit kind can be found at: http://graphics.stanford.edu/~seander/bithacks.html