Convert binary string to integer