input: Write a function to convert a positive integer to negative or vice versa using bitwise NOT operator. The function should take an integer as input and return its converted form. If the input is positive, it should return its negative equivalent. If the input is negative, it should return its positive equivalent.
  
  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_negative(0) == 0
  assert convert_to_positive(-0) == 0
  assert convert_to_negative(123456) == -123456
  assert convert_to_positive(-123456) == 123456
output: def convert_to_negative(x):
      return ~x + 1
  
  def convert_to_positive(x):
      return ~(x - 1)