Case 2 : find the first 0 - bit index and return the Y
for i in range ( length ) : NEW_LINE INDENT ch = A_binary [ length - i - 1 ] ; NEW_LINE if ( ch == '0' ) : NEW_LINE INDENT B = pow ( 2.0 , i ) ; NEW_LINE break ; NEW_LINE DEDENT DEDENT return B ; NEW_LINE