07-02-2013, 04:11 AM
(07-02-2013, 03:54 AM)newomaster Wrote: After you showed me your plot on the school server, I would like to see you explain a bit about how the ALU works, since it is a very generic design.Explanation of my ALU.(with modifications from niceboi88)
well i first made a 2 bit adder. an adder is composed of xors. since xors have the same out put for 2 true inputs and 2 false inputs, u have to have a carry. (because 1+1=10 in binary). u can make the carry from the first set of xors go into the second set as a 3rd input. u do this for however many bits u want your adder to be. since an ALU is supposed to be able to also do the logic gates and be an adder, i built it off of an adder. i figured the easiest gate to do would be xor because an adder is made of xors. all i had to do was get rid of the carry. i decided to place pistons so when powered by the "kill carry switch" they would push a block in the path of the redstone "carry" line. i then figured that the next easiest one to do would be an or because the or in the xor is very easy to find. i just had to change it from an adder to an or with the redstone torches. but then i realized that i didnt have to find every single gate in the ader. i knew from my logic gates that almost any gate could be created b inversing the inputs. for example, if i wanted an and gate i could just inverse both the inputs. so i changed my design in order to inverse all of the as or all of the b,s at a flick of the switch. also, to get the nand gates and such i added an inverse output at the end. It did get kind of messy because of my terrible bussing techniques but niceboi helped me clean it up, big thx to him