Forums - Open Redstone Engineers
inline 2 tick serial adder and ALU (maybe?) - 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: In Progress (https://forum.openredstone.org/forum-20.html)
+---- Thread: inline 2 tick serial adder and ALU (maybe?) (/thread-8662.html)



inline 2 tick serial adder and ALU (maybe?) - Magic :^) - 12-05-2015

so i made a prototype already a few days ago and basically it's kinda a wave pipelined state machine which takes 2 inputs and produces 1 output depending on its current state.

The state in my case would be wether the adder is in 'carry' mode, and the output of that state xors the sum of the two inputs.

There's a mux thing too for selecting the carry state toggle trigger, and a few monostables to fit everything into 2 tick stages, but yeah, this thing should work.

the amount of ticks it takes to calculate is (N x 2) + 2, where N is the word size of your inputs.

Since this is literally something you can throw inline with a serial bus, it supports as many bits as you want. I'm pretty sure that this method of calculation will always be faster than converting to parallel, adding, then converting back.

Making it an ALU would involve an extra 2 tick stage, so piping data through there would be (N x 2) + 4 ticks.

One thing I find quite cool is that this serial adder is also essentially the same as a super optimised RCA, e.g. only 2 tick ripple :O

No clocking or anything is required for this thing to work. you send data and it just works, as long as you are using 2 tick serial on both your inputs, you'll get 2 tick serial right back out. Big Grin


RE: inline 2 tick serial adder and ALU (maybe?) - Legofreak - 12-05-2015

I made something similar recently. It's a serial adder that runs at 2 ticks per bit. Its funny how it just consists of a full adder with the COUT directly into the CIN with a 2 tick delay. In other words, one of the AND gates just outputs right back onto one of its inputs. This setup also has a serial sender and receiver built around it using a separate trigger line with 8 bits of addition.

[Image: 2015-12-05_10.42.04_zpszt0du5i1.png]


RE: inline 2 tick serial adder and ALU (maybe?) - Magic :^) - 12-05-2015

oooo your way is a much nicer way to go about it Big Grin

I think I overcomplicated things with mine, I built it after a lecture on state machines xD