• 0

    posted a message on 4-Bit CPU with RAM
    Quote from Hans Lemurson

    How fast is the CPU? I ask because the torches used in the vertical transmission of data to the tower portion are going to cost you nearly 1 second. A faster way (in terms of data transmission) to get redstone up is to use a 2x2 helix. You'll need to stagger your helixes (every other line shifted forwards one block) in order to ensure that they don't interfere with each other, but it seems like a pretty easy way to boost the speed of your system.

    Slow processing speed isn't something you notice when you're doing just one calculation at a time, but if you ever expand to being able to run simple programs, you'll soon learn just how long a few seconds can be an will try to shave them off wherever possible.


    Well at the moment it can take about 3-5 seconds for one calculation. That's pretty fast, but you're right, when I get to adding program lines I'll probably make those faster, it shouldn't be that hard
    Posted in: Redstone Discussion and Mechanisms
  • 0

    posted a message on 4-Bit CPU with RAM
    Quote from mattloto

    Also, didn't it used to be 5 bits?


    Used to be, but I created a whole new ALU for the CPU. It's much more compact and goes vertically rather then horizantally.
    Posted in: Redstone Discussion and Mechanisms
  • 0

    posted a message on 4-Bit CPU with RAM
    Quote from mattloto

    Ah, I'm glad you got RAM working! Also, quick question: When you say 2 bytes, do you mean 2 bytes of 8 bits, or 2 bytes of 4 bits (since it's a 4 bit CPU)?


    Thanks!
    The inputs are 4-Bit, and there are 16 bits (2 bytes) of RAM, so up to 4 different numbers can be stored at the same time.
    Posted in: Redstone Discussion and Mechanisms
  • 0

    posted a message on 4-Bit CPU with RAM
    Quote from Firedroide

    Very well done, but I think the function you call "NOR" is a NOT gate, and not a NOR gate.
    However, great job!

    Well when one or more of the inputs (in this case there is only one) the output is false, which is a NOR gate.
    Posted in: Redstone Discussion and Mechanisms
  • 0

    posted a message on 4-Bit CPU with RAM
    Just updated OP with new CPU

    Quote from Ocelot60

    That's... bloody amazing :ohmy.gif:


    Thanks!
    Posted in: Redstone Discussion and Mechanisms
  • 0

    posted a message on List of minecraft ALU's, CPU's and Computers
    I updated the ALU linked for me alot, added memory, completly new design, etc. Here's the updated specs of it.

    Also, I'm not to sure if this is considered an ALU or CPU? You can decide that for yourself.

    NAME_OF_CREATOR - Neonstory
    LINK - http://www.minecraftforum.net/topic/374932-4-bit-cpu-with-ram/
    DATE_FINISHED (18/06/11) - RATING
    SPECIFICATIONS - 4-Bit ALU, 8 Functions, 2-Bytes of RAM
    Posted in: Redstone Discussion and Mechanisms
  • 0

    posted a message on 4-Bit CPU with RAM
    Quote from you_are_mad

    I think the number 4 (third bit from the right) in the output is bugged when the AND function is chosen. It is always on regardless of the inputs. Also, I'm not good at this, but shouldn't the NOT function be called NOR? These are just some minor problems I found, but anyway the ALU is great. :biggrin.gif:


    I fixed both in the new CPU. Thanks for pointing them out!
    Posted in: Redstone Discussion and Mechanisms
  • 0

    posted a message on 4-Bit CPU with RAM
    Quote from Hans Lemurson

    I have wondered why the "Power of 2" convention exists for processors. My guess is that it has to do with addressing (4 bit addresses give you 16 locations), but I don't see how that should have any impact on the size of your daa registers and how many bits you process at a time.

    I often suspect that there's a "Cult of the Sacred 2" that's developed in the computer industry.

    Well, looks like I've broken the cult's rules :wink.gif:


    Quote from you_are_mad

    The "GUI" (the place where you do the calculations) is very easy to understand and the speed is very fast. I also like the fact that you can see snow falling through the glass in the ceiling. :rolleyes: Good job.

    Thanks! I made this ALU with speed in mind the whole time, and it ended up faster then I thought it would be


    Also, I'm now working on a CPU, which will have an ALU similar to this, except in a tower, and maybe 4 registers? Depends how lazy I'm feeling
    Posted in: Redstone Discussion and Mechanisms
  • 0

    posted a message on 4-Bit CPU with RAM
    Quote from Hans Lemurson

    Heh, 5 bit ALU. Why 5 bits? The "custom" with for the number of bits a device handles tends to be powers of 2, but you've gone and not only chosen a number that isn't a power of 2, but isn't even EVEN!!! 5 is a nice number though, so I don't fault you for defying seemingly arbitrary convention.

    You did a good job getting all those functions in, and I like the aesthetics of your control-room. Given that you already have 2 registers of memory incorporated, I think your ALU is already heading into CPU territory.


    Well I had done 4 bits before, and I figured "why not" and just added another bit in there. Is there a specific reason people normally use powers of 2?
    Posted in: Redstone Discussion and Mechanisms
  • 0

    posted a message on 4-Bit CPU with RAM
    Quote from Oracular

    I'm also working on a CPU. Do you use the standard full adders in a chain to make the 5 bit adder, or do you have a custom-made, more efficient adder?


    I just used a compact design I found for an adder, and put them in a chain.

    Quote from mattloto

    Okay, well I don't know of any good links about RAM besides wikipedia, but I'll try to explain it in a minecraft sense. To store a bit of data, you need some type of flip flop. A common and fairly small one is an RS NOR (and a lesser-used RS NAND). I found a big issue in using them with minecraft for RAM, however. For a complete understanding of how they work, look up "RS NOR" on wikipedia and read up on it, but basically there are 2 inputs, S and R. If you want the value that the flip flop stores to be a 1, you need to send a signal to S. If you want the value to be a 0, you need to send a signal to R. The only way I found that I could get it to work is to have the value we want to be connected to S and the inverse of that connected to R. However, RS NORs aren't clocked, so I had to have a clock signal, and make the connection to S equal to the bit value we want to store LOGICAL AND a clock signal, and the same for the R but with the inverse of the bit value. This was very big, since this is a picture of just 4 bits:
    -snip-

    The way I'd recommend is a D flip flop. They only require 1 line for data, and 1 line for clock, making them much simpler. There's also a design on the minecraft wiki for a vertical design, making them small and easy to store. Here's a picture of 4 bits using the D flip flop:

    The left is the 4 bits plus clock, and on the right are the 4 bits output. I could have made the input/outputs smaller by making the I/O 2 levels high instead of one (I made 2 levels of signals for the first design).

    Now that's just the physical memory itself. Assuming you have more than 1 byte of memory (I would suggest making a byte only 5 bits in your case, since your ALU is 5), you will need some way of getting the data at a specific address. To do that, what you need to make is a "control" chip for RAM(not sure of it's real name). When your soon-to-be CPU wants to grab or set memory, it would send the control the address of the memory cell (aka 0, 1, 2, etc), the 5 bits of values you want to set, and possibly a line for the clock, depending on how you set it up. Then, the control chip would use a decoder to handle the memory address. A decoder basically takes in a binary value and sends out the data on that specific line (again, look on wikipedia for more descriptive detail and how to make one). It gets crazy when you have a lot of memory cells, and there's probably a better way to do it, but that will work. Reading in values is a little different. For that, you would use a multiplexer, which is pretty much a reverse decoder (again, check wikipedia for info about it). I think thats all you would need for a basic RAM system. Hope this helps, and if you need help with any other things, feel free to ask!


    I've already got D-Flip Flops in my design, but I'll take a look at the rest, thanks!

    Quote from CX gamer

    Ha! That's my 1 wide design you used right there xD
    Though I have now been able to get it much smaller. If you're interested;
    http://www.planetminecraft.com/project/2-wide-2-high-tileable-dflipflop-for-redstone-screens/

    Also, you may find yourself interested in the redstone development foundation. A redstone-based community, you may learn from us, and we may learn from you.
    http://www.minecraftforum.net/topic/289808-redstone-development-foundation-rdf/


    Thanks, I'll take a look at both and I might end up joining the RDF :smile.gif:
    Posted in: Redstone Discussion and Mechanisms
  • 0

    posted a message on 4-Bit CPU with RAM
    Quote from lankher

    I was aching to do an ALU myself, it was a bit scary, but now that I've studied yours I'm pretty sure I can make one myself now, you've definitely helped me mate, thanks


    Thanks! And good luck aswell!
    Posted in: Redstone Discussion and Mechanisms
  • 0

    posted a message on 4-Bit CPU with RAM
    Quote from shrogg

    wait, when did this phase pass?
    Im still going strong, and our clan is getting bigger by the day.

    @OP

    Nice job on this! its great to see people building things like this, but i havent actually seen a proper CPU (well except for The1laz) but yeah, good luck with your project


    Thanks! And I don't think the CPU will be done for a long time, but I'm working on it :wink.gif:
    Posted in: Redstone Discussion and Mechanisms
  • 0

    posted a message on 4-Bit CPU with RAM
    Quote from Sdurant

    and what is this simple technique you speak of? I would really like to know, because ive been trying to find a way to do it easily for a while now.




    best explanation I've heard:
    when he says sr latch he means RS nor latch.

    *video*

    His version is huge and bulky, but it should help you understand how RAM works.

    Well I don't know if this would require a CPU, as I haven't thought it through too much, but you could put your first input into a register, and what you would like to multiply it by in another register. The ALU would add the number to itself, and each time it does that, the second register would decrease by one. When Register 2 = 00000, it would output Register 1.

    I'm not to sure if this makes sense though :tongue.gif:

    Also, I'll take a look at the video and see if I can do anything with it, thanks!
    Posted in: Redstone Discussion and Mechanisms
  • 0

    posted a message on 4-Bit CPU with RAM
    Quote from mattloto

    Well if you don't want to hard-code multiplication into the ALU, wait until you have a CPU and RAM to store programs, and then you can have code that does that. Also, how do you write values to the registers? Do you have instruction code for that, or do you control those values on your own?

    Also, if you need help designing a RAM/memory system, I once did a basic little RAM (don't have the save file, though) and would be happy to help or just send you off in the right direction.


    For the value writing, I just put a D-Flip Flop for each digit of each register, so a total of 10 D-Flip Flops.

    Also, would you be able to just send a link, or some information regarding RAM? I've read a bit on it but I don't understand how to implement it into minecraft.
    Posted in: Redstone Discussion and Mechanisms
  • 0

    posted a message on 4-Bit CPU with RAM
    Quote from Oracular

    You should try making it multiply (a big challenge) and divide (a challenge that I will likely never finish on my ALU)! I'd love to see it!


    Well, mine does have mutliplying and dividing by two (shifting), but not more.
    I wanted to add some basic multiplication, but that takes forever...
    I might though, we'll see, I can probably find a way through to make it simpler.
    ..In fact, I just thought of a way to do that very simply :wink.gif:
    Posted in: Redstone Discussion and Mechanisms
  • To post a comment, please or register a new account.