I have an array as such:
int[] fourbits = new int[4];
fourbits[0] = neuroninputs.input1;
fourbits[1] = neuroninputs.input2;
fourbits[2] = neuroninputs.input3;
fourbits[3] = neuroninputs.input4;
Each element contains a binary value. For instance:
Console.WriteLine(fourbits[0]);
outputs 1.
What I'm trying to do is take all the values from this array (1010) and convert them to decimal and print that value (10).
source
share