Forums - Open Redstone Engineers
A new bcs logic - Printable Version

+- Forums - Open Redstone Engineers (https://forum.openredstone.org)
+-- Forum: ORE General (https://forum.openredstone.org/forum-39.html)
+--- Forum: Projects & Inventions (https://forum.openredstone.org/forum-19.html)
+---- Forum: Completed Projects (https://forum.openredstone.org/forum-21.html)
+---- Thread: A new bcs logic (/thread-12327.html)



A new bcs logic - LambdaPI - 05-29-2017

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


RE: A new bcs logic - tokumei - 05-29-2017

and this is exactly the same way I tried to develop a 3 tick adder today... by inverting an input Tongue


RE: A new bcs logic - LambdaPI - 05-29-2017

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


RE: A new bcs logic - Magic :^) - 05-29-2017

nice
i wanna go check this out after work now


RE: A new bcs logic - LambdaPI - 05-31-2017

I lied this doesn't work.
The carry logic has to be B nimplies A and A implies B.
kill me now


RE: A new bcs logic - PaukkuPalikka - 05-31-2017

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


RE: A new bcs logic - LambdaPI - 05-31-2017

yup


RE: A new bcs logic - LambdaPI - 06-03-2017

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.


RE: A new bcs logic - ddthj - 06-03-2017

(05-29-2017, 03:15 AM)LambdaPI Wrote: I chose CCA type because noone likes ica.

;-;


RE: A new bcs logic - LambdaPI - 06-05-2017

I guess this isn't that new lol. People done it already.


RE: A new bcs logic - Chibill - 06-05-2017

But is it any faster.


RE: A new bcs logic - LambdaPI - 06-05-2017

Nope still the same 3 ticks as the xor and b nimplies a bcd

Might be a teensy bit smaller.