BVEC bvec_add ( BVEC  left,
BVEC  right 
)

Builds a boolean vector for addition.

Builds a new boolean vector that represents the addition of two other vectors. Each element $x_i$ in the result will represent the function

\[ x_i = l_i\ \mbox{xor}\ r_i\ \mbox{xor}\ c_{i-1} \]

where the carry in $c_i$ is

\[ c_i = (l_i\ \mbox{and}\ r_i)\ \mbox{or}\ (c_{i-1}\ \mbox{and} \ (l_i\ \mbox{or}\ r_i)) \]

It is important for efficency that the BDD variables used in l and r are interleaved.

Returns:
The result of the addition (which is already reference counted).
See also:
bvec_sub, bvec_mul, bvec_shl


Generated on Mon Jul 23 13:25:15 2007 for BuDDy by  doxygen 1.5.1