Break addition into two parts: sum without carry and carry.
XOR gives the sum where no carry occurs: a ^ b.
AND gives positions where both bits are 1 (carry needed), shifted left: (a & b) << 1.
Repeat until there's no carry. The XOR result is the final sum.
This simulates how a hardware adder works: half-adders compute sum and carry, then propagate.