Convert binary in char array to int?

Hello
I have a char array containing a binary string and I want to convert it to a integer, this is what I have:

int noOut = 0;
char binIn[9] = "00001010";

for (int ii =0; ii < 8; ii++) {
   noOut = noOut | int(binIn[ii]) << ii;
}

Serial.println(noOut);

this gives 8176 as the output, it is wrong.

Can anyone help
Thanks
Karl.

noOut = noOut | (binIn[ii] - ‘0’) << (7-ii);

many thanks for the line of code.

Karl.