bit count : Java Glossary

*0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ (all)

bit count
The number of = 1 bits in a number. Here are two ways to calculate it. The collapsing partial parallel sums method looks horribly complicated but it works 5 times faster than the classic method. Here is the partial sum collapsing method: Here Here is an algorithm what works quickly when there are only a few bits turned on.

This page is posted
on the web at:

http://mindprod.com/jgloss/bitcount.html

Optional Replicator mirror
of mindprod.com
on local hard disk J:

J:\mindprod\jgloss\bitcount.html
logo
Please the feedback from other visitors, or your own feedback about the site.
Contact Roedy. Please feel free to link to this page without explicit permission.
Blog
IP:[65.110.21.43]
Your face IP:[54.83.227.191]
You are visitor number