Ok. Let's say I have an integer (X = 0x01000000) and I want to know which bit is active (1-32 or 0-32 depending on how you're counting). There's always only 1 bit active. Is there some equation I could use to do it? The only things I can think of involve looping. I would've thought there's a faster way to reduce it down through shifting or something. I just can't come up with it.