3 ms·
Is that a common definition of LSB? I previously learned that the definition of the LSB is the "first" bit [0]. Would it be more clear to say that this algori
by kevinwang 10y ago
Is that a common definition of LSB? I previously learned that the definition of the LSB is the "first" bit [0]. Would it be more clear to say that this algorithm finds the least-significant bit that's set?
[0] https://en.wikipedia.org/wiki/Least_significant_bit https://en.wikipedia.org/wiki/Least_significant_bit
- johnp_ 10y agoYou're right. Least significant _set_ bit is (x & -x). Got confused by the (x & (x-1)) and thought rosstex must have meant something more complicated, because it doesn't seem to result in the usual LSB either :/