05-29-2017, 03:15 AM

So i was playing around with subtraction and i came up with a subtraction algorithm ( i don't remember how i derived it)

So first you have the problem: (Red=1, White=0)

In order to subtract, you find all the places where it is 0-1 and propagate a carry upwards. Then you stop propagating when you hit a 1 on top.

And then you xor all three lines.

So the bottom is the answer.

So in implementing this i had two options: ICA type, or CCA type.

I chose CCA type because noone likes ica.

So basically the carry generation was made using B nimplies A and the cancel with B.

Therefore a 3 tick subtractor is formed.

I would post a picture of the subtractor now, but imgur allows only posting every hour

so i have a warp

/warp 3ticksub

So first you have the problem: (Red=1, White=0)

In order to subtract, you find all the places where it is 0-1 and propagate a carry upwards. Then you stop propagating when you hit a 1 on top.

And then you xor all three lines.

So the bottom is the answer.

So in implementing this i had two options: ICA type, or CCA type.

I chose CCA type because noone likes ica.

So basically the carry generation was made using B nimplies A and the cancel with B.

Therefore a 3 tick subtractor is formed.

I would post a picture of the subtractor now, but imgur allows only posting every hour

so i have a warp

/warp 3ticksub