Vertical RS NOR Latches Design A by raken, Design B by trunksbomb
The first one is Design H in the Wiki, and the second one is one that I came up with (as far as I know). The lower block in Design A can be pushed back any arbitrary length and the middle block of Design B can be stretched outward any arbitrary length to suit your needs. Of course, the inputs are not isolated, so S is also Q and R is also ~Q.
Compact D Flip-flop (3x6x3) by Hanyou Hottie
Compact D Flip-flop (2x4x4) by icks
Compact Vertical D Latch (1x5x6) originally by Howlingmonkey, optimized by Majiir
Edge-triggered D Flip-Flop that has both input D and output Q on the same side. Based on two of howlingmonkey's vertical level-triggered D Flip-Flops.
Trigger: Store on rising edge, load on falling edge Redstone: 15 torches, 18 wire Inputs Isolated: C only Outputs Isolated: Yes
Compact T Flip-Flop (5x5x2) originally by Cadde, optimized by VincentLaw
Compact TFF (5x8x3) originally by Warillusen, optimized by trunksbomb (schematic)
RET-TFF. Most efficient use of redstone (34 total) of all the horizontal ET-TFFs on the Wiki, and the only ET-TFF with accessible !Q. T and Q aligned for easy chaining. Cannot be built with the short side going N/S because of the ET.
Modified Vertical TFF (12x1x7) originally by Zorac, modified by trunksbomb (no schematic)
The design by Zorac did not work when built N/S because the edge-trigger would not pulse long enough. This design fixes that. The blue blocks are the modified edge-trigger.
Earle Latch (5x8x3) Originally by Sukasa, optimized by icks (no schematic)
Isolates the clock input instead of using the 15-block limit used in Sukasa's design. Simpler to design than the smaller version. (An Earle Latch is a level-triggered D Latch with a uniform propagation delay for changes in Q)
Rising Edge Triggers (RETs) (various sizes) (no schematic)
Rising Edge Triggers are used to send an output pulse on the rising edge of an input. The output will be triggered only when the input turns from OFF to ON. I/O aligned on first two. Long side (on all) must be built facing E/W, else the signal burns out after three torches.
by trunksbomb Redstone: 3/4 Inputs Isolated: Yes Outputs Isolated: Yes, output held HIGH, pulsed LOW
by trunksbomb Redstone: 5/6 Inputs Isolated: Yes Outputs Isolated: Yes
by Rekkonin Redstone: 4/5 Inputs Isolated: Yes Outputs Isolated: Yes
The concept is simple. Place a torch on the block for each lever you want to be ON for the correct code, and redstone for any lever you want OFF. The output torch will only light up when all the levers with torches are ON and the ones without torches are OFF. Easily expandable for larger locks. In the example, the code (from left to right) is 1-2-4.
Simple PIN-style combo lock with monostable timer by Fireside (post)
Other/In-depth Designs
How to make a parallel bus bend with no delay by paj2323 (schematic) (.gif)
FAQs
Ask, and ye shall be answered!
How can I make buttons act like levers? Solution by howlingmonkey and Laogeodritt - Attach the buttons to the input of a T Flip-Flop. Typically, T Flip-Flops are edge-triggered, meaning that the output toggles when the input changes states. With this set up, Pushing the button once turns the output on, and pushing it again turns the output off, exactly the same as flipping a lever. Some T Flip-Flops are level triggered, meaning they will constantly toggle as long as the input is HIGH. Be sure to pick a design that is edge-triggered for your own ease-of-use.
Design Posting Guide
If you've got a design to post and you want to make my life easier, might I suggest using this posting guide:
[b]Short Name of Circuit[/b] (5x5x5) by You ([url=http://www.box.net]schematic[/url]) [list]
Short description of your circuit. Be sure to include any restrictions, such as if it is orientation-dependent (due to N/S quirk).
[img]http://img171.imageshack.us[/img]
[b]Redstone:[/b] 5/4
[b]Inputs Isolated:[/b]
[b]Outputs Isolated:[/b]
[/list]
For the Redstone entry, the number on the left is the amount of redstone wire, and the number on the right is the number of redstone torches. Don't include any extraneous input or output wires you may have been using for testing. The easiest way to get this information is to open the schematic in Redstone Simulator and check the count at the bottom-right corner. Thanks!
I'll go ahead and pose the first question of the new thread:
I want to use buttons as levers. Basically, pressing the button will toggle the output and keep it that way, the same way a lever would. What I've got so far is a button as the input to a NOR latch that will turn the output ON and leave it ON. What I then want to do is hook that same button up to the reset of the NOR latch (through some series of gates) such that pressing the button again will turn the output off. I haven't been able to figure out the reset part so that the button will act like a lever.
What I was thinking was somehow doing an IF statement that uses the button and the output of the NOR latch as inputs, and have the output be true if both are ON (button is pressed while output of latch is ON). The output of this IF statement would hook straight to the reset, so that pressing the button while the latch output is ON will cause the latch output to be OFF.
*Edit* On an aside, I made a 3x3x3 5-clock generator. I didn't have the patience to make a proper .gif out of it, so here it is in .png form:
If there's one thing I really love about the Minecraft community, it's the innovation in architecture and engineering within the game. *subscribes to the topic*
Also, is there any way of importing the animated GIFs directly into a redstone simulator? Or could we start posting the .rdat files? It'd be nice to be able to take one's time studying these without opening up ImageReady (or mess around with them without having to recreate them) =P
As for using buttons as levers, use T flip-flops. They're edge-triggered (when the input goes from off to on); as long as you don't need to hit the button more frequently than the pulse width ("on" time) of the button, you're good.
Thanks guys, that's exactly what I needed. I'll admit, I just saw the NOR latch and ran with it.. I didn't even think to look at other memory devices. What I was trying to do was rig a double door such that it could be opened and shut by the press of a button from either side. The traditional way is to use levers, but I didn't like the way the levers were either up or down, because it made it seem like the ON or OFF states of the levers affected the operation of the door. This way is much cleaner looking!
I'll add this in the FAQs section and credit you both.
Also, what did you think of my 3x3x3 5-clock generator?
Ooh, 3³ 5-clock? That's quite nice, actually! I've had trouble fitting my clocks into some of the design experiments I've made. (Mind you, mostly just messing around in the sim now.) That'll be nice for squeezing it into a spare corner.
I'm making a "creepy" minecart ride underground. I have a minecart that will be boosted through an underground tunnel, and I want the only light source to be redstone torches. Instead of staying on, or flashing to the pulse of a clock, I want there to only ever be 1 torch on. I basically want a clock to send a signal to a latch, and the latch to send a signal to an edge-triggered pulsar that will shoot off 1 signal that will travel down the line of torches and light them sequentially. The last torch will be connected to the reset of the latch, so the clock will send the signal again and start the process over.
I think I could get away with just using a constant input to the latch.. not sure. If this sounds reasonable, let me know.
The torches are placed on a wall, every two spaces.
In the end, it would look like a light-strip on a runway.
In the end, it would look like a light-strip on a runway.
Nevermind, I kind of figured something out. Watching the .gif tick-by-tick, I see that the lights 2 and 3 turn on together (as do lights 4 and 5), but lights 1 and 6 turn on by themselves. I'm assuming this is due to the NOT on every other light that keeps them all off until pulsed. I'll try to fix that. This kind of accomplishes what I want. Can I throw a delay on there to make them go slower?
That's my 3x3x3 clock on the bottom, leading into a NOR Latch, leading into a pulsar. (schematic)
BTW, Cadde. I like your schematic convention there. I didn't really adhere to it here because I'm not trying to present this for others yet. Just trying to figure stuff out. Do you go back and add in the letters afterwards? That's a lot of work. It would be nice if Redstone Sim let you add labels.
I'm having trouble getting a pulsar to fire. It seems like the torches are turning on and off at different rates, so both torches in the pulsar are never off together for any amount of time to send a pulse. I've tried it N/S and E/W.
EDIT: @Cadde: While I definitely agree on some kind of standard for posting finalized designs, I think it would be better if air blocks were preserved, since they act as a positional cue for each layer. For small designs, the size of each layer should be constant; for large designs with layers of varying size, I guess some variation for the sake of compactness is acceptable if we establish some kind of convention for cueing relative layer positions without having to check where the layers would logically bind together.
EDIT2: I've noticed that there's a lot of innovation in terms of compact design and new designs that the Wiki article doesn't touch at all. Maybe we should start an initiative to compile the best gates, latches, etc. that people have been coming up with (in terms of compactness, usability in different situations and spatial conditions, etc.) into a cohesive document that could be regularly updated in this topic? (I'm thinking copying the images along with size, notes/quirks and credits into an organized word processor document and exporting it as PDF.)
It would be less chaotic than going through gigantic topics.
Unfortunately, I don't think I have much time to contribute to that kind of project over semesters. =\ Too hectic...
Quote from Georgeparty »
but the torch stays lit, be good if either the torch turned off or another torch turned on when the trap was activated. As a signal that it has went off.
Use an RS NOR latch. It's the simplest form of memory, and you can use it to "remember" that a pressure plate was activated. I think that would be the most elegant solution, and it should take very little space.
Wire up all the pressure plates to a single RS NOR latch's S input. Then wire the output Q to the indicator torch. Connect a "reset" button (for the indicator torch) to the R input.
When you build the latch, make sure to reset it in case it's already "on". The indicator torch should be on before the trap is activated. When it's activated, the pressure plate turns on the RS NOR latch (the latch remembers it even though the plate is activated just for a moment), and that turns off the indicator torch.
If you want the torch to be off normally, and turn on when the trap is activated, simply wire the torch to Q-bar instead of Q. (Or you could just an inverter before your indicator torch.)
(See the Wiki page for RS NOR latch designs and the symbols I'm using for the terminals, i.e. S, Q, Q-bar and R.)
Lao, I intend to keep the OP up-to-date with the latest-and-greatest circuits as they are posted in this thread. I think I've already got the original poster of the "red stuff "logic gates thread beat in terms of stuff in the OP. lol.
Just a warning, though; depending on PHPBB's database design, you might eventually hit a finite maximum post length. So if it ever seems to not want to accept your entire post (and open BBCode tags break the page), you'll know what the problem is; use subsequent posts and link them directly, I guess. =P (I had this problem on a PHPBB2 forum, not sure if PHPBB3's database design is different. On said forum, the limit was 65535 bytes, so it's a long ways away, but possible to hit with enough text.)
Well since I went ahead and double posted right after the OP, I've got twice the limit of space to work with, which should be plenty enough. :smile.gif: Hopefully..
And as a side note, I love how much thought went into the rank names. At 42 posts, I was (obviously) the "Answer to the Ultimate Question of Life, the Universe, and Everything". And at 64 posts, I was a Full Stack. Good stuff, admins, good stuff.
Is there a good 3-bit decoder design floating in the community? I have a 9x9x7 decoder, but it's very inconvenient, because the outputs are on all sides, so wiring gets tedious.
Seems like a good place to find some help. I'm new to logic and I'm slowly learning. Maybe this was asked but since I don't know much about circuits and logic I wouldn't know if I saw it anyway lol.
One thing Im having an issue with is having 2 switches close 1 door. As in a switch on both sides of an iron door shutting or opening the door no matter the position of the other switch. Whats the simplest way to do this?
We all need a place to discuss our deepest and darkest redstone secrets ... er, circuits.
So here goes! Post your Redstone circuits if you've got them! Feel free to ask questions and have them answered by our resident redstone experts!
Table of Contents
[*:1wlvvw94] Logic Gates
[*:1wlvvw94] Latches and Flip Flops
[*:1wlvvw94]Clocks and Counters
[*:1wlvvw94]Arithmetic
[*:1wlvvw94]Mux, Demux, and Decoders
[*:1wlvvw94]Storage and Memory
[*:1wlvvw94]Locks
[*:1wlvvw94]Other Designs
[*:1wlvvw94]FAQs
[*:1wlvvw94]Design Posting Guide
[*:1wlvvw94]Resources
Logic Gates
2-wide XOR Gate (2x6x5) by Banjobeni (schematic)
Increases height to save on width. Inputs are on layer 0 and 2, making attaching it to two buses very easy
Redstone: 10/6
Inputs Isolated: Yes
Outputs Isolated: Yes
Latches and Flip Flops
Vertical RS NOR Latches Design A by raken, Design B by trunksbomb
The first one is Design H in the Wiki, and the second one is one that I came up with (as far as I know). The lower block in Design A can be pushed back any arbitrary length and the middle block of Design B can be stretched outward any arbitrary length to suit your needs. Of course, the inputs are not isolated, so S is also Q and R is also ~Q.
Compact D Flip-flop (3x6x3) by Hanyou Hottie
Compact D Flip-flop (2x4x4) by icks
Compact Vertical D Latch (1x5x6) originally by Howlingmonkey, optimized by Majiir
D-FlipFlop (3x7x6) by Banjobeni (schematic)
Edge-triggered D Flip-Flop that has both input D and output Q on the same side. Based on two of howlingmonkey's vertical level-triggered D Flip-Flops.
Trigger: Store on rising edge, load on falling edge
Redstone: 15 torches, 18 wire
Inputs Isolated: C only
Outputs Isolated: Yes
Compact T Flip-Flop (5x5x2) originally by Cadde, optimized by VincentLaw
Compact TFF (5x8x3) originally by Warillusen, optimized by trunksbomb (schematic)
RET-TFF. Most efficient use of redstone (34 total) of all the horizontal ET-TFFs on the Wiki, and the only ET-TFF with accessible !Q. T and Q aligned for easy chaining. Cannot be built with the short side going N/S because of the ET.
Redstone: 22/12
Inputs Isolated: Yes
Outputs Isolated: Yes
Modified Vertical TFF (12x1x7) originally by Zorac, modified by trunksbomb (no schematic)
The design by Zorac did not work when built N/S because the edge-trigger would not pulse long enough. This design fixes that. The blue blocks are the modified edge-trigger.
Redstone: 15/14
Inputs Isolated: Yes
Outputs Isolated: Yes
Earle Latch (5x8x3) Originally by Sukasa, optimized by icks (no schematic)
Isolates the clock input instead of using the 15-block limit used in Sukasa's design. Simpler to design than the smaller version. (An Earle Latch is a level-triggered D Latch with a uniform propagation delay for changes in Q)
Redstone: 25/6
Inputs Isolated: Yes
Outputs Isolated: Yes
Earle Latch (5x7x3) Originally by icks, optimized by trunksbomb (no schematic)
Shrinks icks' design by 1 and uses 3 fewer redstone. No other differences.
Redstone: 22/6
Inputs Isolated: Yes
Outputs Isolated: Yes
Clocks, Counters, and Edge Triggers
3x3x3 5-clock by trunksbomb
3x3x3 5-clock by Towel
4x4x1 5-clock by Towel
This clock is very flexible, and is scalable to any odd n-clock.
4-clock (5x3x2) by Rekkonin (no schematic)
Two 3 clocks combined to make a 4-clock. Good for an even tempo on note blocks.
Redstone: 8/6
Inputs Isolated: N/A
Outputs Isolated: N/A
5-bit synchronous counter with reset by icks (.gif) (schematic) (17x5x8) (.gif with count up/count down selection) (schematic)
8-bit Synchronous Counter (18x8x7) by icks (schematic)
Clock needs to be slower than 16 to allow the input to propogate along the line.
Redstone: 179/102
Inputs Isolated: Yes
Outputs Isolated: Yes
Rising Edge Triggers (RETs) (various sizes) (no schematic)
Rising Edge Triggers are used to send an output pulse on the rising edge of an input. The output will be triggered only when the input turns from OFF to ON. I/O aligned on first two. Long side (on all) must be built facing E/W, else the signal burns out after three torches.
by trunksbomb
Redstone: 3/4
Inputs Isolated: Yes
Outputs Isolated: Yes, output held HIGH, pulsed LOW
by trunksbomb
Redstone: 5/6
Inputs Isolated: Yes
Outputs Isolated: Yes
by Rekkonin
Redstone: 4/5
Inputs Isolated: Yes
Outputs Isolated: Yes
Arithmetic
Full Adder(5x6x3) by howlingmonkey (schematic)
Full Adder (4x6x4) by Banjobeni (schematic)
All inputs and outputs have more than one direction they can enter/leave the circuit. Cin lines up with Cout for chaining (from right-to-left).
Redstone: 15/12
Inputs Isolated: Yes
Outputs Isolated: Yes
Full Adder (3x8x5) by Banjobeni (schematic)
Full adders can be placed next to each other, having one space in-between, connecting the carry.
Redstone: 16 torches, 15 wires
Inputs Isolated: Yes
Outputs Isolated: Yes
Multiplexers, Demultiplexers, and Decoders
3-bit multiplexer by nou (schematic) (.gif)
5-bit decoder by icks (schematic) (.gif) ( of decoder in use with a 7-segment display)
This multiplexer is easily scalable to suit any need.
5-bit decoder originally by icks, optimized by Rekkonin (.gif) (schematic)
Storage/Memory
Paralell In/Serial Out (PISO) 8-bit Shift Register by Cadde (schematic) (.gif)
16-bit shift register with Write/!Shift select by icks (.gif for SIPO/PISO/SISO/PIPO) (schematic) (.gif for SISO/SIPO) (schematic)
SISO/SIPO 16-bit Shift Register with left/right select (18x13x13) by icks (schematic)
16 bit shift register with select for left/right shifting.
Redstone: 527/252
Inputs Isolated: Yes
Outputs Isolated: Yes
Locks
Simple Levers Lock by Warillusen
Example:
The concept is simple. Place a torch on the block for each lever you want to be ON for the correct code, and redstone for any lever you want OFF. The output torch will only light up when all the levers with torches are ON and the ones without torches are OFF. Easily expandable for larger locks. In the example, the code (from left to right) is 1-2-4.
Simple PIN-style combo lock with monostable timer by Fireside (post)
Other/In-depth Designs
How to make a parallel bus bend with no delay by paj2323 (schematic) (.gif)
FAQs
Ask, and ye shall be answered!
How can I make buttons act like levers?
Solution by howlingmonkey and Laogeodritt - Attach the buttons to the input of a T Flip-Flop. Typically, T Flip-Flops are edge-triggered, meaning that the output toggles when the input changes states. With this set up, Pushing the button once turns the output on, and pushing it again turns the output off, exactly the same as flipping a lever. Some T Flip-Flops are level triggered, meaning they will constantly toggle as long as the input is HIGH. Be sure to pick a design that is edge-triggered for your own ease-of-use.
Design Posting Guide
If you've got a design to post and you want to make my life easier, might I suggest using this posting guide:
For the Redstone entry, the number on the left is the amount of redstone wire, and the number on the right is the number of redstone torches. Don't include any extraneous input or output wires you may have been using for testing. The easiest way to get this information is to open the schematic in Redstone Simulator and check the count at the bottom-right corner. Thanks!
Other Resources
--The Absolute Beginner's Guide to Everything Redstone by trunksbomb - understanding the basics of logic and redstone (self-advertising, yea!)
--"red stuff" logic gates by casino.doug - The original topic, contains many, many schematics.
--Redstone FAQ and General Tutorial, and the new addition: Part 2, Logic by Rotten194 - two additional guides on redstone with useful information.
--Minecraft Wiki, Circuits - The Minecraft Wiki entry for redstone circuits (see also "Advanced Circuits")
--More redstone quirks (for hardcore redstone fanatics) by bugi74 - Very in-depth discussion about the science (read: programming) behind redstone. Very important concepts for time-sensitive circuits.
I want to use buttons as levers. Basically, pressing the button will toggle the output and keep it that way, the same way a lever would. What I've got so far is a button as the input to a NOR latch that will turn the output ON and leave it ON. What I then want to do is hook that same button up to the reset of the NOR latch (through some series of gates) such that pressing the button again will turn the output off. I haven't been able to figure out the reset part so that the button will act like a lever.
What I was thinking was somehow doing an IF statement that uses the button and the output of the NOR latch as inputs, and have the output be true if both are ON (button is pressed while output of latch is ON). The output of this IF statement would hook straight to the reset, so that pressing the button while the latch output is ON will cause the latch output to be OFF.
*Edit* On an aside, I made a 3x3x3 5-clock generator. I didn't have the patience to make a proper .gif out of it, so here it is in .png form:
Use a T flip-flop. There are a couple designs in the wiki and a number of better ones in the old thread.
Also, is there any way of importing the animated GIFs directly into a redstone simulator? Or could we start posting the .rdat files? It'd be nice to be able to take one's time studying these without opening up ImageReady (or mess around with them without having to recreate them) =P
As for using buttons as levers, use T flip-flops. They're edge-triggered (when the input goes from off to on); as long as you don't need to hit the button more frequently than the pulse width ("on" time) of the button, you're good.
EDIT: Ninja'd. Bah.
I'll add this in the FAQs section and credit you both.
Also, what did you think of my 3x3x3 5-clock generator?
Oh? How has it changed?
I'd actually be rather interested in a history of Redstone.
Much as it can save space, I can see how problematic that could be. x_o
I think I could get away with just using a constant input to the latch.. not sure. If this sounds reasonable, let me know.
The torches are placed on a wall, every two spaces.
In the end, it would look like a light-strip on a runway.
Nevermind, I kind of figured something out. Watching the .gif tick-by-tick, I see that the lights 2 and 3 turn on together (as do lights 4 and 5), but lights 1 and 6 turn on by themselves. I'm assuming this is due to the NOT on every other light that keeps them all off until pulsed. I'll try to fix that. This kind of accomplishes what I want. Can I throw a delay on there to make them go slower?
That's my 3x3x3 clock on the bottom, leading into a NOR Latch, leading into a pulsar.
(schematic)
BTW, Cadde. I like your schematic convention there. I didn't really adhere to it here because I'm not trying to present this for others yet. Just trying to figure stuff out. Do you go back and add in the letters afterwards? That's a lot of work. It would be nice if Redstone Sim let you add labels.
EDIT2: I've noticed that there's a lot of innovation in terms of compact design and new designs that the Wiki article doesn't touch at all. Maybe we should start an initiative to compile the best gates, latches, etc. that people have been coming up with (in terms of compactness, usability in different situations and spatial conditions, etc.) into a cohesive document that could be regularly updated in this topic? (I'm thinking copying the images along with size, notes/quirks and credits into an organized word processor document and exporting it as PDF.)
It would be less chaotic than going through gigantic topics.
Unfortunately, I don't think I have much time to contribute to that kind of project over semesters. =\ Too hectic...
Use an RS NOR latch. It's the simplest form of memory, and you can use it to "remember" that a pressure plate was activated. I think that would be the most elegant solution, and it should take very little space.
Wire up all the pressure plates to a single RS NOR latch's S input. Then wire the output Q to the indicator torch. Connect a "reset" button (for the indicator torch) to the R input.
When you build the latch, make sure to reset it in case it's already "on". The indicator torch should be on before the trap is activated. When it's activated, the pressure plate turns on the RS NOR latch (the latch remembers it even though the plate is activated just for a moment), and that turns off the indicator torch.
If you want the torch to be off normally, and turn on when the trap is activated, simply wire the torch to Q-bar instead of Q. (Or you could just an inverter before your indicator torch.)
(See the Wiki page for RS NOR latch designs and the symbols I'm using for the terminals, i.e. S, Q, Q-bar and R.)
Just a warning, though; depending on PHPBB's database design, you might eventually hit a finite maximum post length. So if it ever seems to not want to accept your entire post (and open BBCode tags break the page), you'll know what the problem is; use subsequent posts and link them directly, I guess. =P (I had this problem on a PHPBB2 forum, not sure if PHPBB3's database design is different. On said forum, the limit was 65535 bytes, so it's a long ways away, but possible to hit with enough text.)
And as a side note, I love how much thought went into the rank names. At 42 posts, I was (obviously) the "Answer to the Ultimate Question of Life, the Universe, and Everything". And at 64 posts, I was a Full Stack. Good stuff, admins, good stuff.
3 bit decoder:
just in case, adder (not very best, but I use it, because I made it before adders appeared on wiki, and I understand it):
add
3 bit
4 bit
One thing Im having an issue with is having 2 switches close 1 door. As in a switch on both sides of an iron door shutting or opening the door no matter the position of the other switch. Whats the simplest way to do this?
Thanks for any help guys.