input: Write a function that converts a positive integer to negative or vice versa using the bitwise NOT operator. If the input number is positive, the function should convert it to negative and if the input number is negative, it should convert it to positive. The function should handle both 32-bit and 64-bit signed integers.
  assert convert_to_negative(5) == -5
  assert convert_to_positive(-5) == 5
  assert convert_to_negative(2147483647) == -2147483647
  assert convert_to_positive(-2147483647) == 2147483647
  assert convert_to_negative(0) == 0
  assert convert_to_positive(0) == 0
  
  def convert_number(x):
      if x > 0:
          return ~x + 1
      elif x < 0:
          return ~(x-1)
      else:
          return 0
output: def convert_number(x):
      if x > 0:
          return ~x + 1
      elif x < 0:
          return ~(x-1)
      else:
          return 0