0

If you have to count numbers of 1 in a 32 bit word. Other than checking every other bit or dividing the bits is 4 parts and then using lookup table. What will be some other most efficent way ?

4
Contributors
3
Replies
4
Views
10 Years
Discussion Span
Last Post by Ravalon
1

If you have to count numbers of 1 in a 32 bit word. Other than checking every other bit or dividing the bits is 4 parts and then using lookup table. What will be some other most efficent way ?

You're ruling out these?

Votes + Comments
fun link :-) -Raye
0

If you have to count numbers of 1 in a 32 bit word. Other than checking every other bit or dividing the bits is 4 parts and then using lookup table. What will be some other most efficent way ?

Jeez... do your own 'Computer Systems' Homework!

0

If you have to count numbers of 1 in a 32 bit word. Other than checking every other bit or dividing the bits is 4 parts and then using lookup table. What will be some other most efficent way ?

Can you show an example of what you need to do? I'm assuming you just want to count the number of set bits in a word, but it might be something different than that.

Jeez... do your own 'Computer Systems' Homework!

mehakkapur included a viable solution in his question, so this isn't a matter of not knowing how to solve the problem. He also didn't ask for code, so assuming that this is the usual homework question is jumping the gun. Not to mention that the way you went about that assumption was rude and uncalled for.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.