Seems like eveyone made their own ALU. Finaly made one myself.
I took the design for the LLU I made of my 1-bit CPU and put an xor at the end of it. I added an extra select line to turn on carry and bam! I can now add! While my ALU has a lot of functions, an easy subtract seems to be out of reach. It seems that I have to add an xor at beginning of one of the lines even though I can invert. Meh, might just make subtract an assembly macro:P Here are a few of the example functions. You can invert any of the lines on AND or OR but I figure 90% of people will use just these:P
00000 0
11110 1
01100 XOR
10010 NOR
00100 AND
10110 OR
10100 A
01010 A NOT
00110 B
11000 B NOT
01101 ADD
I took the design for the LLU I made of my 1-bit CPU and put an xor at the end of it. I added an extra select line to turn on carry and bam! I can now add! While my ALU has a lot of functions, an easy subtract seems to be out of reach. It seems that I have to add an xor at beginning of one of the lines even though I can invert. Meh, might just make subtract an assembly macro:P Here are a few of the example functions. You can invert any of the lines on AND or OR but I figure 90% of people will use just these:P
00000 0
11110 1
01100 XOR
10010 NOR
00100 AND
10110 OR
10100 A
01010 A NOT
00110 B
11000 B NOT
01101 ADD
Schematic: http://pbruner.com/minecraft/newalu.zip
My new version of Redstone Simulator
Main Code Site: http://code.google.com/p/red-stone-simulator/