Implementing Addition Using Bit Operations

34 Views Asked by At

I have a system in which calculations are performed on integers. The following bit operations are defined in it: AND, OR, NOT, XOR. I want to define the addition operation in it, which would be expressed through the bit operations available to me. Various algorithms were found in which a bit shift is involved. But how can I implement it using the given functions? Is there an addition algorithm that only works with the specified bit operations?