input: Write a function to convert a positive integer to negative or vice versa using the bitwise NOT operator. If the input is a positive integer, the function should return the negative equivalent, and if the input is a negative integer, the function should return the positive equivalent. The function should handle both positive and negative integers correctly.
  
  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_negative(-5)==5
  assert convert_to_positive(5)==-5
  assert convert_to_positive(-5)==5
output: def convert_to_negative(x): 
      return ~x + 1 
    
  def convert_to_positive(x): 
      return ~(x-1)