input: Write a function to convert a positive integer to negative or vice versa using bitwise NOT operator. The function should have two parts: one to convert a positive integer to negative and the other to convert a negative integer to positive.
  def convert_to_negative(x): 
      return ~x + 1 
    
  def convert_to_positive(x): 
      return ~(x-1)
  assert convert_to_negative(5)==-5
  assert convert_to_positive(-5)==5
  assert convert_to_positive(2)==2
  assert convert_to_negative(-2)==-2
output: def convert_to_negative(x): 
      return ~x + 1 
    
  def convert_to_positive(x): 
      return ~(x-1)