Java 100%  Faster & 5 line Easy Solution With Clear Explanation
\nclass Solution {\n    public int getSum(int a, int b) {\n        \n        //Iterate till there is no carry OR till the value of \'b\' is 0.\n        //Exampl
```\nclass Solution {\n    public int getSum(int a, int b) {\n        \n        //Iterate till there is no carry OR till the value of \'b\' is 0.\n        //Example SUM: 1 + 2\n        while( b != 0){\n            \n            //Carry is calculated by Bitwise AND (&) Operation.\n            /* Binary Value of 1 -> 0001\n               Binary Value of 2 -> 0010\n      Bitwise (&) operator gives -> 0000  -> which is a Binary Equivalent of 0.\n      For an (&) Operator, if both the bits are 1 it gives 1 or else 0. So evidently the result is 0000.\n            */\n            int carry = a & b;\n            \n            //Now calculate the sum of the 2 numbers where Bitwise X0R (^) indicates (+) addition.\n             a ^= b; // -> equivalent to   a=a+b, a=a^b, \n            \n            //so, now sum would be 3, which is the value of a.\n\t\t\t\n\t\t\t\n            /*Shift carry by 1 if it is not 0, so adding to \'a\' gives the required sum.\n\t\t    To be more precise (<<) left shift operator shifts the bits of the number to left\n\t\t\tYou can image this effect as of multiplying the number(carry) with power of 2^1.\t\n\t\t    Consider this equation to be an equivalent of b = carry * 2^1 = 0.  [FOR THE EXAMPLE SUM 1+2]\n\t\t\tAs, carry is 0 so, b would also become 0, we end the loop and return "a" where we have the "sum"\n\t\t\t*/\n            b = carry << 1;  // This line of code can also be written as  b = carry  * (int)Math.pow(2,1); WORKS.\n        }\n        return a;\n    }\n}\n```
['Bit Manipulation', 'Java']