Forums - Open Redstone Engineers

Full Version: A new bcs logic
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
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)
[Image: 7Azujhp.png]

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.

[Image: 48oFOcX.png]

And then you xor all three lines.

[Image: z3GenWW.png]

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
and this is exactly the same way I tried to develop a 3 tick adder today... by inverting an input Tongue
Not quite because if you invert an input of xnor and nor, you get xor as the generate and b implies a as the cancel
I'm suggesting b implies a as the generate, and b as the cancel
nice
i wanna go check this out after work now
I lied this doesn't work.
The carry logic has to be B nimplies A and A implies B.
kill me now
can you give an example where it does not work?
edit: did some testing
so apparently when you do 2 - 3 for example, the first bit will generate a borrow, the second bit is supposed to propagate (not cancel) it. But because B is on, it will cancel and the output is 3 instead of -1
yup
Created a new subtractor with the carry logic (2 nimplies)
Quite easy to derive because CCA technically uses AND as the carry and NOR as the cancel. By inverting one input you get a nimplies b and b nimplies a.

[Image: i5bms8y.png]

same warp

P.S. Btw cookies are good
P.P.S I am idiot.
(05-29-2017, 03:15 AM)LambdaPI Wrote: [ -> ]I chose CCA type because noone likes ica.

;-;
I guess this isn't that new lol. People done it already.
Pages: 1 2