Jump to content




Computercraft ALU

lua

5 replies to this topic

#1 gsholbert

  • New Members
  • 9 posts

Posted 04 June 2012 - 02: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.

#2 MysticT

    Lua Wizard

  • Members
  • 1,597 posts

Posted 04 June 2012 - 06: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).

#3 gsholbert

  • New Members
  • 9 posts

Posted 06 June 2012 - 03: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.

#4 gsholbert

  • New Members
  • 9 posts

Posted 06 June 2012 - 05: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.

#5 MysticT

    Lua Wizard

  • Members
  • 1,597 posts

Posted 06 June 2012 - 05:30 PM

View Postgsholbert, on 06 June 2012 - 03:01 AM, said:

Redpower ALU shouldn't lag that much though.
Well, it does when you have something like this:
Spoiler
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.

#6 sam_technologeek

  • New Members
  • 19 posts
  • LocationMilky Way!

Posted 08 June 2012 - 10:44 PM

It looks nice.

Want to see it finished





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users