title: Add Two Numbers Without Using Arithmetic Operators
signature: class Solution {
  
      public Integer addTwoNumbersWithoutUsingArithmeticOperators(Integer x, Integer y) {
test_code: import static java.util.Map.entry;  
  import java.util.*;
  import java.lang.*;
  // TESTING CODE 
  // ============================================
  class QuestionEvaluator {
      public static String validateSolution(Integer x, Integer y, Integer expected){
          try{
              Driver driver = new Driver();
              if (driver.run(x, y,expected)){
                  return "PASSED";
              }
              return "FAILED";
              
          } catch (Exception exception_obj){
              return exception_obj.getClass().getSimpleName();
          }
  
      }
      public static void main(String[] args) {
          String result;
          result = validateSolution(56, 60, 116);
          System.out.println(String.format("%s%s","TEST-0...",result));    
      
          result = validateSolution(17, 44, 61);
          System.out.println(String.format("%s%s","TEST-1...",result));    
      
          result = validateSolution(73, 96, 169);
          System.out.println(String.format("%s%s","TEST-2...",result));    
      
          result = validateSolution(75, 3, 78);
          System.out.println(String.format("%s%s","TEST-3...",result));    
      
          result = validateSolution(27, 54, 81);
          System.out.println(String.format("%s%s","TEST-4...",result));    
      
          result = validateSolution(61, 1, 62);
          System.out.println(String.format("%s%s","TEST-5...",result));    
      
          result = validateSolution(65, 63, 128);
          System.out.println(String.format("%s%s","TEST-6...",result));    
      
          result = validateSolution(22, 19, 41);
          System.out.println(String.format("%s%s","TEST-7...",result));    
      
          result = validateSolution(61, 9, 70);
          System.out.println(String.format("%s%s","TEST-8...",result));    
      
          result = validateSolution(97, 23, 120);
          System.out.println(String.format("%s%s","TEST-9...",result));    
      
      }
  }
  
  class Driver{
      public boolean run(Integer x, Integer y, Integer expected){
  
          PLACEHOLDER_CLS_NAME sol = new PLACEHOLDER_CLS_NAME();
          return validateSolution(sol.PLACEHOLDER_FN_NAME(x, y),expected);
      }
      
      public boolean validateSolution(Integer actual, Integer expected){
          return actual.equals(expected);
      }
  }
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
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;
  }