which bit is set in a byte?

A binary search would be quicker, assuming only one bit is set.