in reply to Re: Re: help with algorithm
in thread help with algorithm
The first example is 1010, that is (I'm considering the binary digits from right to left):
0 * 20 + 1 * 21 + 0 * 22 + 1 * 23
Your second example is 100. As usual, from right to left...
0 * 20 + 0 * 21 + 1 * 22
Got the pattern? Now I'm going to check what powers of 2 are on (i.e. multiplied by 1). In the first example they are
21 (Monday) and 23 (Wednesday). In the second example only 22, Tuesday.
I hope this will clarify my node.