Probablemente he dedicado más tiempo a esta pregunta de lo que debería, pero aquí están mis hallazgos.
No puedo encontrar ningún ejemplo de un sumador de prefijo paralelo "puro" para números negabinarios. También creo que es un problema abierto, ya que no he visto ninguna prueba de que no sea posible.
Lo más cerca que puedo llegar es usando una adición negabinaria negativa de dos pasos (comúnmente abreviada nnba en la literatura). Se basa en la siguiente propiedad:
f(x)=xn−1¯¯¯¯¯¯¯¯¯¯xn−2...x1¯¯¯¯¯x0g(x)=xn−1xn−2¯¯¯¯¯¯¯¯¯¯...x1x0¯¯¯¯¯0xAA...AA
0x55...55
−(a+nbb)=g(f(a)+f(b)+1)
Where the left side is the negabinary sum +nb, while the + on the right side is a normal binary sum.
The negative sum can then simply be inverted using the same property but with a zero operand:
−x=g(f(x)+f(0)+1)
So in order to find the sum using parallel prefix adders, you can:
- Compute f(a) and f(b), ie. by inverting every odd bit of the negabinary numbers
- Compute the regular binary sum while setting the carry bit for the LSB (the +1), leading to a first intermediary sum s1.
- Invert all bits of s1 (this is f(g(s1))). This is the finish of the first sum, while also starting the inversion.
- Increment the result by
0xAA...AB
(=f(0)+1) using a parallel prefix adder, yielding the second intermediary sum s2
- Compute g(s2) (inverting each even bit) to find the final negabinary sum.
I have actually tried to find a "pure" parallel prefix adder, but I considered it too complex for the time I was willing to spend on it. Here's why:
The whole point of parallel prefix adders is to find some operation of {0,1}n×{0,1}n→{0,1}n that allows you to easily calculate the (in this case 2) carries from these bits. As an added constraint, the operation needs to be associative to be computed in parallel. For example, this basically excludes any NOT operator (that is not part of a double negation). For example: a∘b=a⋅b¯ is not an associative operator, because
(a∘b)∘ca∘(b∘c)=a⋅b¯⋅c¯=a⋅b⋅c¯¯¯¯¯¯¯¯¯¯
Note that the boolean operator for the carries in your question includes the mixed terms c+ic−i¯¯¯¯¯ and c−ic+i¯¯¯¯¯, making it impossible to use it as-is. For a single carry in normal binary addition, it became quite obvious how to construct this operator when thinking about it in terms of generation and propagation, but it seems to be not so obvious for negabinary carries.