These functions return how many one bits there are in a number, not how many bit positions are needed to represent the number as a bit- string with no leading zeros. They are fun but have no utility in solving the OP's question.

TW

There are some examples of how to do this here, including some really, really clever methods.

http://gurmeetsingh.wordpress.com/2008/08/05/fast-bit-counting-routines/

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to