metamerist

Saturday, November 20, 2004

How Do You Count Bits?

How do you count bits?

It's said to be a job interview question, but I've never encountered it. The thing is, after reading a lot of code over the years, I'm surprised by how frequently loops are used by engineers, even in code where speed is critical.

Here's a page that does a good job with the subject:
Counting the Number of Bits in an Integer.


0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home