Check if bit is present of not
if ( M & 1 != 0 ) : NEW_LINE INDENT XOR_sum += ( ( N - frequency_of_bits [ bit_position ] ) * value_at_that_bit ) NEW_LINE DEDENT else : NEW_LINE INDENT XOR_sum += ( ( frequency_of_bits [ bit_position ] ) * value_at_that_bit ) NEW_LINE DEDENT