Instead of just the lowest set bit, I want to find the position of the nth lowest set bit. (I\'m NOT talking about value on the nt
n
v-1 has a zero where v has its least significant "one" bit, while all more significant bits are the same. This leads to the following function:
v-1
v
int ffsn(unsigned int v, int n) { for (int i=0; i