Fast way to determine right most nth bit set in a 64 bit
<p>I try to determine the right most nth bit set</p>

<pre><code>if (value &amp; (1 &lt;&lt; 0)) { return 0; }
if (value &amp; (1 &lt;&lt; 1)) { return 1; }
if (value &amp; (1 &lt;&lt; 2)) { return 2; }
...
if (value &amp; (1 &lt;&lt; 63)) { return 63; }
</code></pre>

<p>if comparison needs to be done 64 times. Is there any faster way?</p>
