If the last set bit is at odd position then answer will always be a number with the left bit set
if ( cnt % 2 ) : NEW_LINE INDENT return 1 << ( cnt + 1 ) ; NEW_LINE DEDENT else : NEW_LINE INDENT tempnum = 0 ; NEW_LINE DEDENT