Thanks BurtW, Swtrse!
You are awesome!
@Swtrse
least significant bit? you mean, it could be also the most significant bit but choose one and watch for the distribution, right? otherwise i don't get why it hast to be the LSB?
It's called least significant bit because it has the least effect on the number For examlpe
LSB
|
v
00000000 = 0
00000001 = 1
00001000 = 8
00001001 = 9
As you can see in binary system odd numbers end with an '1' and even numbers end with an '0'.
% 2 is a way to determine if an number is odd or even
taking all of that into account you only have to look at the LSB to see if an number is odd or even or from the binary view if the LSB is a 1 or a 0