This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
gsholbert's profile picture

Computercraft ALU

Started by gsholbert, 04 June 2012 - 01:27 AM
gsholbert #1
Posted 04 June 2012 - 03:27 AM
Hey guys. Here's my idea:

Use CC to make an ingame ALU. Unfortunately, I am not good enough to make this by myself. So this Discussion is for suggestions, cooperative advancement, etc. I already went to AskAPro (I know, shameful :)/>/> ) about the addition. Now what's left is subtraction, not(of X input), or, xor, and, and bit-shift. bitwise functions should be easy.
MysticT #2
Posted 04 June 2012 - 07:59 PM
CC computers can do all of that already, you just need to get the input and apply the function/operator, then set the output (after checking for overflow and removing the extra bits).
I don't see the point of this, since CC computers are already computers, wich can make all of that operations.
I made an ALU with redpower (not the computers, just cables and gates), took me a lot of time but it works (with a LOT of lag, but works).
gsholbert #3
Posted 06 June 2012 - 04:01 AM
i'm doing that with redpower too. This is more of a side project to take my mind off of it sometimes. I was planning on expanding to a full cpu, then a full computer. and a gpu that decodes to a redpower display. Redpower ALU shouldn't lag that much though. The 16-bit flat adder setup can do a full sequence in about 3 ticks.
gsholbert #4
Posted 06 June 2012 - 06:04 AM
Also, turns out that the reason I couldn't do the addition was because I was overthinking it. I had totally forgotten about the fact that each redpower cable color had a value, also programmed into CC. Total idiot moment.
MysticT #5
Posted 06 June 2012 - 06:30 PM
Redpower ALU shouldn't lag that much though.
Well, it does when you have something like this:
SpoilerALU:

Ram:
ALU operations: add, subtract, increment, decrement, and, or, not. And some more.
Ram: 16 x 16 bytes (256 bytes). Currently it's only 16 bytes, but the idea was (i'm not working on this anymore) to have 16 layers like the one in the picture.
I used a CC computer to test them, and it did lag a lot.
sam_technologeek #6
Posted 08 June 2012 - 11:44 PM
It looks nice.

Want to see it finished