- Jan 21, 2005
- 17,722
- 6
- 81
My other thread about binary . . .
In the above thread, I used the decimal number 123?1111011 in binary. What I want to know is how can I disect 1111011 to store each individual 1 and 0 into its own variable? Meaning, going from left to right:
n1 = 1;
n2 = 1;
n3 = 1;
n4 = 1;
n5 = 0;
n6 = 1;
n7 = 1;
How can I do this using division and modulus operators only?
In the above thread, I used the decimal number 123?1111011 in binary. What I want to know is how can I disect 1111011 to store each individual 1 and 0 into its own variable? Meaning, going from left to right:
n1 = 1;
n2 = 1;
n3 = 1;
n4 = 1;
n5 = 0;
n6 = 1;
n7 = 1;
How can I do this using division and modulus operators only?