Add two integers without ever writing + or -. The only tools you get are bitwise operators — the same XOR, AND, and shift gates a CPU's hardware adder uses to add numbers. Your job is to rebuild that adder in JavaScript: XOR produces the digit-by-digit sum, AND followed by a left shift produces the carry, and you repeat until there's no carry left.
// a, b: 32-bit signed integers (negatives allowed)
// returns: the integer sum a + b, using only bitwise operators
function sumWithoutAddition(a: number, b: number): number;
sumWithoutAddition(2, 3); // → 5
sumWithoutAddition(-2, 3); // → 1
sumWithoutAddition(-5, -3); // → -8
sumWithoutAddition(0, 0); // → 0
sumWithoutAddition(100, 250); // → 350
sumWithoutAddition(-10, -20); // → -30
+ or - — not in expressions, not in ++/--/+=. Only bitwise operators (^, &, |, <<, >>, >>>, ~) are allowed.Math helpers, build strings, or loop with a counter you increment with +. The arithmetic itself must be bitwise.-2, -5, and mixed-sign pairs must work. The same bit trick handles them because JS stores negatives in two's complement.number equal to a + b, not a string or array.