I am trying to get the smallest value bitfor numberin javascript.
I have the following code:
let lsb = (parseInt("110", 2) & 0xffff);
In my opinion, the least significant bit 110 is 1 1 0, since this is the most significant bit.
However, the code above returns "6", which is a common value 110, not the least significant bit.
How can I get the least significant bit?
source
share