It seems a lot of people on this forum don't understand how logic gates can be used in unison to perform complex tasks. So, I'm going to present some very basic examples in this thread and attempt to completely break down and explain the things that may be confusing to my fellow Minecrafters.
So let's start with something very simple, the adder. This device accomplishes the same thing we did in 1st grade math class, to an extent. The more you wire together, the "smarter" they are, to the point where they can add numbers together faster than you can in your head.
First, you will need this legend if you don't understand the diagrams:
So to begin we have the half adder, which is at the beginning of a series of adders:
In Minecraft, it looks like this:
^^^ Line coming from the XOR gate is the sum, I forgot to label that part.
Next it gets a bit tricky. Now we need an adder that can handle 3 binary digits. For this we will be using a full adder, which is put together like this:
This is what it will look like in Minecraft:
These together are what you would call a 2-bit adder. This is a very slow and large design which you probably should never use. I only built it like this to spread everything out and show how the distinct gates interact. If anything is unclear, hopefully the diagrams I added will clear everything up.
Now, here is a more compact design I, personally, have been working on. It was meant to be an insta-carry adder, but I made the mistake of using the wire cutting technique in the wrong way, so the carry isn't instant at all. It is decently fast though.
^^^The additional input line is for carry in. (This is a full adder)
Now for a demonstration of what the 2-bit adder can actually do. For each adder, the inputs and outputs double, this is how binary digits work. 1, 2, 4, 8, 16, 32, 64, etc. So the half adders inputs are 1's, and the sum is 1, whereas the carry out is recognized as a 2 since the value of two 1's together is 2. It is then input, by way of "carry in" into the full adder as a 2. The inputs and sum of the full adder are all 2's, and the carry out is a 4, as 2 + 2 = 4.
So, let's start off very simple, 1 + 1 = 2
^^^ Input
^^^ Output
Easy, right?
Now let's go balls to the wall and add all of the inputs together. 1 + 1 + 2 + 2 = 6
Well, there you have it. That's one way logic gates can work together to create something quite powerful. I may start doing more advanced logic break downs, like multipliers, dividers, multiplexers, etc, depending on how well this one is received.
If this helped you out please leave a +1. I'm a complete retard when it comes to image editing programs, and using GIMP was a supreme pain in the ass.
What are the practical uses for an adder? Is it simply to build a computer for the sake of doing it? I like building things for my shelters, and random things for people to find and play with, but I don't know how I could apply this to something else. no offense, I greatly respect your redstone work, but my cellphone has a calculator on it, I don't need to load up minecraft to do simple arithmatic lol.
Rollback Post to RevisionRollBack
Without the skin... Beneath the storm... Under these tears...The walls came down
Nice job and thats a pretty clear explanation. Breaking it down to what each part looks like in minecraft is quite helpful. Please do get into the more advanced stuff. For some reason your first picture doesn't show up (above the XOR logic diagram) so that may trip a few people up.
Rollback Post to RevisionRollBack
I tried to sign my name here, but all I managed to do was ruin my computer screen.
What are the practical uses for an adder? Is it simply to build a computer for the sake of doing it? I like building things for my shelters, and random things for people to find and play with, but I don't know how I could apply this to something else. no offense, I greatly respect your redstone work, but my cellphone has a calculator on it, I don't need to load up minecraft to do simple arithmatic lol.
I probably will never use this nor did I put this into deep consideration, but you seemed to have out a lot of effort into this tutorial.
+1 rep for you.
Redstone to me is making a piston door. Haha
It doesn't have to be used just to add numbers, think outside the box. You could have 4 levers and you would have to power one input of each adder and press a button to allow the outputs to be sent out. The outputs could then go to an AND gate that opens a door. Then you could set up a system where if only one sum is active, or if the final carry out line comes on something bad happens, like falling into a pit of lava.
But when it comes to using these for the purpose of building computers and calculators, it's just for fun. Sure, you could use a real calculator/computer without worrying about what is going on inside of it. But, for me, I like to know, I want to learn everything about everything when it comes to electronics. I find it extremely interesting how electricity can be used to form complex algorithms to accomplish these kinds of tasks.
Nice job and thats a pretty clear explanation. Breaking it down to what each part looks like in minecraft is quite helpful. Please do get into the more advanced stuff. For some reason your first picture doesn't show up (above the XOR logic diagram) so that may trip a few people up.
WTF!? This thread is horribly plagued by broken images. That one worked just fine when I posted this, now it's the third one I've had to fix. It should show up just fine within a few minutes.
EDIT: Found a new logic gate legend. And, though it's hideous, I think it gets the point across.
WTF!? This thread is horribly plagued by broken images. That one worked just fine when I posted this, now it's the third one I've had to fix. It should show up just fine within a few minutes.
EDIT: Found a new logic gate legend. And, though it's hideous, I think it gets the point across.
Yep that fixed it. It looks good to me. For this topic are you planning on explaining all the basic components used to make each computer component? example next lesson might be memory latches.
Rollback Post to RevisionRollBack
I tried to sign my name here, but all I managed to do was ruin my computer screen.
Yep that fixed it. It looks good to me. For this topic are you planning on explaining all the basic components used to make each computer component? example next lesson might be memory latches.
Well... I suppose I could do that. Memory latches have nothing to do with logic, but they can be extremely useful to applications outside of computer science as well. Probably more so than anything based on logic.
I can't really think of any uses for decoders besides a computer. I suppose you could use it for program memory if you wanted several devices to be controlled automatically. You could program them however you wanted. Most other components are just for building a computer, the way I see it. I'm sure there are other uses I'm not creative enough to think of though.
Well... I suppose I could do that. Memory latches have nothing to do with logic, but they can be extremely useful to applications outside of computer science as well. Probably more so than anything based on logic.
I can't really think of any uses for decoders besides a computer. I suppose you could use it for program memory if you wanted several devices to be controlled automatically. You could program them however you wanted. Most other components are just for building a computer, the way I see it. I'm sure there are other uses I'm not creative enough to think of though.
I was just thinking in terms of logic+memory. People might see the usefulness of that and be able to apply it to their creations.
Rollback Post to RevisionRollBack
I tried to sign my name here, but all I managed to do was ruin my computer screen.
im still a little lost, im trying to process whats going on which will mean probably ill hae to build it, thats how i learn taking things apart and putting things together.... i hated school, lol but the images are a great start plus having insightful explanations that can help me figure this stuff out is great, thanks for posting this man. go ahead and put all the technical explanations out there, thats what im good at is figuring out crazy ways to use these kinds of machines.
im still a little lost, im trying to process whats going on which will mean probably ill hae to build it, thats how i learn taking things apart and putting things together.... i hated school, lol but the images are a great start plus having insightful explanations that can help me figure this stuff out is great, thanks for posting this man. go ahead and put all the technical explanations out there, thats what im good at is figuring out crazy ways to use these kinds of machines.
It's easier to understand how it works by studying the real life diagram. You can see that input A in the first XOR will return true if input B is off, the first XOR's output goes into the second XOR's A input, and if the carry in is low it will also return true, giving you a sum. Same thing if only input B is high, but when the carry in is active, the second XOR gate is receiving two inputs, and it returns false. Then, the carry in also goes to input A of an AND gate, where the first XOR gate's output is already high in input B of the same AND gate, it passes through the OR gate and carries out.
Likewise if there is no carry in and both input A and B are high, nothing happens to the XOR gate, the inputs go to the other AND gate, which outputs through the same OR gate and carries out. If all inputs are active, then input A and B do the same as before and carry out, but the carry in is the only thing inputting to the second XOR gate this time, therefore you get a sum as well as a carry out.
This sounds like a lot to take in, but, if you look at the diagram and follow along, it's really not that complicated. Once you understand this, it's quite easy to build. The tricky part is making a compact design, this comes with experience and the knowledge of how redstone items interact with blocks and other redstone items. Also some trial and error.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
-
View User Profile
-
View Posts
-
Send Message
Retired StaffSo let's start with something very simple, the adder. This device accomplishes the same thing we did in 1st grade math class, to an extent. The more you wire together, the "smarter" they are, to the point where they can add numbers together faster than you can in your head.
First, you will need this legend if you don't understand the diagrams:
So to begin we have the half adder, which is at the beginning of a series of adders:
In Minecraft, it looks like this:
^^^ Line coming from the XOR gate is the sum, I forgot to label that part.
Next it gets a bit tricky. Now we need an adder that can handle 3 binary digits. For this we will be using a full adder, which is put together like this:
This is what it will look like in Minecraft:
These together are what you would call a 2-bit adder. This is a very slow and large design which you probably should never use. I only built it like this to spread everything out and show how the distinct gates interact. If anything is unclear, hopefully the diagrams I added will clear everything up.
Now, here is a more compact design I, personally, have been working on. It was meant to be an insta-carry adder, but I made the mistake of using the wire cutting technique in the wrong way, so the carry isn't instant at all. It is decently fast though.
^^^The additional input line is for carry in. (This is a full adder)
Now for a demonstration of what the 2-bit adder can actually do. For each adder, the inputs and outputs double, this is how binary digits work. 1, 2, 4, 8, 16, 32, 64, etc. So the half adders inputs are 1's, and the sum is 1, whereas the carry out is recognized as a 2 since the value of two 1's together is 2. It is then input, by way of "carry in" into the full adder as a 2. The inputs and sum of the full adder are all 2's, and the carry out is a 4, as 2 + 2 = 4.
So, let's start off very simple, 1 + 1 = 2
^^^ Input
^^^ Output
Easy, right?
Now let's go balls to the wall and add all of the inputs together. 1 + 1 + 2 + 2 = 6
Well, there you have it. That's one way logic gates can work together to create something quite powerful. I may start doing more advanced logic break downs, like multipliers, dividers, multiplexers, etc, depending on how well this one is received.
If this helped you out please leave a +1. I'm a complete retard when it comes to image editing programs, and using GIMP was a supreme pain in the ass.
EDIT: Fixed the broken images.
+1 rep for you.
Redstone to me is making a piston door. Haha
I tried to sign my name here, but all I managed to do was ruin my computer screen.
-
View User Profile
-
View Posts
-
Send Message
Retired StaffIt doesn't have to be used just to add numbers, think outside the box. You could have 4 levers and you would have to power one input of each adder and press a button to allow the outputs to be sent out. The outputs could then go to an AND gate that opens a door. Then you could set up a system where if only one sum is active, or if the final carry out line comes on something bad happens, like falling into a pit of lava.
But when it comes to using these for the purpose of building computers and calculators, it's just for fun. Sure, you could use a real calculator/computer without worrying about what is going on inside of it. But, for me, I like to know, I want to learn everything about everything when it comes to electronics. I find it extremely interesting how electricity can be used to form complex algorithms to accomplish these kinds of tasks.
WTF!? This thread is horribly plagued by broken images. That one worked just fine when I posted this, now it's the third one I've had to fix. It should show up just fine within a few minutes.
EDIT: Found a new logic gate legend. And, though it's hideous, I think it gets the point across.
Yep that fixed it. It looks good to me. For this topic are you planning on explaining all the basic components used to make each computer component? example next lesson might be memory latches.
I tried to sign my name here, but all I managed to do was ruin my computer screen.
-
View User Profile
-
View Posts
-
Send Message
Retired StaffWell... I suppose I could do that. Memory latches have nothing to do with logic, but they can be extremely useful to applications outside of computer science as well. Probably more so than anything based on logic.
I can't really think of any uses for decoders besides a computer. I suppose you could use it for program memory if you wanted several devices to be controlled automatically. You could program them however you wanted. Most other components are just for building a computer, the way I see it. I'm sure there are other uses I'm not creative enough to think of though.
I was just thinking in terms of logic+memory. People might see the usefulness of that and be able to apply it to their creations.
I tried to sign my name here, but all I managed to do was ruin my computer screen.
-
View User Profile
-
View Posts
-
Send Message
Retired StaffIt's easier to understand how it works by studying the real life diagram. You can see that input A in the first XOR will return true if input B is off, the first XOR's output goes into the second XOR's A input, and if the carry in is low it will also return true, giving you a sum. Same thing if only input B is high, but when the carry in is active, the second XOR gate is receiving two inputs, and it returns false. Then, the carry in also goes to input A of an AND gate, where the first XOR gate's output is already high in input B of the same AND gate, it passes through the OR gate and carries out.
Likewise if there is no carry in and both input A and B are high, nothing happens to the XOR gate, the inputs go to the other AND gate, which outputs through the same OR gate and carries out. If all inputs are active, then input A and B do the same as before and carry out, but the carry in is the only thing inputting to the second XOR gate this time, therefore you get a sum as well as a carry out.
This sounds like a lot to take in, but, if you look at the diagram and follow along, it's really not that complicated. Once you understand this, it's quite easy to build. The tricky part is making a compact design, this comes with experience and the knowledge of how redstone items interact with blocks and other redstone items. Also some trial and error.