BD applications in Redstone logic gates

A place to talk to other users about the mod.
User avatar
HavokSCOUT
Posts: 514
Joined: Tue Jul 05, 2011 8:44 am
Location: Surrounded by creepers

BD applications in Redstone logic gates

Post by HavokSCOUT »

I am doing this to centralize knowledge that can better our minecraft experience. There have been discussions on different applications of Block Dispensers in making commonly used redstone circuits smaller and easier to use. If you notice that I have missed something that is useful, please use the forums and say so. If you have a more compact version of an existing circuit, it would be best if you PM'd me with either pics, schematics, a diagram, or a very informative description of the circuit, and if I can build it, I will put it in the OP and give you credit for being smarter than me.
  • And Gate
  • Nand Gate
  • RS-Nor Latch
  • B Flip Flop
  • Xnor Gate
  • Xor Gate
  • BD n-switcher
  • D Flip Flop
  • JK Flip FLop
  • Implies Gate


And Gate
Spoiler
Show
Image
This gate sends out a signal if both inputs are on. Size:2x1x3
Nand Gate
Spoiler
Show
Image
Less common than the And gate, it is built the same except for a not gate, or inverter, at the output and it does not send out a signal if both inputs are on. Size:2x1x6
RS-Nor Latch
Spoiler
Show
Image


Image
This gate allows pulses of power, such as a button press, something triggering a pressure plate, or something triggering the detector block, to become a continual power until it is reset. For the first circuit, the input is the Block Dispenser, or BD, the output is the redstone torch placed by the BD, and the reset is the block that the torch is on. Size: 1x3x1 The second circuit relies on the block above the torch and the redstone on the BD to keep the output on. Size: 3x2x2
B Flip Flop
Spoiler
Show
Image
Credit for this insanely compact version goes to Battosay. A T Flip Flop changes its output from off to on ,and vice versa, every time the input switches state, i.e. the input goes on then off, the output turns on. the input goes on and off again, and the output turns off. This is achieved by placing a block that can transmit redstone power and a glass block in a block dispenser, hooking the input up to a not gate, and placing a torch underneath the block that will be placed. This can also be adapted to recognize a certain number of pulses by placing the conductive block in a later slot and filling the ones before it with glass. Size:2x2x4
Xnor Gate
Spoiler
Show
Image


Image


Image
An Xnor Gate will output power if the inputs are equal, but will not output power when the outputs aren't equal. In this setup, it includes two of the earlier mentioned and gates, with one having the inputs inverted, and the other having them normally. Size:2x3x5
Xor Gate
Spoiler
Show
Image


Image


Image
This gate is the exact opposite of the Xnor gate, in that it will output power if both inputs are unequal, and not output power when both inputs are equal. I basically put a not gate at the output to invert the signal, so it is only one block larger than the Xnor gate. Size:2x3x6
BD n-switcher
Spoiler
Show
Image
Congrats to Harcion for this neat little counter. Seeing as he is the creator, I should quote some of his description:
Harcion wrote:It has one input, one toggle and three outputs. Every time the toggle receives a pulse the input is routed to the next output in a cyclical manner. That is, the redstone current first goes through the 1st output then switches to the 2nd, then to the 3rd and then on the next toggle back to the 1st output.

In the picture, the input is to the right, the outputs on the other side and the toggle input is above the button. There is redstone on top of the blocks on top of the BD's, to activate them.

Each BD contains three blocks - one conductive (A) and two non-conductive (B,C). The first BD has them in the A,B,C order, the next one has C,A,B and the last one has B, C, A. In this case I used axles and fences for B and C and repeaters for A. Repeaters only work if you build it in the correct cardinal direction.

Either using more repeaters (because the outputs get tangled up otherwise), or having some space between the BD's, you can easily make an n-switcher for n <= 9 using the same concept.
D Flip Flop
Spoiler
Show
Image


Image


Image


Image
The purpose of this Flip Flop is as a memory cell. The output will be the opposite of the lever connected to the torch in the first two pictures, but if the other lever is on, the output will ignore any changes in the first lever. The first picture is 4x2x5, and has the input to the memory cell on (more or less) the same plane. The second picture is a vertical adaptation with a size of 2x4x5, and it allows fairly parallel circuits, spaced two or three blocks apart. The third and fourth pictures are designs created by Rasuth. They both use an And gate and an rs-nor latch, while capitalizing on the powering abilities of redstone and BDs to use the same current that triggers the BD in the And gate to also activate the clock. Size:3x3x7. The second one is 2x3x6
JK-FlipFlop using BD
Spoiler
Show
Image
Rasuth wrote:The JK-FF has 4 potential states, depending on the inputs J(ump) and K(ill) every clock pulse one of the following happens:
J=0, K=0 : keep state, Output stays the same.
J=1, K=0 : Jump, Output is set to true.
J=0, K=1 : Kill, Output is set to false.
J=1, K=1 : Trigger, Output changes state from false to true or vice versa.
This design by Rasuth uses a B-FF as internal memory cell and triggers it when (Clock AND ((J AND NOT(Q)) OR (K AND Q)) evaluates to true. Size: 6x3x11
Truthtable:
Q is the current output of the FF, Q+ is the output after the next clock pulse. T indicates wether the internal T-FF needs to be triggered or not.
J|K|Q|Q+|T = (Q XOR Q+)
0|0|0|0 |0
0|0|1|1 |0
0|1|0|0 |0
0|1|1|0 |1
1|0|0|1 |1
1|0|1|1 |0
1|1|0|1 |1
1|1|1|0 |1
Implies Gate
Spoiler
Show
Image
Rasuth wrote: The "Implies" gate outputs a current as long as the logical statement (A -> B) (read: "A implies B") holds true. This equivalent to the statement (B OR NOT(A)). In other words the output is only off, if A=1 and B=0. In all other cases the output is on.
Design by Rasuth. Size: 2x2x3
Last edited by HavokSCOUT on Sun Aug 07, 2011 12:39 pm, edited 8 times in total.
Spoiler
Show
Brony, and proud of it
CheGiuAn wrote:ppl should have faith, not religion....
Katalliaan wrote:It's a tech shrub, more like
MagikEh wrote: D: THE SEEKRET OF SYRUPEY BEAVER NIPPLES HAS BEEN EXPOSED!!! ABORT~!~!
User avatar
magikeh
Posts: 945
Joined: Mon Jul 04, 2011 9:57 pm
Location: Top -o- the Tower

Re: BD applications in Redstone logic gates

Post by magikeh »

WOW THIS is GREAT!! thanks a lot!! The pics are really useful aswell!
Magical Shit
Show
Syruse|Work: i like magic shit
MagikEh: ...
MagikEh: >.>
MagikEh: <.<
»» MagikEh walks to the bathroom
Syruse|Work: hahaaaaaaaaa
Syruse|Work: wait
MagikEh: xD
Syruse|Work: fuck
Syruse|Work: NO
Syruse|Work: DONT
User avatar
HavokSCOUT
Posts: 514
Joined: Tue Jul 05, 2011 8:44 am
Location: Surrounded by creepers

Re: BD applications in Redstone logic gates

Post by HavokSCOUT »

Thanks. I tried doing some of the more obscure memory latches, like the Jk flip flop and the D Flip Flop, but I barely understood them.
Spoiler
Show
Brony, and proud of it
CheGiuAn wrote:ppl should have faith, not religion....
Katalliaan wrote:It's a tech shrub, more like
MagikEh wrote: D: THE SEEKRET OF SYRUPEY BEAVER NIPPLES HAS BEEN EXPOSED!!! ABORT~!~!
User avatar
magikeh
Posts: 945
Joined: Mon Jul 04, 2011 9:57 pm
Location: Top -o- the Tower

Re: BD applications in Redstone logic gates

Post by magikeh »

lol, well when you do (if you do) please post them here!! Great help!
Magical Shit
Show
Syruse|Work: i like magic shit
MagikEh: ...
MagikEh: >.>
MagikEh: <.<
»» MagikEh walks to the bathroom
Syruse|Work: hahaaaaaaaaa
Syruse|Work: wait
MagikEh: xD
Syruse|Work: fuck
Syruse|Work: NO
Syruse|Work: DONT
Rasuth
Posts: 141
Joined: Sat Jul 09, 2011 7:57 am

Re: BD applications in Redstone logic gates

Post by Rasuth »

HavokSCOUT wrote:Thanks. I tried doing some of the more obscure memory latches, like the Jk flip flop and the D Flip Flop, but I barely understood them.
Not sure about the JK Flip Flop of the top of my head, but the D FF should be fairly simple (cenceptional wise). The D FF has two Inputs -Clock and (D)ata- and one stable output. Now whenever the clock siganl is on, the Data input is read, stored and output. In other words: all changes to D are ignored when Clock is off.

How to achieve this:
Take an RS- Latch as inner memory cell.
Wire (D AND Clock) to the Set input of the latch.
Wire ((NOT(D)) AND Clock) to the Reset input of the latch.
Latch output = FF output.

This is a very basic FF and its output might flicker if the D input changes values while the clock signal is on.
You can probably eliminate that problem by using some pulse lenghtening/ delaying techniques before setting or resetting the latch.

I might try building one later, but in an hour I have volleyball training.
TaterBoy wrote:Well, now I know. And as GI-Joe says, knowing is half the battle. :)
The other half is violence.
Unless you're GI Socrates. Then the other half is "You don't know anything
- TheAnarchitect
User avatar
HavokSCOUT
Posts: 514
Joined: Tue Jul 05, 2011 8:44 am
Location: Surrounded by creepers

Re: BD applications in Redstone logic gates

Post by HavokSCOUT »

magikeh wrote:lol, well when you do (if you do) please post them here!! Great help!
When you find a need for them, I'll have a need to make them, but I am beat right now. You wouldn't believe the number of brain cell involved for the xor and xnor gates. One of the other gates locks a lever with another lever, and the other is a t flip flop that does the same thing, but with two levers.
Spoiler
Show
Brony, and proud of it
CheGiuAn wrote:ppl should have faith, not religion....
Katalliaan wrote:It's a tech shrub, more like
MagikEh wrote: D: THE SEEKRET OF SYRUPEY BEAVER NIPPLES HAS BEEN EXPOSED!!! ABORT~!~!
Rasuth
Posts: 141
Joined: Sat Jul 09, 2011 7:57 am

Re: BD applications in Redstone logic gates

Post by Rasuth »

Got a D-FlipFlop working, will post pics after training. Already late -.-

Edit: removed quote of myself, to not clutter this thread so much.
Last edited by Rasuth on Fri Aug 05, 2011 7:31 pm, edited 1 time in total.
TaterBoy wrote:Well, now I know. And as GI-Joe says, knowing is half the battle. :)
The other half is violence.
Unless you're GI Socrates. Then the other half is "You don't know anything
- TheAnarchitect
User avatar
HavokSCOUT
Posts: 514
Joined: Tue Jul 05, 2011 8:44 am
Location: Surrounded by creepers

Re: BD applications in Redstone logic gates

Post by HavokSCOUT »

Funny enough, I made two versions. Let's see who is better at this;)
Spoiler
Show
Brony, and proud of it
CheGiuAn wrote:ppl should have faith, not religion....
Katalliaan wrote:It's a tech shrub, more like
MagikEh wrote: D: THE SEEKRET OF SYRUPEY BEAVER NIPPLES HAS BEEN EXPOSED!!! ABORT~!~!
Rasuth
Posts: 141
Joined: Sat Jul 09, 2011 7:57 am

Re: BD applications in Redstone logic gates

Post by Rasuth »

My Design uses the approach I posted above and HavokSCOUTS BD AND Gate and BD-RS-Latch. It's 3 x 3 x 8.

Alright here goes nothing:
Overview
Show
Image
Most interesting part is probably the repeater on the wool block setting the RS- Latch. Here it's actually used as diode, preventing feedback from powering the BD through the torch it places.
Inputs
Show
Image
So on the left side we have the clock input, on the right side is the Data input. Not that this design can easily be mirrored if your inputs com from other directions.
AND gate BDs
Show
Image
As written on the signs, the left BD contains 1 Redstone dust, the other one a conductive Block. The Redstone dust to the backs of both BDs is there to let the clock signal reach the left BD without interfering with the data line.
RS Latch
Show
Image
Nothing fancy here. This is HavokSCOUT's BD-RS-Latch with the Diode twist I mentioned earlier.
View from right side
Show
Image
Just a side view of the BD AND gate, credit goes to HavokSCOUT again.
And that's it.

Edit: screwed the Image links up.Should work now.

Edit3: New Version with more space between inputs. Also saves delayers on the inputs, thus removing output flicker on clock changes from off to on.
Version 1.2
Show
Image
Edit4: Mark 2 reduces the size to a tiny 2x3x6. Data input should come from where the sandwall is or be insulated from the clock signal with repeaters.
Version 2.0
Show
Image
Last edited by Rasuth on Sat Aug 06, 2011 7:17 pm, edited 3 times in total.
TaterBoy wrote:Well, now I know. And as GI-Joe says, knowing is half the battle. :)
The other half is violence.
Unless you're GI Socrates. Then the other half is "You don't know anything
- TheAnarchitect
User avatar
HavokSCOUT
Posts: 514
Joined: Tue Jul 05, 2011 8:44 am
Location: Surrounded by creepers

Re: BD applications in Redstone logic gates

Post by HavokSCOUT »

Quite ingenious, I must say. Do you mind terribly if I include it in the OP?
Spoiler
Show
Brony, and proud of it
CheGiuAn wrote:ppl should have faith, not religion....
Katalliaan wrote:It's a tech shrub, more like
MagikEh wrote: D: THE SEEKRET OF SYRUPEY BEAVER NIPPLES HAS BEEN EXPOSED!!! ABORT~!~!
Rasuth
Posts: 141
Joined: Sat Jul 09, 2011 7:57 am

Re: BD applications in Redstone logic gates

Post by Rasuth »

Not at all. Do it.


Edit:You should probably add the Diode/repeater to your RS-Latch design. Otherwise it always feedbacks to were the set signal came from. (Not a problem when using a button, but in more complex curcuitry the results aren't probably much appreciated)
TaterBoy wrote:Well, now I know. And as GI-Joe says, knowing is half the battle. :)
The other half is violence.
Unless you're GI Socrates. Then the other half is "You don't know anything
- TheAnarchitect
User avatar
Stormweaver
Posts: 3230
Joined: Wed Jul 06, 2011 7:06 pm

Re: BD applications in Redstone logic gates

Post by Stormweaver »

*fails at most circuit terminology*

I'm assuming 2 things here:
- Those screenshots show D Flip-Flops
- D Flip Flops output whatever state the input was the last time the clock input was ON.

...so wouldn't a simpler idea be a normal torch RS latch as the memory, the clock powering the 'off' state of the latch and a AND gate connected to the 'on' state, and the 'input' going to the and gate? I threw a very rough (but fully functional) one together just now. It could probably be smaller, but...w/e
Spoiler
Show
Image
The BD just has 1 redstone dust in it. it's the AND gate.
I'll make it smaller at some point.
PatriotBob wrote:Damn it, I'm going to go eat pumpkin pie while I still think that it tastes good.
User avatar
HavokSCOUT
Posts: 514
Joined: Tue Jul 05, 2011 8:44 am
Location: Surrounded by creepers

Re: BD applications in Redstone logic gates

Post by HavokSCOUT »

Can you get a view from the top. I'd love to recreate it. Also, the output can change state as the clock is off, but when the clock goes on, it locks the output at whatever it was, be it on or off.
Spoiler
Show
Brony, and proud of it
CheGiuAn wrote:ppl should have faith, not religion....
Katalliaan wrote:It's a tech shrub, more like
MagikEh wrote: D: THE SEEKRET OF SYRUPEY BEAVER NIPPLES HAS BEEN EXPOSED!!! ABORT~!~!
User avatar
Stormweaver
Posts: 3230
Joined: Wed Jul 06, 2011 7:06 pm

Re: BD applications in Redstone logic gates

Post by Stormweaver »

HavokSCOUT wrote:Can you get a view from the top. I'd love to recreate it. Also, the output can change state as the clock is off, but when the clock goes on, it locks the output at whatever it was, be it on or off.
ah, I just had the role of the clock the wrong way around...nothing an inverter wouldn't fix.

I threw that together in the base of my mineshaft :| Remade it outdoors

- Lapis is the input
- Iron ore is clock
- Light block is output
- BD has redstone
- Too tired to make it smaller.
Spoiler
Show
Image
PatriotBob wrote:Damn it, I'm going to go eat pumpkin pie while I still think that it tastes good.
User avatar
HavokSCOUT
Posts: 514
Joined: Tue Jul 05, 2011 8:44 am
Location: Surrounded by creepers

Re: BD applications in Redstone logic gates

Post by HavokSCOUT »

Rasuth wrote:Not at all. Do it.


Edit:You should probably add the Diode/repeater to your RS-Latch design. Otherwise it always feedbacks to were the set signal came from. (Not a problem when using a button, but in more complex curcuitry the results aren't probably much appreciated)
I usually go crazy with repeaters since I use TMI, but I will probably change that in the OP, thanks.
Spoiler
Show
Brony, and proud of it
CheGiuAn wrote:ppl should have faith, not religion....
Katalliaan wrote:It's a tech shrub, more like
MagikEh wrote: D: THE SEEKRET OF SYRUPEY BEAVER NIPPLES HAS BEEN EXPOSED!!! ABORT~!~!
Rasuth
Posts: 141
Joined: Sat Jul 09, 2011 7:57 am

Re: BD applications in Redstone logic gates

Post by Rasuth »

One more little thing, I see you called the RS-Latch a monostable curcuit in my design. Unfortunately that is a little inaccurate. A Latch is an asynchronous (changes output whenever input changes) 1bit memory cell and I use it as such.

Monostable curcuits are created by taking a latch design and taking one input for both the set and reset signal. Whereby the reset signal is delayed by whatever length the output pulse needs to have.
TaterBoy wrote:Well, now I know. And as GI-Joe says, knowing is half the battle. :)
The other half is violence.
Unless you're GI Socrates. Then the other half is "You don't know anything
- TheAnarchitect
User avatar
HavokSCOUT
Posts: 514
Joined: Tue Jul 05, 2011 8:44 am
Location: Surrounded by creepers

Re: BD applications in Redstone logic gates

Post by HavokSCOUT »

Good, weaver, but under certain conditions, it has the tendency to burn out the torch in the latch.
Spoiler
Show
Brony, and proud of it
CheGiuAn wrote:ppl should have faith, not religion....
Katalliaan wrote:It's a tech shrub, more like
MagikEh wrote: D: THE SEEKRET OF SYRUPEY BEAVER NIPPLES HAS BEEN EXPOSED!!! ABORT~!~!
User avatar
Stormweaver
Posts: 3230
Joined: Wed Jul 06, 2011 7:06 pm

Re: BD applications in Redstone logic gates

Post by Stormweaver »

HavokSCOUT wrote:Good, weaver, but under certain conditions, it has the tendency to burn out the torch in the latch.
Hmm...I can't see how it'd happen in normal use, but I'll take your word for it for now. It was only a rough build - I don't like optimising things till I know they're as compact as possible. Normally I wouldn't be spending time on things I won't use, but I'll mess around with it tomorrow - it seems interesting enough, and if it's small enough I figure I'll be able to squeeze it into something somewhere.
PatriotBob wrote:Damn it, I'm going to go eat pumpkin pie while I still think that it tastes good.
User avatar
HavokSCOUT
Posts: 514
Joined: Tue Jul 05, 2011 8:44 am
Location: Surrounded by creepers

Re: BD applications in Redstone logic gates

Post by HavokSCOUT »

If you wish to know, when the output is set to off, and the clock is on, if the input turns on, it causes rapid pulsating and eventually the burn out of the torch.
Spoiler
Show
Brony, and proud of it
CheGiuAn wrote:ppl should have faith, not religion....
Katalliaan wrote:It's a tech shrub, more like
MagikEh wrote: D: THE SEEKRET OF SYRUPEY BEAVER NIPPLES HAS BEEN EXPOSED!!! ABORT~!~!
User avatar
HavokSCOUT
Posts: 514
Joined: Tue Jul 05, 2011 8:44 am
Location: Surrounded by creepers

Re: BD applications in Redstone logic gates

Post by HavokSCOUT »

Rasuth wrote:One more little thing, I see you called the RS-Latch a monostable curcuit in my design. Unfortunately that is a little inaccurate. A Latch is an asynchronous (changes output whenever input changes) 1bit memory cell and I use it as such.

Monostable curcuits are created by taking a latch design and taking one input for both the set and reset signal. Whereby the reset signal is delayed by whatever length the output pulse needs to have.
Duly noted and changed.
Spoiler
Show
Brony, and proud of it
CheGiuAn wrote:ppl should have faith, not religion....
Katalliaan wrote:It's a tech shrub, more like
MagikEh wrote: D: THE SEEKRET OF SYRUPEY BEAVER NIPPLES HAS BEEN EXPOSED!!! ABORT~!~!
User avatar
Stormweaver
Posts: 3230
Joined: Wed Jul 06, 2011 7:06 pm

Re: BD applications in Redstone logic gates

Post by Stormweaver »

HavokSCOUT wrote:If you wish to know, when the output is set to off, and the clock is on, if the input turns on, it causes rapid pulsating and eventually the burn out of the torch.
...huh?

While the clock is on, the input is completely isolated from the circuit, by virtue of the BD nomming the redstone in front of it; you may have built it wrong.
PatriotBob wrote:Damn it, I'm going to go eat pumpkin pie while I still think that it tastes good.
User avatar
HavokSCOUT
Posts: 514
Joined: Tue Jul 05, 2011 8:44 am
Location: Surrounded by creepers

Re: BD applications in Redstone logic gates

Post by HavokSCOUT »

Huh. IT appears that I did build it wrong, go figure. Good job.
Spoiler
Show
Brony, and proud of it
CheGiuAn wrote:ppl should have faith, not religion....
Katalliaan wrote:It's a tech shrub, more like
MagikEh wrote: D: THE SEEKRET OF SYRUPEY BEAVER NIPPLES HAS BEEN EXPOSED!!! ABORT~!~!
User avatar
Stormweaver
Posts: 3230
Joined: Wed Jul 06, 2011 7:06 pm

Re: BD applications in Redstone logic gates

Post by Stormweaver »

HavokSCOUT wrote:Huh. IT appears that I did build it wrong, go figure. Good job.
^.^
PatriotBob wrote:Damn it, I'm going to go eat pumpkin pie while I still think that it tastes good.
Rasuth
Posts: 141
Joined: Sat Jul 09, 2011 7:57 am

Re: BD applications in Redstone logic gates

Post by Rasuth »

Sadly it appears, that almost all of your photobucket links are broken now.
I came up with a simple idea of a NAND gate and wanted to check, if you already covered it.
TaterBoy wrote:Well, now I know. And as GI-Joe says, knowing is half the battle. :)
The other half is violence.
Unless you're GI Socrates. Then the other half is "You don't know anything
- TheAnarchitect
User avatar
HavokSCOUT
Posts: 514
Joined: Tue Jul 05, 2011 8:44 am
Location: Surrounded by creepers

Re: BD applications in Redstone logic gates

Post by HavokSCOUT »

Well this is a learning opportunity. It turns out that if you delete pictures on photobucket, it breaks the link. XD Back to Minecraft for pictures.

EDIT: Fixed OP
Last edited by HavokSCOUT on Sat Aug 06, 2011 6:52 pm, edited 1 time in total.
Spoiler
Show
Brony, and proud of it
CheGiuAn wrote:ppl should have faith, not religion....
Katalliaan wrote:It's a tech shrub, more like
MagikEh wrote: D: THE SEEKRET OF SYRUPEY BEAVER NIPPLES HAS BEEN EXPOSED!!! ABORT~!~!
Post Reply