bit count : Java Glossary

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.

available on the web at:

http://mindprod.com/jgloss/bitcount.html
ClustrMaps is down

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.
Blog
IP:[65.110.21.43]
Your face IP:[50.17.162.174]
You are visitor number 38,306.