30:00
Given two integers a and b, return the sum of the two integers without using the operators + and -. Use bitwise operations instead.
−1000≤a,b≤1000-1000 \leq a, b \leq 1000−1000≤a,b≤1000
Start: a = 1, b = 2
a:
= 1
b:
= 2
a XOR b:
= 3
carry:
= 0
Current result: 3