Simply use the bazzel flop, the most simple, compact, fast form of D FLip FLop. You can easily even make a bidirectional shifter. Made one my self.
SImple make a D flip flop, then connect the output of one to the input of the other.
I haven't yet tried any other kind of Flip Flop other than a T-FF. So I will get to that when I know some other FF's
Yep. Sorry about the confusion. I thought that might happen but it didn't seem to be happening on mine. But yeah you just need to increase them all by 1 bit and then shift the AND gate back 1 bit too.
Here 5 bits in each register:
What do you mean shift the AND gate back 1 bit. I just chose a random cell from each register and connected it to the gate (black)
EDIT: Somedays ago I made my design of a combo lock, I will show you that once I finish with this.
Sorry for not being on in a while. By shifting the AND gate back 1 bit I mean move the pink lines back to the memory cell behind the one they are already on. So the first one there will be connected to the last memory cell, the 2nd will be connected to the 3rd memory cell instead of the 2nd etc.
I will be happy to look over it =D. I've made many in my life but most of them required reset buttons and stuff or 'enter' buttons at least.
I tried moving each bit towards the buttons (down) and up by 1 bit, but I couldn't get the lock to open. I am not really even sure what the passcode is supposed to me. =) What should I do?
For example, if you were to invert both inputs and then choose to use the output of the AND gates and then invert that again you preformed an OR operation on the original 2 pieces of data while there is no OR gate anywhere in the system.
Actually you can do create every logic gates with only NAND or NOR gates.
For your example :
- Compare both inputs with the NOR
- Take the output and use it as the two inputs of a NOR gate to invert it
You performed an OR operations when there are only NOR gates
OT:
At first someone asked him to create a lock by himself, and then everyone started showing him how to do so? That's not really "by himself". With the gates he knew at the beginning and an RS NOR latch, you can create a 4 digit lock.
Actually you can do create every logic gates with only NAND or NOR gates.
For your example :
- Compare both inputs with the NOR
- Take the output and use it as the two inputs of a NOR gate to invert it
You performed an OR operations when there are only NOR gates
OT:
At first someone asked him to create a lock by himself, and then everyone started showing him how to do so? That's not really "by himself". With the gates he knew at the beginning and an RS NOR latch, you can create a 4 digit lock.
Good to know, In my personal design of a combo lock, I used the NOR latches.
Read the post, I was discussing the merits of a HACK architecture ALU, not the functional completeness of NAND and NOR gates. Obviously you can use NOR gates to make any logic gate(else we wouldn't be able to make all of them), but a HACK ALU does not contain the proper pathways to utilize this property. Yet using clever properties of the gates that are represented one can still preform almost all logic operations within 1 clock cycle. Only exception would be XOR and XNOR, only ways I can see those happen with a HACK ALU require multiple operations. Like (!A&B )|(A&!B ) or (A|B )-(A&B )
Again good to know, but I at the moment have not yet moved on to making ALU's for Adders etc, so I haven't seen the design of the HACK ALU.
The passcode should be 1324 I will make another diagram when I have more time but I really gotta go to bed now =P I will get it out in a couple of days or so =)
Well nothing was working so eventually I typed in 1324 and corrected the cells from the bit to the door, so now 1324 works.
@Lefou - I agree. I may have tried to help a little too much and in turn just given vegito commands to build to a certain design... But if Vegito has understood how everything is working so far I am happy. If he has not then oh well... haha.
I did understand how it works, that's why I was able to build my own combo lock, although it doesn't use any shift registers. I will show it you probably in the next post or so. Just making some last minute changes and working on compacting although it is pretty small just like the way it is.
Lol read the whole post, it was actually pretty interesting :P, wasn't expecting to learn about **** registers when I clicked here so that was pretty random Anw thanks Sancarn for the explanation since I'm a noob too.
OK, the following is the final design of my Combination Lock:
Passcode: 1234
So I simple started off with the RS NOR Latches (Lime Wool) and simply connected it to a NAND gate (purple & red wool). The iron block with the buttons on them is the control pad. So with that you could press 1234 in any order and as many times as you like and the gate would open. i.e 444433321111222 <--- that would open it because it had 1234 it in, but I thought that there wasn't really any point of making a combo lock that it's order sensitive so then I added the red wool right behind the iron blocks.
The red wool is connected to a piston that pushes the wool up when the previous number had been correctly pressed. i.e, now if you press 2,3 or 4 nothing would happen but if you press 1 that it would enable button 2 to work, then 3 and finally 4. So now you must press 1234. So the gate would still open if you press:
223232431222222222444444333444
It has 1234 so it would open. But I wanted to add some kind of safety systems so you couldn't just press random buttons until it opens.
Then came the cyan wool. I found this part of the project the hardest because I think there were multiple ways but for me they didn't seem to work. The cyan wool near the glowstone is extended by pistons and connected up to the reset line which resets all the NOR Latch. so now if a person press 1 then it would retract the piston for number 2 disabling the reset for number 2, so you could go ahead and press 2 and it would disable the reset system for 3 and keep it disabled for 2 as well. but now if a person presses 4 instead of 3 then it would reset each RS NOR Latch which basically resets every input so you have to start again.So now you must press 1234 and only 1234, but still this would work:
122222222223333333334444444444 <-- it has 1234 and no wrong numbers in it that would reset the system.
I wanted to go ahead a little more and try to make only 1234 work. So I headed for reset functions, thats the cyan wool down below into the pit. This system would enable the reset lines after you have pressed the correct button. I.e I press 1, it would disable the reset for 2, but enable the reset for 1 while 3 and 4 are still also enabled meaning that now if I press 1 again it would reset the system. I press 1, then 2, then 3, now the reset lines would be enabled for 1, 2 and 4. So now only this would work
1234 (Mission Accomplished)
Sorry If I didn't really explain it correctly in some of the parts, but it was a big project for me at least and for me there was a lot of trail and error (especially with the reset system).
Also when a person walks inside the door, there is a reset button (gray line that connects to the cyan). The button would reset the combo lock, also if you put a lever instead of the button and pull it down, it would keep the reset line on at all times in turn basically locking the door, because no code would work now because it just keeps of reset-ing.
Some random notes:
I got a bit more feel for the use of glowstone because I had to use it. Too many wires going everywhere.
I attempted to make a very very simple binary combo lock.
I'm too lazy to add more features to it.
Keep it up!, keep learning and hopefully you will be able to make a computer.
Look at designs, just learn what SHOULD happen and what IT is.
Like with a half adder. Let's first look at it's truth table.
A = 0; B = 0 | C = 0; S = 0
A = 1; B = 0 | C = 0; S = 1
A = 0; B = 1 | C = 0; S = 1
A = 1; B = 1 | C = 1; S = 0
We can see that as long as one of them is 0, the result is always one.
And we can see that Carry = 1; Result = 1 is an impossible state.
Now let's see what it's supposed to be. A half adder adds two binary numbers, it has two outputs, S and C, S is for the result of the addition, and the C is the value carried on like in normal addition with base-10.
So the basic and standard design of the half adder would be:
(well im not really good at describing designs so I'll do something different)
S = A XOR B
C = A AND B
This follows the rules above, since S is the direct output of the XOR of A and B, therefore S will only be 1 if only one of the inputs are 1. And both S and C will never be 1 at any single moment, since C is the result of the AND between A and B, so the conditions conflict.
Rinse, lather, and repeat. It's how I learned redstone. Look at a design, figure out how it works, and then really understand it.
You actually started on the same road as me. I showcase my first combination locks . For me these designs were okay because I was using them in conjunction with a vending machine (the enter button was the reset button (1,2,3 Enter = 123).
Also the combination lock automatically reset after you typed in 4 numbers (to stop people spamming the buttons and getting a crap tonne of items.)
I never took it as far as you did so congratulations. On the topic of computers: When computers work stuff out they do stuff in small iterations. A combination lock is just a way of storing memory as you may have found out. However at the end the you get a result instead of just getting a bunch of stored memory.
To actually understand how computers work I have found that programming them helps quite a bit. I've been doing some work with computer craft at the moment and you get a feel for how computers work. A lot of games and stuff like that are in fact computers in there own right. Though they don't necessarily contain cup's. They are specialised computers rather than general computers. This may be a bit disjointed because this is just my thought process =P.
IMO It would be advisable to make some specialised computers before taking on the computer itself though that is up to you. A computer does sound daunting yet it really isn't hugely difficult =). If you are convinced you can handle a computer try and start with an ALU and then go from there.
I deliberately didn't add the automatic reset after the last number because I had it planned to be attached a door rather than a vending machine. Good to see you liked it.
Before moving on the the ALU, don't I need to learn a bit of binary and the adders?
I attempted to make a very very simple binary combo lock.
I'm too lazy to add more features to it.
Keep it up!, keep learning and hopefully you will be able to make a computer.
Look at designs, just learn what SHOULD happen and what IT is.
Like with a half adder. Let's first look at it's truth table.
A = 0; B = 0 | C = 0; S = 0
A = 1; B = 0 | C = 0; S = 1
A = 0; B = 1 | C = 0; S = 1
A = 1; B = 1 | C = 1; S = 0
We can see that as long as one of them is 0, the result is always one.
And we can see that Carry = 1; Result = 1 is an impossible state.
Now let's see what it's supposed to be. A half adder adds two binary numbers, it has two outputs, S and C, S is for the result of the addition, and the C is the value carried on like in normal addition with base-10.
So the basic and standard design of the half adder would be:
(well im not really good at describing designs so I'll do something different)
S = A XOR B
C = A AND B
This follows the rules above, since S is the direct output of the XOR of A and B, therefore S will only be 1 if only one of the inputs are 1. And both S and C will never be 1 at any single moment, since C is the result of the AND between A and B, so the conditions conflict.
Rinse, lather, and repeat. It's how I learned redstone. Look at a design, figure out how it works, and then really understand it.
I kinda see how it works (the half adder). I think it would be even more clear when put into practical use in Minecraft.
So Sancarn, the following is basically what I know about binary at the moment. Sorry for the extremely delayed reply I just wanted a little break after starting up again.
So I did some practice questions. I didn't use a calculator (there wasn't really any need)
I think I do understand, to me it looks at bit like the decimal system, the only difference is that it only goes up to 1, so it requires a carry when more than 1 is required.
I think I get it and that I will get better at it as we go on.
Ok right, at the moment I only found 2 things I was confused about.
About the XOR part:
A = 0, B = 0 -> O = 0
So if these two values are put into an XOR gate you would get a 0 (output = 0 )
A = 1, B = 0 -> O = 1
If these are put into an XOR gate you would get a 1
A = 1, B = 1 -> O = 0 Carry = 1 (into the next adder)
These two in the XOR will equal 0 but will require a carry into the next adder?
Am I correct so far?
First we add 1 and 0 to get 1 and a carry of 0. Then we add 0 and 1 to get 1 and a carry of 0. Then we add 1 and 1 to get 1 and a carry of 1.
About the last line. Should it equal 0 and a carry of 1 or have I got it wrong?
Another question: In a line of adders, is the first adder always a half adder because it doesn't have any output coming from the last adder (because it is the first adder), but the rest of the adders would always be full adders because it needs a Cin and it's own 2 inputs?
Other than that, I think I get it all! =)
By the way this is what I got when I tried to make a half adder using an XOR gate and an AND gate. It seems to follow the truth table =)
You need a LOT more knowledge to build a computer. If you want to build a computer in Minecraft you need to know how to build one in real life, there are no shortcuts really.
You seem to know a lot about redstone , I'm at the level of making up my own combination locks:
This is my own design, I invented them both myself , the 9 button pass door might be like someone else's, because they are made the same way... These were both invented by me without any help or tutorial from anyone else.
Maybe you could teach me how binary works in minecraft, that would be awesome and I would be able to do a whole lot more in minecraft !
If you two are interested in learning redstone from the bare basics, I have a youtube channel (link in my signature of this post) And I teach from the bare basics, all the way up to building a computer in minecraft
If you two are interested in learning redstone from the bare basics, I have a youtube channel (link in my signature of this post) And I teach from the bare basics, all the way up to building a computer in minecraft
I watched the videos, good work. Although I knew the stuff up to episode 3 I believe. Get em more out and I will watch them.
I haven't yet tried any other kind of Flip Flop other than a T-FF. So I will get to that when I know some other FF's
Yep. Sorry about the confusion. I thought that might happen but it didn't seem to be happening on mine. But yeah you just need to increase them all by 1 bit and then shift the AND gate back 1 bit too.
Here 5 bits in each register:
What do you mean shift the AND gate back 1 bit. I just chose a random cell from each register and connected it to the gate (black)
EDIT: Somedays ago I made my design of a combo lock, I will show you that once I finish with this.
I tried moving each bit towards the buttons (down) and up by 1 bit, but I couldn't get the lock to open. I am not really even sure what the passcode is supposed to me. =) What should I do?
Actually you can do create every logic gates with only NAND or NOR gates.
For your example :
- Compare both inputs with the NOR
- Take the output and use it as the two inputs of a NOR gate to invert it
You performed an OR operations when there are only NOR gates
OT:
At first someone asked him to create a lock by himself, and then everyone started showing him how to do so? That's not really "by himself". With the gates he knew at the beginning and an RS NOR latch, you can create a 4 digit lock.
Good to know, In my personal design of a combo lock, I used the NOR latches.
Again good to know, but I at the moment have not yet moved on to making ALU's for Adders etc, so I haven't seen the design of the HACK ALU.
I did understand how it works, that's why I was able to build my own combo lock, although it doesn't use any shift registers. I will show it you probably in the next post or so. Just making some last minute changes and working on compacting although it is pretty small just like the way it is.
Passcode: 1234
So I simple started off with the RS NOR Latches (Lime Wool) and simply connected it to a NAND gate (purple & red wool). The iron block with the buttons on them is the control pad. So with that you could press 1234 in any order and as many times as you like and the gate would open. i.e 444433321111222 <--- that would open it because it had 1234 it in, but I thought that there wasn't really any point of making a combo lock that it's order sensitive so then I added the red wool right behind the iron blocks.
The red wool is connected to a piston that pushes the wool up when the previous number had been correctly pressed. i.e, now if you press 2,3 or 4 nothing would happen but if you press 1 that it would enable button 2 to work, then 3 and finally 4. So now you must press 1234. So the gate would still open if you press:
223232431222222222444444333444
It has 1234 so it would open. But I wanted to add some kind of safety systems so you couldn't just press random buttons until it opens.
Then came the cyan wool. I found this part of the project the hardest because I think there were multiple ways but for me they didn't seem to work. The cyan wool near the glowstone is extended by pistons and connected up to the reset line which resets all the NOR Latch. so now if a person press 1 then it would retract the piston for number 2 disabling the reset for number 2, so you could go ahead and press 2 and it would disable the reset system for 3 and keep it disabled for 2 as well. but now if a person presses 4 instead of 3 then it would reset each RS NOR Latch which basically resets every input so you have to start again.So now you must press 1234 and only 1234, but still this would work:
122222222223333333334444444444 <-- it has 1234 and no wrong numbers in it that would reset the system.
I wanted to go ahead a little more and try to make only 1234 work. So I headed for reset functions, thats the cyan wool down below into the pit. This system would enable the reset lines after you have pressed the correct button. I.e I press 1, it would disable the reset for 2, but enable the reset for 1 while 3 and 4 are still also enabled meaning that now if I press 1 again it would reset the system. I press 1, then 2, then 3, now the reset lines would be enabled for 1, 2 and 4. So now only this would work
1234 (Mission Accomplished)
Sorry If I didn't really explain it correctly in some of the parts, but it was a big project for me at least and for me there was a lot of trail and error (especially with the reset system).
Also when a person walks inside the door, there is a reset button (gray line that connects to the cyan). The button would reset the combo lock, also if you put a lever instead of the button and pull it down, it would keep the reset line on at all times in turn basically locking the door, because no code would work now because it just keeps of reset-ing.
Some random notes:
I got a bit more feel for the use of glowstone because I had to use it. Too many wires going everywhere.
I got a huge feel for redstone!
I'm too lazy to add more features to it.
Keep it up!, keep learning and hopefully you will be able to make a computer.
Look at designs, just learn what SHOULD happen and what IT is.
Like with a half adder. Let's first look at it's truth table.
A = 0; B = 0 | C = 0; S = 0
A = 1; B = 0 | C = 0; S = 1
A = 0; B = 1 | C = 0; S = 1
A = 1; B = 1 | C = 1; S = 0
We can see that as long as one of them is 0, the result is always one.
And we can see that Carry = 1; Result = 1 is an impossible state.
Now let's see what it's supposed to be. A half adder adds two binary numbers, it has two outputs, S and C, S is for the result of the addition, and the C is the value carried on like in normal addition with base-10.
So the basic and standard design of the half adder would be:
(well im not really good at describing designs so I'll do something different)
S = A XOR B
C = A AND B
This follows the rules above, since S is the direct output of the XOR of A and B, therefore S will only be 1 if only one of the inputs are 1. And both S and C will never be 1 at any single moment, since C is the result of the AND between A and B, so the conditions conflict.
Rinse, lather, and repeat. It's how I learned redstone. Look at a design, figure out how it works, and then really understand it.
I kinda see how it works (the half adder). I think it would be even more clear when put into practical use in Minecraft.
So I did some practice questions. I didn't use a calculator (there wasn't really any need)
1|2|4|8|16|32|64|128|256|512|1024|2048|4096 --->
20|21|22|23|24|25|26|27|28|29|210|211|212
54
32 x 1 = 32 | 32
16 x 1 = 16 | 48
08 x 0 = 00 | 48
04 x 1 = 04 | 52
02 x 1 = 02 | 54
01 x 0 = 00 | 54
= 54
110110
120
64 x 1 = 64 | 064
32 x 1 = 32 | 096
16 x 1 = 16 | 112
08 x 1 = 08 | 120
04 x 0 = 00 | 120
02 x 0 = 00 | 120
01 x 0 = 00 | 120
= 120
1111000
178
128 x 1 = 128 | 128
064 x 0 = 000 | 128
032 x 1 = 032 | 160
016 x 1 = 016 | 176
008 x 0 = 000 | 176
004 x 0 = 000 | 176
002 x 1 = 000 | 178
001 x 0 = 000 | 178
= 178
10110010
39
32 x 1 = 32 | 32
16 x 0 = 00 | 32
08 x 0 = 00 | 32
04 x 1 = 04 | 36
02 x 1 = 02 | 38
01 x 1 = 01 | 39
= 39
100111
203
128 x 1 = 128 | 128
064 x 1 = 064 | 192
032 x 0 = 000 | 192
016 x 0 = 000 | 192
008 x 1 = 008 | 200
004 x 0 = 000 | 200
002 x 1 = 002 | 202
001 x 1 = 001 | 203
= 203
11001011
99
64 x 1 = 64 | 64
32 x 1 = 32 | 96
16 x 0 = 00 | 96
08 x 0 = 00 | 96
04 x 0 = 00 | 96
02 x 1 = 02 | 98
01 x 1 = 01 | 99
= 99
1100011
I think I get it and that I will get better at it as we go on.
So now what should we move on to?
About the XOR part:
A = 0, B = 0 -> O = 0
So if these two values are put into an XOR gate you would get a 0 (output = 0 )
A = 1, B = 0 -> O = 1
If these are put into an XOR gate you would get a 1
A = 1, B = 1 -> O = 0 Carry = 1 (into the next adder)
These two in the XOR will equal 0 but will require a carry into the next adder?
Am I correct so far?
First we add 1 and 0 to get 1 and a carry of 0.
Then we add 0 and 1 to get 1 and a carry of 0.
Then we add 1 and 1 to get 1 and a carry of 1.
About the last line. Should it equal 0 and a carry of 1 or have I got it wrong?
Another question: In a line of adders, is the first adder always a half adder because it doesn't have any output coming from the last adder (because it is the first adder), but the rest of the adders would always be full adders because it needs a Cin and it's own 2 inputs?
Other than that, I think I get it all! =)
By the way this is what I got when I tried to make a half adder using an XOR gate and an AND gate. It seems to follow the truth table =)
Shall we move on to the trickier cup of tea then?
If you two are interested in learning redstone from the bare basics, I have a youtube channel (link in my signature of this post) And I teach from the bare basics, all the way up to building a computer in minecraft
I watched the videos, good work. Although I knew the stuff up to episode 3 I believe. Get em more out and I will watch them.
He is making computer with redstone but not a mod to make computer.
Keep up Dark I think you can do it