Calculate the sum of two integers without using the + or - operators.
With a = 1, b = 2:
- Binary: 1 = 01, 2 = 10.
- Sum = 3 = 11.
- Return .
With a = 2, b = 3:
- Binary: 2 = 10, 3 = 11.
- Sum = 5 = 101.
- Return .
Constraints: .
The problem
Calculate the sum of two integers without using the + or - operators.
With a = 1, b = 2:
With a = 2, b = 3:
Constraints: .