Great explanations of the repeaters! This cleared things up for me! I disagree with 11:40. By convention of modern digital design/VLSI, flip-flops are edge-triggered and latches are level triggered. Look up master-slave flip-flops. You can create one with 4 Redstone Repeaters instead of just 2 There are lots of different technologies and strategies in VLSI, and it used to be the case that latches and flip-flops were implemented the same way. But now that transistors are so fast, minimizing hold time is usually preferred. Edge-triggered flip-flops usually have negative hold time, which makes them easier to design with. Though it is possible that Redstone designs are better with latch-based flip-flops and not master-slave flip-flops I have a masters in Digital Design and VLSI and would be happy to talk more
Thank you for the clarification! Honestly, I would have done more research on this, but I was getting so many disagreeing answers online, I kinda gave up. I really need a peer review system or something for these videos, lol. I understand level triggered, but what does edge triggered mean? Is it both edges, rising and falling? If so, I understand why the master-slave design makes sense. I almost never see any master slave designs being used in the logical redstone community, so I think your assumption is correct about latch based implementations being easier. Maybe that’s because minecraft is already running on a global clock (ticks)? I’m not sure. It’s also possible that the fundamental differences between real circuits and redstone makes the merging of terminology impossible. Also, I’m gonna pin this so that any follow up discussions about flip flops can be in one place.
@@mattbatwings No worries! I totally agree that there's a bunch of conflicting information. I think it's because of all the layers of abstraction in digital design. Generally, VLSI engineers just use whatever DFF standard cell is provided and run automated timing analysis tests to see if their design works. Caring about the exact implementation of cells is usually not required. There are "positive-edge triggered" master-slave flip-flops and "negative-edge triggered" master-slave flip-flops. To create a "positive-edge triggered" DFF in Redstone, you do Q inverted clk → ↑ clk → ↑ D where each arrow is a repeater.
I like your informed comment--thanks friend! I wanted to get a quick fact check not because I doubt you, but rather because I like that the AI can help give me some extra information. Taken from BING: That’s an interesting comment. I did some research and found some information that might help you fact check it. First of all, the comment is correct that by convention of modern digital design/VLSI, flip-flops are edge-triggered and latches are level triggered. This means that flip-flops change their output only at the rising or falling edge of a clock signal, while latches change their output whenever the clock signal is high or low. Secondly, the comment is also correct that you can create a master-slave flip-flop with 4 Redstone Repeaters instead of just 2. A master-slave flip-flop is a type of flip-flop that consists of two latches connected in series, with the first one (master) being enabled by the clock signal and the second one (slave) being enabled by the inverted clock signal. This way, the output of the master latch is transferred to the slave latch only at the edge of the clock signal, making it a flip-flop. Thirdly, the comment is partially correct that latches and flip-flops were implemented the same way in the past, but now edge-triggered flip-flops are preferred over level-triggered latches. This is because edge-triggered flip-flops have less hold time (the time that the input must remain stable after the clock edge) and more setup time (the time that the input must be stable before the clock edge) than level-triggered latches, which makes them easier to design with and less prone to glitches. However, this does not mean that latches are obsolete or useless. Latches are still used in some applications where speed, simplicity or power consumption are more important than timing constraints. I hope this helps you verify the comment. If you want to learn more, you can check out these sources: 1: www.geeksforgeeks.org/difference-between-flip-flop-and-latch/ 3: electronics.stackexchange.com/questions/21887/difference-between-latch-and-flip-flop 2: www.cs.ucr.edu/~ehwang/courses/cs120b/flipflops.pdf 4: www.elprocus.com/difference-between-latches-and-flip-flops/
@@LupusMobile Yes, this is also correct. I guess I should have said, design constraints have gotten less strict over time as transistors have gotten smaller and better. Therefore, implementing a flip-flop as a master-slave flip-flop has become the norm in present-day VLSI.
I tried to do a bit of digging around, and from what I understood the main reason of using master slave flip flops is that they are, as you said, edge triggered and as such less suseptible to race around condition. Now, neither CS or redstone are exactly my expertise (read as: assume I've got no real clue what I'm talking about) but I would assume that with redstone calculated with global ticks a race around condition will be much less of a problem, simply because unlike real circuitry you can reasonably predict the way in which a race around condition will behave, using brute force if nothing else? Also, it seems slave master flip flop are usually double the size more or less, which will probably lengthen the response time of the flip flop (which seems like a pretty big drawback) So, I would assume it's probably why redstoners tend to use a more simple type of flip flops. What do y'all think?
The differentiation between latches and flipflops is made, because you usually add more safety to the flipflop to prevent funky behaviour. For example you'd make your d-flipflop take the input on a rising edge but change the output on the falling edge. That gives time for the circuit to stabilize and prevents weird behavior.
Thank you for providing this playlist - It is greatly appreciated!! I've been watching the Computer Science playlist from CrashCourse and being able to use your LRR playlist as a method to put the theory they provide into practice has been really useful. One of the things I found useful whilst going through both playlists was to also build out the expanded diagrams from CrashCourse of the XOR gate and the D-Latch (Or Gated Latch as they call it) Once I'd got a practical example it then gave me a better understanding of the two mechanisms once abstracted which I found important to help cement my understanding.
Probably the two most commons types of clocks for everyday use in Minecraft (which I'm guessing you didn't mention because they are rarely or never used in logical redstone) are the "auto-dropper" clock and the "Ethonian Hopper" clock The "auto-dropper" takes a comparator output from a dropper, boosts it with a repeater, then runs it back into the comparator's side, with the output doing something to power the dropper. This creates a clock that only turns on when there are items in the dropper and repeatedly pulses until all of the items in the dropper have been dropped out. Very useful for item transportation, or if you switch out the dropper for a dispenser it can be used to auto-fire potions/arrows/etc The "Ethonian" clock (named after prolific redstone content creator EthosLab) is one whose design allows you to create a large variety of pulse lengths, including exceptionally long ones. It is built with 2 hoppers facing into each other with a comparator output from each leading into 2 sticky pistons that move a Redstone Block back and forth between positions that power (and thus lock) one of the two hoppers (the setup is very specific, but you can find it very easily with Google).
The reason the TFF shown at 12:13 works is as follows (I'll be using tech mc instead of comp mc terminology to explain it since that's what I'm used to): TL;DR: Repeater unlocking happens before any other repeater actions in this wiring, which allows the repeater to toggle between its two states. Tile tick components (basically everything that has a delay, repeaters, comparators, observers, etc.) have a built in "priority" system to preserve deterministic behavior. This is called "tile tick priority" (or TTP for short). When tile tick components schedule to change state, they use both this hardcoded priority and the time at which they were scheduled (in this order) to determine what happens first. So, in the example shown, you have a repeater pointing into dust and a repeater pointing sideways into another repeater. In code, the lone repeater has TTP -1 when turning on and -2 when turning off, and the repeater pointing into another repeater (more generally, a repeater pointing into a diode - that is, another repeater or comparator - that doesn't point back into itself) has TTP -3 on both edges. Maybe confusingly, TTP is ordered such that lower values happen first. Since in this example both repeaters are configured for 2gt delay, you can ignore delay being at play here. This first sequence assumes the final repeater is off: 1) When the redstone dust turns off, both repeaters are scheduled to turn off 2gt later. 2) When the time comes for the repeaters to turn off, the repeater pointing into diode turns off first, because of its lower TTP. This, in turn, unlocks the final repeater. 3) At this point in time, the final repeater is unlocked and the dust feeding it is still turned on, so it schedules to turn on 2gt later. 4) Then, the lone repeater turns off (steps 2 through 4 happen in the same game tick). 5) After another 2gt, the final repeater turns on and schedules to turn off 2gt later, since it's no longer powered. This is also where the torch being turned off for 4gt is important, because this is the tick it turns back on, scheduling the other two repeaters to turn on. 6) After another 2gt, this is when the final repeater would turn off. However, because of TTP, the repeater pointing into diode will turn on first, locking the final repeater on before it has a chance to turn off. Then, the lone repeater turns on and the system stabilizes in the ON state. The same happens when transitioning to the OFF state, except the final repeater turns off instead of on in step (5). Notice how this is irrelevant, because the final repeater turning off still has higher TTP of -2 (happens later) than the repeater pointing into diode with TTP -3. For the curious, the full list of tile tick priorities is as follows: Repeater turning on: -1 Repeater turning off: -2 Repeater pointing into diode: -3 on both edges Comparator pointing into diode: -1 on both edges Everything else: 0 Bonus: to exercise your understanding of this, you can change the first two repeaters for any configuration of repeaters and comparators and try to find out what happens, it's good exercise.
That T-FF repeater is a one Redstone Tick pulse generator, but only when the input changes from ON to OFF. That is, if the input is ON, it will not generate the pulse, but when the input changes to OFF, it will generate the pulse. That pulse generator can also be variable up to 4 RT only change the Tick of the Repiter. I used it for a specific case of a calculator that i was make and it was really useful for me the truth😂👀
Your videos have transformed my ability to do Redstone. I don't know what happened over the last week and a half but it's like everything just started clicking when I approached Redstone from a logic gate perspective. I'm a low-code developer and this made the bridge I needed. Thank you for these very analytical videos with examples to follow. My Redstone is so much more refined! I'm currently trying to make my first game and it's a big one: Among Us. It's been challenging and fulfilling and I hope it turns out as good as I hope it will. Again, appreciate the help!
11:09 A latch can change state as long as enable is high. A flip flop can only change state when the clock _goes_ high. Normally you make a flip flop by chaining two latches with the enable input on one of them inverted but in minecraft you can use a latch and a monostable.
Wish you could build builds like u used to do. Maybe the first Redstone camera would be cool (you could do it with pushing blocks in the terain and use the push limit to stop more blocks from coming in then u remove the blocks out of the terain and use repeaters to see if there is a block or not if not it means that there is a block in the terain if there is there is air in the terain then make the info go to a screen and load how the terain looks like with cubes (that don’t have a side)) it would be super cool to see this. Pls like this I really want to see Mathew do this.
You can't push air blocks, so that wouldn't work. Also that system would (if it worked) result in a binary data feed, while that could be displayed it wouldn't really capture enough to be considered a camera.
@@ItsThatOneJack ur not getting it let me explain it a bit more simple so u have for example a 10x10 square of pistons in front of them at blocks that get pushed into the terrain with a depth of 12 blocks Bec that is the max then u return all the blocks that u pushed into the terrain by how many times the piston has fired now u have indeed 1 and 0 Bec of the blocks that u just need to decode by sending a signal through it and with just a tiny cpu u can link it to a screen and show what the terrain looks like now i know it will be crappy but it is the first one look at the first 3x3 piston door that is crappy as well or the first computer that runs Minecraft in Minecraft it is only 8x8 blocks I believe
I’m glad you showed off some designs for t-flip-flops and pulse generators. My go t-flip-flop has been a single-ticked sticky piston based design, which is probably in large part responsible for my extreme hatred of quasi-connectivity
That's not really different, by definition according to the wiki: "A block update is an in-game mechanism that occurs when a block is modified in some way." So, "When they receive a block update in the back", that means a block update from the block the back of the observer is facing. Also, the observer has an arrow on the top pointing to the side that outputs a signal, so, it's not the front.
@@CmdRolled The arrows indicate the direction in which the signal goes. Observers have a propertie called facing which treats the face as the front. Opening/closing fence gates doesn't give any block updates but observers detect it. Powering/depowering a repeater facing an observer two blocks away doesn't activate observers but gives block updates to the observer and the block in front of it.
I would really like to see a video about repeater locks and barrels because I always see repeater locks and barrels being used in your redstone projects but I don’t know what they’re used for, and I think it would be a cool video idea.
The simple toggle flip flop works because its two diffrent kinds of pulse shorteners hooked up to each other. The second one is also set to be a 0 tick pulse shortener.
I tried to make an explanation of how the 3-repeater T-FF worked (showcased at 12:14) but got stumped. This appears to require extensive knowledge of repeater update order. If anyone can provide further insight, please do! Here are my observations: - The circuit takes 4 redstone ticks. - The repeater gets locked on the 4th tick to the state it had on the 3rd tick. - Toggling from the Powered to Unpowered state: - In tick 2, the dust behind the locking repeater becomes unpowered. The locking repeater remains powered. - In tick 3, the locking repeater becomes unpowered. - In tick 4, the locking repeater is locked to the unpowered state. - Toggling from the Unpowered to Powered state: - In tick 2 the dust behind the locking repeater becomes unpowered. The locking repeater remains unpowered. - In tick 3, the locking repeater becomes powered. - In tick 4, the locking repeater is locked to the powered state. This behavior is unexpected and unintuitive because the locking repeater behaves differently even though its power source (the dust) behaves the same. This probably means that there is some difference in redstone tick scheduling based on the power state of locked repeaters, but I am unable to explain it.
Thank you for making a video so it's easier to understand computational redstone for everyone. Unfortunately for me, i'm just going to sit here trying to understand what magic spells you are saying 🙃
I think the way the T Flip-Flop at 12:14 works is that the repeater remembers its input from about 1 tick ago when unlocked, meaning that the one tick the 2 redstone repeaters are off, the output redstone repeater unlocks, then updates its output with the input it got 1 tick ago, and then locks. This was just my observation from testing the clock with the Carpet mod however, so I can't be sure if the observation is completely correct
A slight modification to the circuit at 1:32 is to add a solid block to the end of the comparator and a redstone dust to the right of it the block. This will give a 1-tick pulse.
I think your videos are great. They have the exact level of detail I've been looking for in other redstone videos. While a longer video with same level of detail might be prohibitively time consuming to make, It'd be interesting to see how you would tackle a "real" minecraft red stone problem, like a furnace array running on lava buckets, that would round robin 100 item batches to like 15ish furnaces (totally not because I have been failing at constructing such a thing and just want to cheat now 🙂).
Okay, so to clarify (because I've watched this video a half-dozen times now and still am a little unclear on the precise distinctions): - An SR latch has two pulse-based inputs, one to set the output value and one to reset the output value. (i.e. push button 1 to turn on, button 2 to turn off.) - A data latch is the same as an SR latch, except that it only has a single input using a steady signal instead of pulses. (i.e. flick lever to turn on, flick lever again to turn off.) - A T-flip-flop does the same thing as an SR latch, except using a single pulse-based input instead of a two separate inputs. (i.e. push button to turn on, push button again to turn off.) - All of the above can retain data until receiving a new input, unlike "combinational" circuits that only calculate information and pass it through without retaining any data. Have I got that more-or-less correct?
very informative. Now I just need to translate the digital logic to the game I want to use it in, Astroneer. I can't wait for the next video as that's what I think I need for my design, a sorter that keeps track of the amount of every resource (counting up or down). Unfortunately, at the moment, every resource has its own counter.
13:17 I'm pretty sure that the toggle gates used in binary counters could be called t-latches. I believe that the "t" in "t-flipflop" stands for toggle. So a t-latch would just be something that toggles on or off once each time it's powered. Then again, I could be wrong about the terminology. In the past I think I've heard the term "t-flipflop" be used to refer to a toggle switch with no clock, though by the definition I just gave that would instead be a t-latch.
Hey matt, could you do a video on binary decoding and 7 segment displays? You use binary a ton but it would be very useful if you showed off a way to decode that and turn it into something which could be represented on a 7 segment display
3:42 when did they change it where a four-tick repeater can pick up a one-tick pulse? I remember one-tick pulses having to be converted to a two-or-three-tick pulse in order for a four-tick repeater to pick it up.
For Tflipflop i use a dispenser and a bucket of snow powder in it with a comparator going out of the dispenser. When you activate the dispenser there is only the bucket left so the comparator outputs signal strenth of 1 but when it gets powered again the dispenser takes the snow and now the comarator outputs 2 because it is unstackable. You can also choose water or lava in the bucket but liquids and redstone is not a good mix. It would need to be in a safe place surounded with blocks.
Aw, you talked about pulse extenders and didn't mention comparator fade-out circuits 😢😁 My preferred design for SR latches takes advantage of target blocks so that it can be only 2x2x2 in size: super compact for a torch-based latch. You put two target blocks next to each other, a torch on top of one, and another torch on the side of the other. Then dust next to each torch and boom, a latch.
So that tff has to do with 0-ticking. It basically has to do with the order in which redstone and repeaters are placed (the one with red rep red earlier than the red red rep) which is a really complicated thing to understand (i havent either) but great to hav in mind when working with 0-ticking.
Beautiful video! 😁 The only thing that is incorrect is that Latch have to not be transparent to be Flip Flop If I connect a clock to a latch without any difference is still a latch
lol, learning alot here. I noticed the server I'm on has different timing and tick values. no wonder why things don't work lol. just simple stone button is 2 seconds rather than 1 sec and wooden button is 3 seconds instead of 2 seconds
Duuude. Hooking up a clock to an enable of a latch doesnt make it a flip flop! Flip flop consists out of two latches, main and a follower. (I am a dig design eng)
A T Flip Flop Work Like this @mattbatwings the button is a pulse signal but with a pulse circuit making it's pulse from 10 to 12, then that goes into a NOT Gate to negate it and then it outputs to a repeater to regain strength and then finally working a D-Latch in one pulse
My sir, you MUST try Scrap Mechanic It’s Logic in a videogame with other fun stuff like that and although it can be a buggy mess (early access, although hopefully not much longer) it’s the most fun game I’ve ever played, especially with friends
@@stanh9425 Redstone dust(that he likes to uses a lot) causes much more lag. You usually won't be standing that close to redstone contraption for the sound to be annoying and even if you would you can just turn the sound down or use a resource pack to turn off specific sounds.
i mean i suppose a t latch could be used in like a Random number generator or something,. just pull the latch away to make it a flip flop again, maybe that would be a thing
I would need to make a redstone loop repeater every 5 ticks, but its working by powering it on/off. (On is loop repeeating and off turns it off). Is there a way to do it?
Without knowing I made a mechanism that uses redstone blocker, for a part of the mob farm so I can get XP I could show it to you if you want to see it, is not a big deal
A SR latch is supposed to be Set dominant the Set Line should be the only Line active If both Inputs are 1 The counterpart on the other Hand the RS Latch is Reset dominant the Inverted Line should be the only Line active Those "false States" are used frequently as far as i know Not the best explanation but i learned it in German so yeah xd
@@caut-arg I thought you said observer. Still, the answer is no, because the clock functions by being on for 8 ticks and off for 8 ticks. Thats why its a 16 tick clock, so you need the pulse to be 8 ticks long.
I have been doing bedrock redstone for a little under a year now and I used that repeater locking idea to make a very compact 32 piston extender just a week ago
Great explanations of the repeaters! This cleared things up for me!
I disagree with 11:40. By convention of modern digital design/VLSI, flip-flops are edge-triggered and latches are level triggered. Look up master-slave flip-flops. You can create one with 4 Redstone Repeaters instead of just 2
There are lots of different technologies and strategies in VLSI, and it used to be the case that latches and flip-flops were implemented the same way. But now that transistors are so fast, minimizing hold time is usually preferred. Edge-triggered flip-flops usually have negative hold time, which makes them easier to design with. Though it is possible that Redstone designs are better with latch-based flip-flops and not master-slave flip-flops
I have a masters in Digital Design and VLSI and would be happy to talk more
Thank you for the clarification! Honestly, I would have done more research on this, but I was getting so many disagreeing answers online, I kinda gave up. I really need a peer review system or something for these videos, lol.
I understand level triggered, but what does edge triggered mean? Is it both edges, rising and falling? If so, I understand why the master-slave design makes sense.
I almost never see any master slave designs being used in the logical redstone community, so I think your assumption is correct about latch based implementations being easier. Maybe that’s because minecraft is already running on a global clock (ticks)? I’m not sure. It’s also possible that the fundamental differences between real circuits and redstone makes the merging of terminology impossible.
Also, I’m gonna pin this so that any follow up discussions about flip flops can be in one place.
@@mattbatwings No worries! I totally agree that there's a bunch of conflicting information. I think it's because of all the layers of abstraction in digital design. Generally, VLSI engineers just use whatever DFF standard cell is provided and run automated timing analysis tests to see if their design works. Caring about the exact implementation of cells is usually not required.
There are "positive-edge triggered" master-slave flip-flops and "negative-edge triggered" master-slave flip-flops. To create a "positive-edge triggered" DFF in Redstone, you do
Q
inverted clk → ↑
clk → ↑
D
where each arrow is a repeater.
I like your informed comment--thanks friend! I wanted to get a quick fact check not because I doubt you, but rather because I like that the AI can help give me some extra information. Taken from BING:
That’s an interesting comment. I did some research and found some information that might help you fact check it.
First of all, the comment is correct that by convention of modern digital design/VLSI, flip-flops are edge-triggered and latches are level triggered. This means that flip-flops change their output only at the rising or falling edge of a clock signal, while latches change their output whenever the clock signal is high or low.
Secondly, the comment is also correct that you can create a master-slave flip-flop with 4 Redstone Repeaters instead of just 2. A master-slave flip-flop is a type of flip-flop that consists of two latches connected in series, with the first one (master) being enabled by the clock signal and the second one (slave) being enabled by the inverted clock signal. This way, the output of the master latch is transferred to the slave latch only at the edge of the clock signal, making it a flip-flop.
Thirdly, the comment is partially correct that latches and flip-flops were implemented the same way in the past, but now edge-triggered flip-flops are preferred over level-triggered latches. This is because edge-triggered flip-flops have less hold time (the time that the input must remain stable after the clock edge) and more setup time (the time that the input must be stable before the clock edge) than level-triggered latches, which makes them easier to design with and less prone to glitches. However, this does not mean that latches are obsolete or useless. Latches are still used in some applications where speed, simplicity or power consumption are more important than timing constraints.
I hope this helps you verify the comment. If you want to learn more, you can check out these sources:
1: www.geeksforgeeks.org/difference-between-flip-flop-and-latch/ 3: electronics.stackexchange.com/questions/21887/difference-between-latch-and-flip-flop 2: www.cs.ucr.edu/~ehwang/courses/cs120b/flipflops.pdf 4: www.elprocus.com/difference-between-latches-and-flip-flops/
@@LupusMobile Yes, this is also correct. I guess I should have said, design constraints have gotten less strict over time as transistors have gotten smaller and better. Therefore, implementing a flip-flop as a master-slave flip-flop has become the norm in present-day VLSI.
I tried to do a bit of digging around, and from what I understood the main reason of using master slave flip flops is that they are, as you said, edge triggered and as such less suseptible to race around condition.
Now, neither CS or redstone are exactly my expertise (read as: assume I've got no real clue what I'm talking about) but I would assume that with redstone calculated with global ticks a race around condition will be much less of a problem, simply because unlike real circuitry you can reasonably predict the way in which a race around condition will behave, using brute force if nothing else? Also, it seems slave master flip flop are usually double the size more or less, which will probably lengthen the response time of the flip flop (which seems like a pretty big drawback)
So, I would assume it's probably why redstoners tend to use a more simple type of flip flops. What do y'all think?
Never knew pulses would be so important and complicated
Wassup ronic, i remember you from discord
Its a me, Enulix
I think all of these videos are complicated. Makes me want to give up getting started on Redstone
You are the best explainer to exist, you are better then every single teacher I have ever had.
My clocks have always been the most horrific things imaginable (especially if I want a toggle), it's awesome to see a very simple version here!
The differentiation between latches and flipflops is made, because you usually add more safety to the flipflop to prevent funky behaviour. For example you'd make your d-flipflop take the input on a rising edge but change the output on the falling edge. That gives time for the circuit to stabilize and prevents weird behavior.
You explains the techniques better than my Computer Organisation lecturer 😂
Keep up the work 🟥🪨 Engineer
I sent his videos to an old electronics instructor. She has added them into her lessons.
@@joswald9160 that’s so cool!
@@joswald9160 Noice
@@abeyroy007 XD
🔴🪨👷?
Thank you for providing this playlist - It is greatly appreciated!!
I've been watching the Computer Science playlist from CrashCourse and being able to use your LRR playlist as a method to put the theory they provide into practice has been really useful.
One of the things I found useful whilst going through both playlists was to also build out the expanded diagrams from CrashCourse of the XOR gate and the D-Latch (Or Gated Latch as they call it) Once I'd got a practical example it then gave me a better understanding of the two mechanisms once abstracted which I found important to help cement my understanding.
Thanks a million for the alternating signal comparator clock, it was just what I needed for an autocrafter build!
Probably the two most commons types of clocks for everyday use in Minecraft (which I'm guessing you didn't mention because they are rarely or never used in logical redstone) are the "auto-dropper" clock and the "Ethonian Hopper" clock
The "auto-dropper" takes a comparator output from a dropper, boosts it with a repeater, then runs it back into the comparator's side, with the output doing something to power the dropper. This creates a clock that only turns on when there are items in the dropper and repeatedly pulses until all of the items in the dropper have been dropped out. Very useful for item transportation, or if you switch out the dropper for a dispenser it can be used to auto-fire potions/arrows/etc
The "Ethonian" clock (named after prolific redstone content creator EthosLab) is one whose design allows you to create a large variety of pulse lengths, including exceptionally long ones. It is built with 2 hoppers facing into each other with a comparator output from each leading into 2 sticky pistons that move a Redstone Block back and forth between positions that power (and thus lock) one of the two hoppers (the setup is very specific, but you can find it very easily with Google).
The reason the TFF shown at 12:13 works is as follows (I'll be using tech mc instead of comp mc terminology to explain it since that's what I'm used to):
TL;DR: Repeater unlocking happens before any other repeater actions in this wiring, which allows the repeater to toggle between its two states.
Tile tick components (basically everything that has a delay, repeaters, comparators, observers, etc.) have a built in "priority" system to preserve deterministic behavior. This is called "tile tick priority" (or TTP for short). When tile tick components schedule to change state, they use both this hardcoded priority and the time at which they were scheduled (in this order) to determine what happens first.
So, in the example shown, you have a repeater pointing into dust and a repeater pointing sideways into another repeater. In code, the lone repeater has TTP -1 when turning on and -2 when turning off, and the repeater pointing into another repeater (more generally, a repeater pointing into a diode - that is, another repeater or comparator - that doesn't point back into itself) has TTP -3 on both edges. Maybe confusingly, TTP is ordered such that lower values happen first.
Since in this example both repeaters are configured for 2gt delay, you can ignore delay being at play here. This first sequence assumes the final repeater is off:
1) When the redstone dust turns off, both repeaters are scheduled to turn off 2gt later.
2) When the time comes for the repeaters to turn off, the repeater pointing into diode turns off first, because of its lower TTP. This, in turn, unlocks the final repeater.
3) At this point in time, the final repeater is unlocked and the dust feeding it is still turned on, so it schedules to turn on 2gt later.
4) Then, the lone repeater turns off (steps 2 through 4 happen in the same game tick).
5) After another 2gt, the final repeater turns on and schedules to turn off 2gt later, since it's no longer powered. This is also where the torch being turned off for 4gt is important, because this is the tick it turns back on, scheduling the other two repeaters to turn on.
6) After another 2gt, this is when the final repeater would turn off. However, because of TTP, the repeater pointing into diode will turn on first, locking the final repeater on before it has a chance to turn off. Then, the lone repeater turns on and the system stabilizes in the ON state.
The same happens when transitioning to the OFF state, except the final repeater turns off instead of on in step (5). Notice how this is irrelevant, because the final repeater turning off still has higher TTP of -2 (happens later) than the repeater pointing into diode with TTP -3.
For the curious, the full list of tile tick priorities is as follows:
Repeater turning on: -1
Repeater turning off: -2
Repeater pointing into diode: -3 on both edges
Comparator pointing into diode: -1 on both edges
Everything else: 0
Bonus: to exercise your understanding of this, you can change the first two repeaters for any configuration of repeaters and comparators and try to find out what happens, it's good exercise.
Damn that's complicated, good job on the person figuring out this works.
i have been researching computers and playing logic world and digital logic sim and this is really fun to watch and to learn 1 or 2 things
Finally another LRR episode!!!
Love your videos!!!!
Don't forget the JK Flip Flop! It's like the gated SR latch, but it can also toggle the output when both inputs are high.
Also known as Just Kidding flip-flop☝️🤓
That T-FF repeater is a one Redstone Tick pulse generator, but only when the input changes from ON to OFF.
That is, if the input is ON, it will not generate the pulse, but when the input changes to OFF, it will generate the pulse.
That pulse generator can also be variable up to 4 RT only change the Tick of the Repiter.
I used it for a specific case of a calculator that i was make and it was really useful for me the truth😂👀
i love how interesting this type of video's are.
Your videos have transformed my ability to do Redstone. I don't know what happened over the last week and a half but it's like everything just started clicking when I approached Redstone from a logic gate perspective. I'm a low-code developer and this made the bridge I needed. Thank you for these very analytical videos with examples to follow. My Redstone is so much more refined! I'm currently trying to make my first game and it's a big one: Among Us. It's been challenging and fulfilling and I hope it turns out as good as I hope it will. Again, appreciate the help!
11:09 A latch can change state as long as enable is high. A flip flop can only change state when the clock _goes_ high.
Normally you make a flip flop by chaining two latches with the enable input on one of them inverted but in minecraft you can use a latch and a monostable.
I am unironically using this video to cram for my Digital Systems midterm. You explain better than my prof.
Wish you could build builds like u used to do. Maybe the first Redstone camera would be cool (you could do it with pushing blocks in the terain and use the push limit to stop more blocks from coming in then u remove the blocks out of the terain and use repeaters to see if there is a block or not if not it means that there is a block in the terain if there is there is air in the terain then make the info go to a screen and load how the terain looks like with cubes (that don’t have a side)) it would be super cool to see this. Pls like this I really want to see Mathew do this.
You can't push air blocks, so that wouldn't work.
Also that system would (if it worked) result in a binary data feed, while that could be displayed it wouldn't really capture enough to be considered a camera.
@@ItsThatOneJack ur not getting it let me explain it a bit more simple so u have for example a 10x10 square of pistons in front of them at blocks that get pushed into the terrain with a depth of 12 blocks Bec that is the max then u return all the blocks that u pushed into the terrain by how many times the piston has fired now u have indeed 1 and 0 Bec of the blocks that u just need to decode by sending a signal through it and with just a tiny cpu u can link it to a screen and show what the terrain looks like now i know it will be crappy but it is the first one look at the first 3x3 piston door that is crappy as well or the first computer that runs Minecraft in Minecraft it is only 8x8 blocks I believe
I’m glad you showed off some designs for t-flip-flops and pulse generators. My go t-flip-flop has been a single-ticked sticky piston based design, which is probably in large part responsible for my extreme hatred of quasi-connectivity
1:52 Observers activate when the block in front of them or the state of the block change not when it receives a block update
That's not really different, by definition according to the wiki: "A block update is an in-game mechanism that occurs when a block is modified in some way." So, "When they receive a block update in the back", that means a block update from the block the back of the observer is facing. Also, the observer has an arrow on the top pointing to the side that outputs a signal, so, it's not the front.
@@CmdRolled The arrows indicate the direction in which the signal goes. Observers have a propertie called facing which treats the face as the front. Opening/closing fence gates doesn't give any block updates but observers detect it. Powering/depowering a repeater facing an observer two blocks away doesn't activate observers but gives block updates to the observer and the block in front of it.
@@johndeyner ur right sorry
I would really like to see a video about repeater locks and barrels because I always see repeater locks and barrels being used in your redstone projects but I don’t know what they’re used for, and I think it would be a cool video idea.
the first episode is specifically made to explain every component you need in digital redstone, including these ones
The barrels are just used to get a specific comparator output signal strength, based on how full the barrel is.
YES FINALLY
This is my fav series because I'm still learning redstone
Love yo vids matt
The simple toggle flip flop works because its two diffrent kinds of pulse shorteners hooked up to each other. The second one is also set to be a 0 tick pulse shortener.
As a student who is learning electrical engineering and plays Minecraft, the redstone and logic circuits are easy for me.
Now I finally understand some of what Mumbojumbo says....
Can't wait for the next episode, keep it up
I tried to make an explanation of how the 3-repeater T-FF worked (showcased at 12:14) but got stumped. This appears to require extensive knowledge of repeater update order. If anyone can provide further insight, please do!
Here are my observations:
- The circuit takes 4 redstone ticks.
- The repeater gets locked on the 4th tick to the state it had on the 3rd tick.
- Toggling from the Powered to Unpowered state:
- In tick 2, the dust behind the locking repeater becomes unpowered. The locking repeater remains powered.
- In tick 3, the locking repeater becomes unpowered.
- In tick 4, the locking repeater is locked to the unpowered state.
- Toggling from the Unpowered to Powered state:
- In tick 2 the dust behind the locking repeater becomes unpowered. The locking repeater remains unpowered.
- In tick 3, the locking repeater becomes powered.
- In tick 4, the locking repeater is locked to the powered state.
This behavior is unexpected and unintuitive because the locking repeater behaves differently even though its power source (the dust) behaves the same. This probably means that there is some difference in redstone tick scheduling based on the power state of locked repeaters, but I am unable to explain it.
Hijacking the signal got me rolling😂
"Touch the untouchable,understand the understandable"
-redstone
row row
fight the powwa
@@NoNameAtAll2 Dammit, you beat me to it! 😂
I feel like we need an actual 3D circuit design tool. Just imagine if we had a cube-shaped processor.
My favorite RS latch is made with just two droppers and a comparator.
SR* true.
Thank you for making a video so it's easier to understand computational redstone for everyone. Unfortunately for me, i'm just going to sit here trying to understand what magic spells you are saying 🙃
LOGICAL REDSTONE FOREVER!!!!!!!!!
I think the way the T Flip-Flop at 12:14 works is that the repeater remembers its input from about 1 tick ago when unlocked, meaning that the one tick the 2 redstone repeaters are off, the output redstone repeater unlocks, then updates its output with the input it got 1 tick ago, and then locks. This was just my observation from testing the clock with the Carpet mod however, so I can't be sure if the observation is completely correct
"Alternating signal" yeah that sounds familliar
The reason the T Flip-Flop at 12:20 works was s because repeaters facing into the side of repeaters power earlier in the update order
A slight modification to the circuit at 1:32 is to add a solid block to the end of the comparator and a redstone dust to the right of it the block. This will give a 1-tick pulse.
these videos are AWESOME! thank you!
I think your videos are great.
They have the exact level of detail I've been looking for in other redstone videos.
While a longer video with same level of detail might be prohibitively time consuming to make, It'd be interesting to see how you would tackle a "real" minecraft red stone problem, like a furnace array running on lava buckets, that would round robin 100 item batches to like 15ish furnaces (totally not because I have been failing at constructing such a thing and just want to cheat now 🙂).
Great explanation. Subbed!
Yo bro just made PWM in minecraft! I've only worked with them irl and had no idea it could even be implemented that way...
Okay, so to clarify (because I've watched this video a half-dozen times now and still am a little unclear on the precise distinctions):
- An SR latch has two pulse-based inputs, one to set the output value and one to reset the output value. (i.e. push button 1 to turn on, button 2 to turn off.)
- A data latch is the same as an SR latch, except that it only has a single input using a steady signal instead of pulses. (i.e. flick lever to turn on, flick lever again to turn off.)
- A T-flip-flop does the same thing as an SR latch, except using a single pulse-based input instead of a two separate inputs. (i.e. push button to turn on, push button again to turn off.)
- All of the above can retain data until receiving a new input, unlike "combinational" circuits that only calculate information and pass it through without retaining any data.
Have I got that more-or-less correct?
very informative. Now I just need to translate the digital logic to the game I want to use it in, Astroneer. I can't wait for the next video as that's what I think I need for my design, a sorter that keeps track of the amount of every resource (counting up or down). Unfortunately, at the moment, every resource has its own counter.
I'm the person in your discord today playing create.
While you were drawing and playing among us
im really learning logic gate circuit with minecraft
13:17 I'm pretty sure that the toggle gates used in binary counters could be called t-latches. I believe that the "t" in "t-flipflop" stands for toggle. So a t-latch would just be something that toggles on or off once each time it's powered. Then again, I could be wrong about the terminology.
In the past I think I've heard the term "t-flipflop" be used to refer to a toggle switch with no clock, though by the definition I just gave that would instead be a t-latch.
Hey matt, could you do a video on binary decoding and 7 segment displays? You use binary a ton but it would be very useful if you showed off a way to decode that and turn it into something which could be represented on a 7 segment display
i love you mattbatwings
3:42 when did they change it where a four-tick repeater can pick up a one-tick pulse? I remember one-tick pulses having to be converted to a two-or-three-tick pulse in order for a four-tick repeater to pick it up.
Copper bulbs are the new methods to make t-latches lol
For Tflipflop i use a dispenser and a bucket of snow powder in it with a comparator going out of the dispenser. When you activate the dispenser there is only the bucket left so the comparator outputs signal strenth of 1 but when it gets powered again the dispenser takes the snow and now the comarator outputs 2 because it is unstackable. You can also choose water or lava in the bucket but liquids and redstone is not a good mix. It would need to be in a safe place surounded with blocks.
I love your videos, keep it up 😀
Aw, you talked about pulse extenders and didn't mention comparator fade-out circuits 😢😁
My preferred design for SR latches takes advantage of target blocks so that it can be only 2x2x2 in size: super compact for a torch-based latch. You put two target blocks next to each other, a torch on top of one, and another torch on the side of the other. Then dust next to each torch and boom, a latch.
So that tff has to do with 0-ticking. It basically has to do with the order in which redstone and repeaters are placed (the one with red rep red earlier than the red red rep) which is a really complicated thing to understand (i havent either) but great to hav in mind when working with 0-ticking.
8:35 bro used every way to say i wasted my 2 hours just staring at the diagram;-;
"T latches don't make a lot of sense"
Clocks:
(Also, amazing video as always!)
Beautiful video! 😁
The only thing that is incorrect is that Latch have to not be transparent to be Flip Flop
If I connect a clock to a latch without any difference is still a latch
9:24 consider the following: zero. Although the typical inverse: 1/x doesn't apply with zero. The sign inversion does apply 0 = -0
The inversion in boolean algebra is 1-x
lol, learning alot here. I noticed the server I'm on has different timing and tick values. no wonder why things don't work lol. just simple stone button is 2 seconds rather than 1 sec and wooden button is 3 seconds instead of 2 seconds
Where was this video during my digital systems class
as far as I know in electronics a latch reacts to level of the enable signal but a flipflop reacts to the edge of a signal
Nice i like this video i get more knowledge about this pules circuit and clocks
learning this in minecraft is so much better than learning this in my class lol
Copper bulbs make half of this so easy bro
There is the classic piston cutoff method, but this is more general to shorten pulses.
Duuude. Hooking up a clock to an enable of a latch doesnt make it a flip flop! Flip flop consists out of two latches, main and a follower. (I am a dig design eng)
Hey matt you culd have used powderd snow inside a dispenser and usea. Comparator to detect it
yessir another banger video
7:41 Some people aslo call this a RS-Nor Latch or a RS Latch.
I use clocks to switch between inputs in combinational circuits
9:25
pretty sure irl SR latches work that if it is SR latch and both S and R are 1 then S takes priority over R while in RS this is opposite
A T Flip Flop Work Like this @mattbatwings the button is a pulse signal but with a pulse circuit making it's pulse from 10 to 12, then that goes into a NOT Gate to negate it and then it outputs to a repeater to regain strength and then finally working a D-Latch in one pulse
How are those lamps turning off instantly, without delay?
They are probably re textured trapdoors
My sir, you MUST try Scrap Mechanic
It’s Logic in a videogame with other fun stuff like that and although it can be a buggy mess (early access, although hopefully not much longer) it’s the most fun game I’ve ever played, especially with friends
Regular people: the only flip flops I have are on my feet!
Redstoners:
(Keep up the work Matt!)
8:31 you know you can just use 2 normal pistons facing each other with a 2 block gap between them and in one of them put redston block
He doesn't like using pistons for some reason (no one knows why)
@@hahahaha666Pistons cause immense lag and make sound
@@stanh9425 Redstone dust(that he likes to uses a lot) causes much more lag. You usually won't be standing that close to redstone contraption for the sound to be annoying and even if you would you can just turn the sound down or use a resource pack to turn off specific sounds.
I was hoping to see hopper based clocks.
yo
Ima not spam first or anything but Hi love your vids.
EDIT: thanks to all who like this
His videos are super useful! Just 3 days ago I thought Redstone computers were impossible. Now, because of him, I'm building them.
@@BlueAnalogGaming agreed
im looking at getting better at redstone myself
Are you going to do an episode about displays like in LR?
i mean i suppose a t latch could be used in like a Random number generator or something,. just pull the latch away to make it a flip flop again, maybe that would be a thing
in the school im with flip-flop rs, we started last class
7:42 I will say, hoppers make a really good SR LATCH. …& DATA LATCH omg and tff
A T-Latch is actually a thing! It just toggles every time you input a pulse.
I would need to make a redstone loop repeater every 5 ticks, but its working by powering it on/off. (On is loop repeeating and off turns it off). Is there a way to do it?
I am playing on bedrock and my T-FF is not working (the one with red concrete only) is it just because I am playing on bedrock?
Without knowing I made a mechanism that uses redstone blocker, for a part of the mob farm so I can get XP
I could show it to you if you want to see it, is not a big deal
hi, trying to build my memory of my redstone device, just wondering if you can have an sr latch with 3 inputs
1 tick pulse can be create from 2 redstone 1 button and comparator
this is so poggers
how to know the period we mean game tick or redstone tick?
A SR latch is supposed to be Set dominant the Set Line should be the only Line active If both Inputs are 1
The counterpart on the other Hand the RS Latch is Reset dominant the Inverted Line should be the only Line active
Those "false States" are used frequently as far as i know
Not the best explanation but i learned it in German so yeah xd
I call SR latches RS latches
and this means the period must be even.
Looks like the front torch of your comparators is always on. Am I seeing that right?
👏👏👏 почему ты не используешь блок мишени для направления сигнала?
Он использует только блоки из 2013
А с чем это связано?
isn't the t-flip flop the same as a data latch in functionality?
So basicly flipflops are usless right ? Since they are latches without ennable lever
6:10 isnt easier just using a 3 tick repeater after the coparator instead of that Second compartor + repeater
Yes and no, because then youll get a pulse when the button powers and unpowers.
@@stanh9425the signal from de last repeater cancels the lever signal, it would be the same
@@caut-arg I thought you said observer. Still, the answer is no, because the clock functions by being on for 8 ticks and off for 8 ticks. Thats why its a 16 tick clock, so you need the pulse to be 8 ticks long.
@@stanh9425i tried what i said and it works, is just a little less readable, i think is the reason why he Made it how it is in the video
@@caut-arg It literally cant work. Either your clock is now 11 ticks long, or your output is 8 ticks long.
I have been doing bedrock redstone for a little under a year now and I used that repeater locking idea to make a very compact 32 piston extender just a week ago