title: Add Two Numbers Without Using Arithmetic Operators
signature: function add_two_numbers_without_using_arithmetic_operators(x, y)
test_code: using Printf
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  function validate_solution(actual, expected)
      return actual == expected
  end
  
  function driver(x, y, expected)
      try
  
          if validate_solution(PLACEHOLDER_FN_NAME(x, y), expected)
              return "PASSED";
          end
          return "FAILED";
      catch exception_obj
          return string(Base.typename(typeof(exception_obj)).wrapper);
      end
  end
  
  function main()
      
      result = driver(56, 60, 116);
      @printf("TEST-0...%s\n",result);
      
      result = driver(17, 44, 61);
      @printf("TEST-1...%s\n",result);
      
      result = driver(73, 96, 169);
      @printf("TEST-2...%s\n",result);
      
      result = driver(75, 3, 78);
      @printf("TEST-3...%s\n",result);
      
      result = driver(27, 54, 81);
      @printf("TEST-4...%s\n",result);
      
      result = driver(61, 1, 62);
      @printf("TEST-5...%s\n",result);
      
      result = driver(65, 63, 128);
      @printf("TEST-6...%s\n",result);
      
      result = driver(22, 19, 41);
      @printf("TEST-7...%s\n",result);
      
      result = driver(61, 9, 70);
      @printf("TEST-8...%s\n",result);
      
      result = driver(97, 23, 120);
      @printf("TEST-9...%s\n",result);
      
  end
  
  main()
source_py: def add_two_numbers_without_using_arithmetic_operators(x, y):
      while (y != 0):
          carry = (x & y)
          x = (x ^ y)
          y = (carry << 1)
      return x
source_cpp: int add_two_numbers_without_using_arithmetic_operators(int x, int y) {
    while ( y != 0 ) {
      int carry = x & y;
      x = x ^ y;
      y = carry << 1;
    }
    return x;
  }