which bit is set in a byte?

thanks to everyone!

this is what I was looking for: number = log(fnMCP23017Read(INFTFA))/log(2);

school math is long time ago... :frowning:

looping through 8 bits might be almost as fast...