NVIDIA Interview Question

Count amount of 1-bits in byte

Interview Answers

Anonymous

Mar 12, 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

Anonymous

Jun 8, 2012

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