This isnt strictly a picaxe problem, but more of a logic one I think:-
I'm trying to find a relationship between the following 2 columns of data:
10000000 8
1000000 7
100000 6
10000 5
1000 4
100 3
10 2
1 1
The only one I can come up with is 'counting from the lsb of the 1st number, the position of the '1' is the number in the second column.'
I'm hoping there is some arithmetic/logical relationship, as It would be very handy to use in a calculation. I'm sure there is, but I can't think of it.
Is there one? How would I take the number decimal 8 and arrive at binary 10000000 (decimal 128)?
I'm trying to find a relationship between the following 2 columns of data:
10000000 8
1000000 7
100000 6
10000 5
1000 4
100 3
10 2
1 1
The only one I can come up with is 'counting from the lsb of the 1st number, the position of the '1' is the number in the second column.'
I'm hoping there is some arithmetic/logical relationship, as It would be very handy to use in a calculation. I'm sure there is, but I can't think of it.
Is there one? How would I take the number decimal 8 and arrive at binary 10000000 (decimal 128)?