Coding Challenge

Sum of Two Integers

Medium
bit-manipulation

Compute a + b without using + or -.

Return the sum of two integers using bit operations instead of the plus or minus operators.

Examples

Input: a = 1, b = 2

Output: 3

Constraints

  • Inputs fit in 32-bit signed integer range

Preparing your coding workspace...