How would I split a binary number up by each individual digit and then put it into a java list back to front.
For example: Binary Number:
01111101
After it is split up it would look like
int[] binary = {0,1,1,1,1,1,0,1}
After it the array is flipped it would look like
int[] binaryFlipped={1,0,1,1,1,1,1,0}
I am doing this so that I can convert a binary number into a denary number in java. So i would take the flipped list the for each binary digit work out it's denary value. This is an example of ruffle how i would do it. (Note: lengthOfList is not the write method but is just there for an example of how it would work)
For(x=0;lengthOflist(binary);x++){
sum=binary[x]*pow(2,x)+sum;
}
System.out.println(sum);