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, convert it to a negative integer. If the input is a negative integer, convert it to a positive integer. If the input is zero, return zero.
  
  def convert_to_negative(x):
      if x > 0:
          return ~x + 1
      elif x < 0:
          return -(x + 1) ^ -1
      else:
          return 0
  
  def convert_to_positive(x):
      if x > 0:
          return ~x + 1
      elif x < 0:
          return ~(x + 1) + 1
      else:
          return 0
  
  assert convert_to_negative(5) == -5
  assert convert_to_negative(-5) == 5
  assert convert_to_negative(0) == 0
  assert convert_to_positive(5) == -5
  assert convert_to_positive(-5) == 5
  assert convert_to_positive(0) == 0
output: def convert_to_negative(x):
      if x > 0:
          return ~x + 1
      elif x < 0:
          return -(x + 1) ^ -1
      else:
          return 0
  
  def convert_to_positive(x):
      if x > 0:
          return ~x + 1
      elif x < 0:
          return ~(x + 1) + 1
      else:
          return 0