Sum of Two Integers

Calculate the sum of two integers a and b, but you are not allowed to use the operator + and -.

Example

Example 1

Input:
a = 1, b = 2
Output:
 3

Solution

See Method 1 and Method 2 of Sum of two numbers using only bitwise operators