For anyone wondering about the drawing: The mistake lies in the connections of the Q outputs to the AND gates. Q must connect to the upper AND gate with the J input, while !Q must connect to the lower one with the K input. Now it works as it should: J performs the Reset function, K performs the Set function, and J+K at the same time performs either the Set or the Reset function, depending on which state the Q outputs have been before, a.k.a. it performs the "Toggle" function.
This is ridiculous, thank you so much. I was losing my mind trying to figure out how the hell the logic worked with his drawing. Glad to know it's just wrong and he didn't do anything to fix it...
The drawing is correct Q goes to K, !Q goes to J in terms J is "Set", K is "Reset", which is default I suppose. If both J and K are 0, Q doesn't change. If J is 0 (K = 1) => Q goes 0 (or !Q goes 1), J = 1 (K = 0) => Q goes 1 (!Q goes 0). J = K = 1 => toggle Q. Therefore J sets Q to 1, K (re)sets Q to 0.
I love these videos. They take me back to the sixties at the start of my career. As already stated and I agree - The inputs are labeled J and K in honor of the inventor of the device, Jack Kilby
Sir you're the best teacher humanity could ever have, illustrating this subject, on which ever level, be it high school, university or even post grade. These series of tutorials should be carved into a stone be passed on to learners for millennia
Ben Eater , you are my teacher, and I am a very serious student of yours! I don't have a single competent engineering teacher in my school, even though I go to one of the top highschools in America (I'm not saying which because I don't want this comment on my teachers to be tracked to me personally). I used to take an engineering course, but realized this piece of information for myself and from older students, and dropped the course later. I then discovered you, and now I learn by myself. So that's why I say you are my teacher, because I'm not using you to supplement another teacher or anything; everything I know about circuits is the very basics from Khan academy, and all the very advanced logic and circuits you do. I watched every single video you created and took notes, and create my own circuits, following along to your videos; I'm not joking when I say that I'm a student of yours. I plan to make a big project for school in the school expo making a breadboard computer like yours (with some of my own modification and additions). Without you, I would be nowhere, and know nothing about circuits, and you allowed me to make a big step in my dream of understanding how desktop computers work on a deep level. Your explanations are amazing, and you are a very talented teacher and explainer, very easily sympathizing with the a student's situation of not knowing anything, unlike many others. Your explanations are thorough, and very ordered in the final goal of understanding, taking nothing for granted through your deep understanding, which is probably one of the top things I love about your teaching; you understand and explain things on such a deep level. Not to mention, your a native speaker and aren't annoying or hard to listen to like many other youtubers with Indian accents. I think I speak on behalf of quite a few people in begging you to please continue making videos, and that we appreciate your videos so much, and at least know that you have truly inspired and dramatically changed the understanding of circuits for many people like me, and I'm not trying to be sentimental or anything, I seriously mean it. I really want to be an engineer in this direction. Ben Eater, from the bottom of my heart, thank you for these videos!
I have discovered that watching to many of these videos in a row makes my head numb and I can no longer figure out what is happening in the circuit. So it, that I have decided that I can only watch onnne ia eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee ah, this is what happens when you fall asleep for a few seconds while typing. Thanks Fentynal!
THIS IS EXACTLY WHAT I NEEDED AND WHAT MY LECTURER TODAY WAS UNABLE TO EXPLAIN - Thank god for this little series you have done it has helped me so much
I believe there is an error in the layout of this circuit. It seems that when using nor gates you don't want to go from the opposite side nor gate back to the and gates. If you were using nand gates rather than nor gates your diagram would be correct. Since you are in fact using nor gates, you would go back from the same side nor gate to the and gates. Can someone else please confirm this?
Thanks man! I was wondering for 15 minutes why the state {J = 1, K = 1, CLK = rise} toggle instead of staying in the last state. I knew that it must toggle, but I couldn't understand why. Finally I decided to check in the comments if could be some mistake in the drawing
They downvoted the video because the circuit diagram is wrong. Not that the rest of his videos aren't amazing (they are) it's just that this one is a little flawed.
A famous experiment for JK FF is to set both the J and K high and then connect the CLK to an active high MOM switch, this will toggle the output between HI and LO... The mechanical switch may produce noisy output so the filtering RC circuit is a must.
That reminds me of the "Electronic Coin-Toss" we made as our first electronics project in 8th grade.... I think it was just both R and S effectively being high, and a push button for the Enable -- then it'd light up either Heads or Tails as the Q and Q-bar. I don't _actually_ remember the circuit, but it looked very similar.
I believe this one is faulty. You have to either switch places on both Q & Q' and J&K for this to work OR You have to keep them like that but have the and gates switch their outputs (or gates). And gate on top goes to the or gate on the bottom etc.
I greatly appreciate you efforts in term,s of time and resources to create these wonderful videos. I will be taking a Logic class in the fall , and I wanted to experiment with the fundamentals of digital circuit design. I am using CMOS, but I believe I need to get some TTL chips. These tutorials are top notch on several levels.
I was fascinated by this circuit back in the day! I thought of this circuit as a means to 'transcend' logic (in logic circuits.) I used it as a random number generator and did many projects needing 'random' logic.
I learned about logic gates, flip-flops, latches, when I was in 1st-year university, 12 years ago, but the professor did not provide the electronic behind it and how it actually works in the circuit board. I was ultimately confused when I was taught the inner schematic of flip-flop consisting of logic gates and a feedback line. I thought it didn't make any sense at all. I was studying computer science, by the way. So logic gates, flip-flop, and stuffs were only a part of introductory courses in my major, without actual physical implementation. We only used a computer-based simulator software (Multisim) to create a schematic of a logic circuit. On the other hand, I studied some basic electronics during my high school and was introduced with electronic components including resistor, transistor, capacitor, and so on. But it was really difficult for me to connect between electronics, digital logic circuits, and eventually a computer, and I realized for a very long time that there is a missing link that wasn't really taught by my professor at the university. But you explained it in a very clear and concise manner, with an actual demonstration, and finally, I understand how the feedback line in a flip-flop works, and its relationship with how a transistor works in an electronic circuit, and even I can finally connect all the dots from the electronic circuit primitives into a real computer. Thank you very much for all your videos. You said you didn't have a degree but you explained this topic way better than my professor did. You proved that there is something that is really wrong with the education system as you mentioned that your ultimate goal is to improve it. I hope you will achieve your goal, and perhaps you will actually introduce students properly about how basic digital system works. :)
Well I'm taking a class like that right now as a computer scientist, and we still are shown any of it. I guess we are shown diagrams, but not how the signal actually goes through all the parts, most likely since we go through many diagrams in one hour long lecture, so not enough time is given to go more in depth. Crazy how not much changes after a decade and a half in a fast changing field of study though.
For the output of the invalid state, just write it as "Random State". I think that would more accurately convey the true nature of the flip-flop's behavior.
at 7:26, why would that reset Q? the lower AND gate would give out a 1, and given the Q at that time is still 1 the result of that NOR gate would be a 0, meaning that Q remains 1...
Thank you for following up! Some of us were paranoid about the break in vids, given the value of what you do. This stuff is turning me into a programmer. I know a wealth of languages, without knowing what I'm actually doing, which makes me so much worse. "What is a variable really?", "How does a function do?". This is absolutely invaluable. Thank you so much for what you're doing. :)
Ben, after having watched it - thanks for another great explanation. Awesome as always. Hope this is preparatory for the 8-bit computer; I'm guessing for a ring counter?
You have wrong at this time🤭 but you are the guy who responsible i completely understand the deference between SR, D, Flip flop, and JK flip flop. 👍. Well done ♥️
Ben, I beleive there is an error! When explaining the final schematic, you say that K resets it when it outputs a one, but it seems as if the K output is going into the set input of the S and R latch, you can see that when you go back to the diagram of the S and R latch and see that the bottom input is the Set input. I feel like the K input should go to the top nor gate and that the J should go to the bottom nor gate
Corey Hulse Yes and a JK Flip Flop is make with Gated SR Nand, not a Nor Latch and the Gated is a "No Gated". So you replace all his JK flip flop's gates by 4 Nand Gate. And you have your JK flip flop.
Some say the JK-Flip-Flops where invented by Jack Kilby, but I think it's more like an homage to Jack Kilby that those inputs are called J and K, since Kilby was the inventor of integrated circuits (germanium based, which was invented in his freetime in September 1958) and also the inventor of the electronic calculator. The JK FlipFlop got patented in 1966 (May 18th) by Motorola Inc. (Norman J. Miller) and I think Kilby was only working for Texas Instruments and also as a private inventor/engineer. Also often used terms are Jump and Kill. Miller did not mention the meaning of J and K, I just looked the patent sheet, he just wrote J and K there.
Ben, great video! Eagerly awaiting the continuation of your breadboard computer series. Also, there's an urban legend floating around that the JK Flipflop was named after Jack Kilby! However, this isn't confirmed. The first time those letters started being used was in one of the early patents for the design, where the patent author chose those letters for some unimportant reason.
We need to share these videos and really get them out there to motivate Ben. They're fantastically well made and I think we can all agree that they are invaluable rescources for anyone interested in electronics and logic. Keep them coming!
Me too. But I guess he wants to explain the sequencer unit now, so he needs to explain binary counters first, and this in turn requires explaining the T flip-flops first (also known as "frequency dividers" or "count to two"), which are the building blocks of any binary counter. They can be made from the "universal flip-flops", the JK ones. (Well, interestingly, they can be made from D flip-flops as well, but let's allow Mr. BeNeater to explain the JK flip-flop as well, for completeness's sake ;) ). I, for one, can't wait for the instruction decoder and the control unit, because those are usually the least-explained elements of the CPU in every course I've seen.
Xenthera I would also like to see the older way of doing it, with just plain old logic. It can be done easily if the instruction set is specially crafted for that (e.g. some bits in an instruction can select operations in the ALU, other bits can select registers, still other can select the direction of data flow etc.).
Don't forget to hit the bell icon to get notifications! Ben's super great, and part of that is not shilling for views, likes, and subs. So let's shill on his behalf!
5:30 if both nor gates are manufactured exactly the same they will start flickering / resonating because both nor gates will turn off eachother so when you conect Power both nor gates will turn on then they will turn off eachother but then they realise that there arent getting any signal in then the cycle reapeats almost in mhz
So... in summary (having been through the set now) SR latch has two inputs, one to turn it on, one to turn it off. A D latch has one input to turn on or off but its state is ignored until the enable is on. A D flip flop is similar but the enable (clock) rising edge is converted to an "enable" pulse to make it only check the input state momentarily. A SR flop flop is similar to a SR latch, but the state of the inputs is ignored unless an "enable" is on (which is actually a pulse created from the rising edge of the clock). A JK flip flop is the same but with some extra connections to ensure the "both inputs on" state doesn't cause unknown behaviour and instead toggles the output in a predictable way. [Note, mainly just wrote this to summarise to myself]
Yes I belive they are. And you have to be really careful about your edge detector or the circuit will change state many times and become unpredictable.
7:00 I think resetting Q when it’s set by giving K =1 and J = 0 is confusing, or wrong. On clock, K&Q = 1 => lower nor out is 0, I.e., ~Q is 0. Therefore Q is 1. Set Q by making K = 1 not reset Q.
Error Correction Notice: This video has an error regarding the JK Flip Flop which Ben has stated and fixed in his next video ruclips.net/video/st3mUEub99E/видео.html The names J and K should be reversed in this video. Also I believe as other comments have suggested, the feedback loops shouldn't be crossed. Meaning that feedback from Q should go back to the top AND gate and the feedback from Inverse Q should go back to the bottom AND gate.
Great video Ben! The fact that the state is unknown when S and R = 1 is very interesting. Maybe it could be used for producing a chance operation. Like a random flip of the coin
sonodrome Unfortunately that wouldn't work. The state the flip flop ends up in depends on the length of the wire and the tolerances of the parts used. So it usually stays the same for every individual flip flop. There is no way you can make a 50/50 chance out of that.
Actually there is, and I once did exactly that. I used a very fast square wave generator (a 555 timer would suffice) to constantly set/reset an RS flip-flop and when the user pressed a button, it latched the flip-flop at the particular state it was currently in, displaying the result. Well, not exactly using the "forbidden" state, but it worked ;)
I think the result would depend on when the user presses the button relative to the current clock state. So it's not truly random, but for all intents and purposes it's unpredictable. You could call it a Pseudo Random State Generator :)
sonodrome With that definition, nothing is truly random. The result of a coin toss depends on the initial conditions (orientation of the coin in the tosser's hand, initial velocity, air flow etc.) and the laws of physics. If you could know all those little parameters and the configurations of all atoms on the coin's way, you could theoretically predict the outcome of a coin toss. But in practice it is impossible, so the result is random enough for all purposes.
"Anyone who considers arithmetical methods of producing random digits is, of course, in a state of sin." [1] [1] Von Neumann, John (1951). "Various techniques used in connection with random digits”, National Bureau of Standards Applied Mathematics Series. 12: 36-38.
Geometry Dash Galluxi I didn't upload videos before lol.. they're just videos I have liked or maybe playlists I have collected together. Anyways, thanks for the kind words :) Also, I may upload videos in the future
There is a mistake in the JK schematic diagram - the K works as reset and must be on top and J (set) in bottom. Just compare it with SR flip-flop diagram wich is the same except for the feedback lines from the Q/Q-not outputs.
I thought about the same thing. He mentioned it in his video about D Flip Flop. But from the circuit he had built and tested in that video it is confirmed that the falling edge of the clock signal does not create another enable pulse. Although I still doubt why the falling edge doesn't create an enable pulse. I sent a comment on that video about this. I think on the falling edge, the current is in reverse and since the circuit can't provide the current needed to discharge the capacitor, the capacitor gets this reverse current from ground and thus does not affect the circuit and does not create an enable pulse. I'm not completely sure about this. Can someone confirm?
Mr Ben if Q is set, and that feedback to and gate connected to k input and then we give a clock pulse to turn on and gate but if nor gate will only turn on when both input are low, it's not possible to set Q compliment! Make it correct please!
It's great to see a new video from you! Isn't there an issue with this flip flop? Surely if J and K are both high then you get the toggle, that's fine. But wouldn't that toggling just keep looping back and forth until your clock 'enable' goes low, eventually settling into some unknown state? Are you just relying on that spike being short enough that you don't get this sort of feedback?
7:20 seems to be wrong. You say that an input of 1 to the lower NOR will be a "reset" and make Q equal to 0... BUT in your SR Latch video (ruclips.net/video/KM0DdEaY5sY/видео.html) at 9:48 you labeled the UPPER input as "reset" and at 10:05 in the latch vid did an input of "1" to the lower input and got a Q of "1." Also, when I worked it out myself that's what I got as well... I'm pretty confused since I tried to replicate this circuit myself and work it out by hand, but all the outputs I'm getting amount to HOLD. Anyone getting this too? Am I doing something wrong?
From 7:00-7:41, you explained considering when Q is High, J=0, K=1. In this case, the output of And gate for K is High and Also since Q is High, we get Output of NOR gate is Low at K side. Since J is already low, NOR gate at J side will also become active and so remaining Q to HIGH. Ultimately this circuit has no change in the output even you set the clock. Can you please explain me as I am confused how to reset Q when it is set in a condition J=0, K=1. Thanks in advance! Hope it would be correct using all of them as NAND gates instead of AND & NOR gates.
If a logic chip is powered by 5, 9, 12 or 20 Volt, the threshold internally is divided by 50%, so it will respond to anything above 50%. regardless the shape of the wave/pulse, if properly offset-ted or some diode if it's bi-polar. off course the timing will be later on a sine wave vs a regular pulse.
FINALLY!!!! A well spoken English video with a great explanation.
Dont stop
I’m from the future. I’m here to tell you oh boy did he not stop
@Gus Erland If you put your mind, and listen carefully, you'll easily understand the message he's passing across...
@Gus Erland Sure...You are right
Fr tho I'm tired of seeing indians with unintelligible english. No offense.
Not like the other videos weren't speaking english but this guy is different
For anyone wondering about the drawing: The mistake lies in the connections of the Q outputs to the AND gates. Q must connect to the upper AND gate with the J input, while !Q must connect to the lower one with the K input. Now it works as it should: J performs the Reset function, K performs the Set function, and J+K at the same time performs either the Set or the Reset function, depending on which state the Q outputs have been before, a.k.a. it performs the "Toggle" function.
Thanks for sharing
Jesus Christ and I was going crazy to find what I did wrong. Thanks for sharing.
@@tielessin- ditto
This is ridiculous, thank you so much. I was losing my mind trying to figure out how the hell the logic worked with his drawing. Glad to know it's just wrong and he didn't do anything to fix it...
The drawing is correct Q goes to K, !Q goes to J in terms J is "Set", K is "Reset", which is default I suppose. If both J and K are 0, Q doesn't change. If J is 0 (K = 1) => Q goes 0 (or !Q goes 1), J = 1 (K = 0) => Q goes 1 (!Q goes 0). J = K = 1 => toggle Q. Therefore J sets Q to 1, K (re)sets Q to 0.
The JK flip flop was named after Jack Kilby, the Texas Instruments engineer who invented the integrated circuit in 1958
I was told that it stands for *j*ump and *k*ill
Hes Just Kidding
Both right.
Even my prof in the digital systems lecture (very wise guy) said jump and kill flip flop. But it is named after its inventor.
Thanks for the info.
None of you are right. It's named after how it's described on the patent. The two pins are labelled j and k on the patent.
This guy probably makes some wicked devices in Minecraft with redstone.
:)
Is there transistor in minecraft ?
@@54alexq Kind of? You can make stuff that does all the basic things of a transistor in minecraft but its not in it by itself
@@Mechanist a comparator maybe ? I don't rember exactly, played a long time ago ^^'
@@54alexq yes, just use a piston
I love these videos. They take me back to the sixties at the start of my career. As already stated and I agree - The inputs are labeled J and K in honor of the inventor of the device, Jack Kilby
Sir you're the best teacher humanity could ever have, illustrating this subject, on which ever level, be it high school, university or even post grade.
These series of tutorials should be carved into a stone be passed on to learners for millennia
This guy is the only reason I am passing my Digital Logic class
Your Latch series is the best explanation I´ve heard so far. Glad to find you out.
Your service is greatly appreciated. A university-level engineering course, tuition free. Thanks for sharing.
Ben Eater , you are my teacher, and I am a very serious student of yours! I don't have a single competent engineering teacher in my school, even though I go to one of the top highschools in America (I'm not saying which because I don't want this comment on my teachers to be tracked to me personally). I used to take an engineering course, but realized this piece of information for myself and from older students, and dropped the course later. I then discovered you, and now I learn by myself. So that's why I say you are my teacher, because I'm not using you to supplement another teacher or anything; everything I know about circuits is the very basics from Khan academy, and all the very advanced logic and circuits you do. I watched every single video you created and took notes, and create my own circuits, following along to your videos; I'm not joking when I say that I'm a student of yours. I plan to make a big project for school in the school expo making a breadboard computer like yours (with some of my own modification and additions). Without you, I would be nowhere, and know nothing about circuits, and you allowed me to make a big step in my dream of understanding how desktop computers work on a deep level. Your explanations are amazing, and you are a very talented teacher and explainer, very easily sympathizing with the a student's situation of not knowing anything, unlike many others. Your explanations are thorough, and very ordered in the final goal of understanding, taking nothing for granted through your deep understanding, which is probably one of the top things I love about your teaching; you understand and explain things on such a deep level. Not to mention, your a native speaker and aren't annoying or hard to listen to like many other youtubers with Indian accents. I think I speak on behalf of quite a few people in begging you to please continue making videos, and that we appreciate your videos so much, and at least know that you have truly inspired and dramatically changed the understanding of circuits for many people like me, and I'm not trying to be sentimental or anything, I seriously mean it. I really want to be an engineer in this direction. Ben Eater, from the bottom of my heart, thank you for these videos!
good to see you back, man, I love your videos, keep up the good work
+1like
God dammit I was so close to the 69th like
You explain this better than any instructor in my current institution that costs 70k a year. Thank you.
I have discovered that watching to many of these videos in a row makes my head numb and I can no longer figure out what is happening in the circuit. So it, that I have decided that I can only watch onnne ia eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee ah, this is what happens when you fall asleep for a few seconds while typing. Thanks Fentynal!
THIS IS EXACTLY WHAT I NEEDED AND WHAT MY LECTURER TODAY WAS UNABLE TO EXPLAIN - Thank god for this little series you have done it has helped me so much
I believe there is an error in the layout of this circuit. It seems that when using nor gates you don't want to go from the opposite side nor gate back to the and gates. If you were using nand gates rather than nor gates your diagram would be correct. Since you are in fact using nor gates, you would go back from the same side nor gate to the and gates. Can someone else please confirm this?
I was thinking about it for 30 minutes and searching information and then noticed the error.
Same here man :D
He must have confused it with NAND gate logic for JK flip-flop.
Thanks man! I was wondering for 15 minutes why the state {J = 1, K = 1, CLK = rise} toggle instead of staying in the last state. I knew that it must toggle, but I couldn't understand why. Finally I decided to check in the comments if could be some mistake in the drawing
@@shorky_0 check next video, he has corrected the circuit diagram
Who downvoted this video? Great videos. The joy of building this stuff has added quality and satisfaction to my life. Thank you Ben!
They downvoted the video because the circuit diagram is wrong. Not that the rest of his videos aren't amazing (they are) it's just that this one is a little flawed.
A famous experiment for JK FF is to set both the J and K high and then connect the CLK to an active high MOM switch, this will toggle the output between HI and LO... The mechanical switch may produce noisy output so the filtering RC circuit is a must.
Yayy Ben!! All the nerds of RUclips smile today with glee! Thanks for the video!! can't say how excited I am to see more of your awesome content!
That reminds me of the "Electronic Coin-Toss" we made as our first electronics project in 8th grade.... I think it was just both R and S effectively being high, and a push button for the Enable -- then it'd light up either Heads or Tails as the Q and Q-bar. I don't _actually_ remember the circuit, but it looked very similar.
seriously, your video saved my whole semester.. thanks a lot
I believe this one is faulty.
You have to either switch places on both Q & Q' and J&K for this to work
OR
You have to keep them like that but have the and gates switch their outputs (or gates). And gate on top goes to the or gate on the bottom etc.
Yay you're back! Thank you for the awesome video :)
welcome back :) good to see you again.. can't wait to build the control unit with you!
I greatly appreciate you efforts in term,s of time and resources to create these wonderful videos. I will be taking a Logic class in the fall , and I wanted to experiment with the fundamentals of digital circuit design. I am using CMOS, but I believe I need to get some TTL chips. These tutorials are top notch on several levels.
I was fascinated by this circuit back in the day! I thought of this circuit as a means to 'transcend' logic (in logic circuits.) I used it as a random number generator and did many projects needing 'random' logic.
Sweet you are back, make more please.
You're back! Nice :D. Great stuff as always
The “Just Kidding” flip flop
Hey Ben! The JK in JK Flip-Flop is actually NOT an arbitrary set of letters, it's after the creator Jack Kilby! :) Thanks so much for the vid!
So happy to see you back Ben!
Wonderful to see you posting again, great video Ben!
I don't usually comment on videos, but your videos are awesome.Thanks !!!
Thank you very much
I've seen lots and lots of videos explaining this, I guess your diagrams really help
I learned about logic gates, flip-flops, latches, when I was in 1st-year university, 12 years ago, but the professor did not provide the electronic behind it and how it actually works in the circuit board. I was ultimately confused when I was taught the inner schematic of flip-flop consisting of logic gates and a feedback line. I thought it didn't make any sense at all.
I was studying computer science, by the way. So logic gates, flip-flop, and stuffs were only a part of introductory courses in my major, without actual physical implementation. We only used a computer-based simulator software (Multisim) to create a schematic of a logic circuit. On the other hand, I studied some basic electronics during my high school and was introduced with electronic components including resistor, transistor, capacitor, and so on. But it was really difficult for me to connect between electronics, digital logic circuits, and eventually a computer, and I realized for a very long time that there is a missing link that wasn't really taught by my professor at the university.
But you explained it in a very clear and concise manner, with an actual demonstration, and finally, I understand how the feedback line in a flip-flop works, and its relationship with how a transistor works in an electronic circuit, and even I can finally connect all the dots from the electronic circuit primitives into a real computer.
Thank you very much for all your videos. You said you didn't have a degree but you explained this topic way better than my professor did. You proved that there is something that is really wrong with the education system as you mentioned that your ultimate goal is to improve it. I hope you will achieve your goal, and perhaps you will actually introduce students properly about how basic digital system works. :)
Well I'm taking a class like that right now as a computer scientist, and we still are shown any of it. I guess we are shown diagrams, but not how the signal actually goes through all the parts, most likely since we go through many diagrams in one hour long lecture, so not enough time is given to go more in depth. Crazy how not much changes after a decade and a half in a fast changing field of study though.
Ben is ALIVE AGAIN!!
For the output of the invalid state, just write it as "Random State". I think that would more accurately convey the true nature of the flip-flop's behavior.
Thanks!
Best explanation I have ever watched! Very good work!
at 7:26, why would that reset Q? the lower AND gate would give out a 1, and given the Q at that time is still 1 the result of that NOR gate would be a 0, meaning that Q remains 1...
Glad you're back! I love these videos! I bought a bunch of discreet electronics parts to build this computer.
thank you for a new video, i've been waiting for quite some time. Building 8bit computer. Because of your enthusiasm and great teaching.
Since I've started watching your videos I have bought more than 16 breadboards, hundreds of 74LS parts and an oscilloscope...
6:34 JK is tribute to the inventors initials, Jack Kilby.
Ben please more tutorials on networking security and analysis, im even willing to pay for, you are a genius.
Thank you for following up! Some of us were paranoid about the break in vids, given the value of what you do. This stuff is turning me into a programmer. I know a wealth of languages, without knowing what I'm actually doing, which makes me so much worse. "What is a variable really?", "How does a function do?". This is absolutely invaluable. Thank you so much for what you're doing. :)
Ben, without having even watched the new video - soo good to have back man!
Ben, after having watched it - thanks for another great explanation. Awesome as always. Hope this is preparatory for the 8-bit computer; I'm guessing for a ring counter?
You have wrong at this time🤭 but you are the guy who responsible i completely understand the deference between SR, D, Flip flop, and JK flip flop. 👍. Well done ♥️
Ben, I beleive there is an error! When explaining the final schematic, you say that K resets it when it outputs a one, but it seems as if the K output is going into the set input of the S and R latch, you can see that when you go back to the diagram of the S and R latch and see that the bottom input is the Set input. I feel like the K input should go to the top nor gate and that the J should go to the bottom nor gate
Ah i see that you correct it in your next video! Good catch! Thanks again for the videos!
Next video? Where are those? lol
eater.net/bbcpu8-program-counter/
Corey Hulse Yes and a JK Flip Flop is make with Gated SR Nand, not a Nor Latch and the Gated is a "No Gated". So you replace all his JK flip flop's gates by 4 Nand Gate. And you have your JK flip flop.
I was agonizing about this for the last 15minutes, glad to hear it's a mistake from Ben's side =D
Some say the JK-Flip-Flops where invented by Jack Kilby, but I think it's more like an homage to Jack Kilby that those inputs are called J and K, since Kilby was the inventor of integrated circuits (germanium based, which was invented in his freetime in September 1958) and also the inventor of the electronic calculator. The JK FlipFlop got patented in 1966 (May 18th) by Motorola Inc. (Norman J. Miller) and I think Kilby was only working for Texas Instruments and also as a private inventor/engineer.
Also often used terms are Jump and Kill. Miller did not mention the meaning of J and K, I just looked the patent sheet, he just wrote J and K there.
Ben, great video! Eagerly awaiting the continuation of your breadboard computer series.
Also, there's an urban legend floating around that the JK Flipflop was named after Jack Kilby! However, this isn't confirmed. The first time those letters started being used was in one of the early patents for the design, where the patent author chose those letters for some unimportant reason.
I always thought they meant "Just Kidding" :D
We need to share these videos and really get them out there to motivate Ben. They're fantastically well made and I think we can all agree that they are invaluable rescources for anyone interested in electronics and logic. Keep them coming!
Oh boy... I can't wait for rest of the computer tutorials!
Me too. But I guess he wants to explain the sequencer unit now, so he needs to explain binary counters first, and this in turn requires explaining the T flip-flops first (also known as "frequency dividers" or "count to two"), which are the building blocks of any binary counter. They can be made from the "universal flip-flops", the JK ones. (Well, interestingly, they can be made from D flip-flops as well, but let's allow Mr. BeNeater to explain the JK flip-flop as well, for completeness's sake ;) ).
I, for one, can't wait for the instruction decoder and the control unit, because those are usually the least-explained elements of the CPU in every course I've seen.
Sci Twi Ditto, microinstructions are explained but are never explained how they are implemented...
Xenthera I would also like to see the older way of doing it, with just plain old logic. It can be done easily if the instruction set is specially crafted for that (e.g. some bits in an instruction can select operations in the ALU, other bits can select registers, still other can select the direction of data flow etc.).
I actually built mine with just 2 input nand gates(74HC00) although I have only 4 instructions: LDA, ADD, SUB, HLT.
Don't forget to hit the bell icon to get notifications!
Ben's super great, and part of that is not shilling for views, likes, and subs. So let's shill on his behalf!
5:30 if both nor gates are manufactured exactly the same they will start flickering / resonating because both nor gates will turn off eachother so when you conect Power both nor gates will turn on then they will turn off eachother but then they realise that there arent getting any signal in then the cycle reapeats almost in mhz
So... in summary (having been through the set now) SR latch has two inputs, one to turn it on, one to turn it off. A D latch has one input to turn on or off but its state is ignored until the enable is on. A D flip flop is similar but the enable (clock) rising edge is converted to an "enable" pulse to make it only check the input state momentarily. A SR flop flop is similar to a SR latch, but the state of the inputs is ignored unless an "enable" is on (which is actually a pulse created from the rising edge of the clock). A JK flip flop is the same but with some extra connections to ensure the "both inputs on" state doesn't cause unknown behaviour and instead toggles the output in a predictable way. [Note, mainly just wrote this to summarise to myself]
Thanks for the tutorial, Ben! Helped a lot.
Aren't the feedbacks from the output of the J-K Flip-Flop connected the other way around?
Yes I belive they are. And you have to be really careful about your edge detector or the circuit will change state many times and become unpredictable.
very very thanks sir
you made my sequential circuit easy
Finally I understand what a flip flop does
7:00 I think resetting Q when it’s set by giving K =1 and J = 0 is confusing, or wrong.
On clock, K&Q = 1 => lower nor out is 0, I.e., ~Q is 0. Therefore Q is 1. Set Q by making K = 1 not reset Q.
Ah, the Q, ~Q or named wrongly in the picture.
They should be switched. Then the logic will work as you are describing.
You need to make the SR latch with NAND gates to work as you describe. Great videos explaining while doing the experiment at the same time
Error Correction Notice:
This video has an error regarding the JK Flip Flop which Ben has stated and fixed in his next video ruclips.net/video/st3mUEub99E/видео.html
The names J and K should be reversed in this video.
Also I believe as other comments have suggested, the feedback loops shouldn't be crossed. Meaning that feedback from Q should go back to the top AND gate and the feedback from Inverse Q should go back to the bottom AND gate.
excellent tutorial!
a great refresher from my college days thanks for sharing!
Great video Ben! The fact that the state is unknown when S and R = 1 is very interesting. Maybe it could be used for producing a chance operation. Like a random flip of the coin
sonodrome Unfortunately that wouldn't work. The state the flip flop ends up in depends on the length of the wire and the tolerances of the parts used. So it usually stays the same for every individual flip flop. There is no way you can make a 50/50 chance out of that.
Actually there is, and I once did exactly that. I used a very fast square wave generator (a 555 timer would suffice) to constantly set/reset an RS flip-flop and when the user pressed a button, it latched the flip-flop at the particular state it was currently in, displaying the result. Well, not exactly using the "forbidden" state, but it worked ;)
I think the result would depend on when the user presses the button relative to the current clock state. So it's not truly random, but for all intents and purposes it's unpredictable. You could call it a Pseudo Random State Generator :)
sonodrome With that definition, nothing is truly random. The result of a coin toss depends on the initial conditions (orientation of the coin in the tosser's hand, initial velocity, air flow etc.) and the laws of physics. If you could know all those little parameters and the configurations of all atoms on the coin's way, you could theoretically predict the outcome of a coin toss. But in practice it is impossible, so the result is random enough for all purposes.
"Anyone who considers arithmetical methods of producing random digits is, of course, in a state of sin." [1]
[1] Von Neumann, John (1951). "Various techniques used in connection with random digits”, National Bureau of Standards Applied Mathematics Series. 12: 36-38.
I think j stands for "jump" and k for "kill". Nice video though :D
That's what I've been told too
Could you talk about the control logic in the next videos?
It is the most complex and important part of the computer.. I wish he's gonna discuss it soon!
Geometry Dash Galluxi I didn't upload videos before lol.. they're just videos I have liked or maybe playlists I have collected together.
Anyways, thanks for the kind words :)
Also, I may upload videos in the future
Truth Seeker Oh lol, There was another guy with the same name, sorry lol.
thanks for explaining so clearly
Been waiting a long time for this one. :) Good to see you back!
Awesome! Thank you Ben! Hope you're having an awesome holiday season!
Lost me on the last bit, glad to see it got fixed.
A JK flip flop sounds like all the flip flop you'll ever need.
There is a mistake in the JK schematic diagram - the K works as reset and must be on top and J (set) in bottom. Just compare it with SR flip-flop diagram wich is the same except for the feedback lines from the Q/Q-not outputs.
The inputs are called J-K after Jack Kilby, who invented the integrated circuit in 1958. 😁
love your videos
It would be awesome if you made more videos like these where you explain different ICS
Just subscribed a few weeks ago. These are so great!!
Well explained. But there is a problem in the figure. The AND gate is K and feedback is from Q.
The bottom AND gate is J and feedback is from Q'
Thanks, i'm going to study these in school soon so i wanted to know them before they teach us them
Thanks for the simple explanation! 😄😄😄
awesome explanation
Thank you very much for the video Ben, it's excellent! Really helped me! The J-K is in honour of Jack Kilby ;)
I prefer wearing shoes...
JK! Flip-flops! xD
vxcvbzn nice
I was looking for this
I was looking for this too
Ben, you're amazing
Any idea why this video only uploaded at 480 resolution?
Yeah.. I made a backup for myself of all Ben's videos in 720p, and this one is an odd ball :p Only 360p for me.
I just realized that. Maybe it's because I don't use 4K paper
A guy I worked with used to teach electronics and when he got to the jk flip flop he called it by a very fitting name, the John Kerry flip flop.
3:15 It there not another current pulse in the falling edge as the capacitor discharges?
I thought about the same thing. He mentioned it in his video about D Flip Flop. But from the circuit he had built and tested in that video it is confirmed that the falling edge of the clock signal does not create another enable pulse. Although I still doubt why the falling edge doesn't create an enable pulse. I sent a comment on that video about this.
I think on the falling edge, the current is in reverse and since the circuit can't provide the current needed to discharge the capacitor, the capacitor gets this reverse current from ground and thus does not affect the circuit and does not create an enable pulse. I'm not completely sure about this. Can someone confirm?
man you explained to me something in 10 minutes, and my teacher couldn't do it in an 1hr
Mr Ben if Q is set, and that feedback to and gate connected to k input and then we give a clock pulse to turn on and gate but if nor gate will only turn on when both input are low, it's not possible to set Q compliment!
Make it correct please!
BEN IS ALIVE!!!! YAY!!!
It's great to see a new video from you! Isn't there an issue with this flip flop? Surely if J and K are both high then you get the toggle, that's fine. But wouldn't that toggling just keep looping back and forth until your clock 'enable' goes low, eventually settling into some unknown state? Are you just relying on that spike being short enough that you don't get this sort of feedback?
7:20 seems to be wrong. You say that an input of 1 to the lower NOR will be a "reset" and make Q equal to 0... BUT in your SR Latch video (ruclips.net/video/KM0DdEaY5sY/видео.html) at 9:48 you labeled the UPPER input as "reset" and at 10:05 in the latch vid did an input of "1" to the lower input and got a Q of "1." Also, when I worked it out myself that's what I got as well...
I'm pretty confused since I tried to replicate this circuit myself and work it out by hand, but all the outputs I'm getting amount to HOLD. Anyone getting this too? Am I doing something wrong?
welcome back dude
Thank you for great work, you are a very smart man.
From 7:00-7:41, you explained considering when Q is High, J=0, K=1. In this case, the output of And gate for K is High and Also since Q is High, we get Output of NOR gate is Low at K side. Since J is already low, NOR gate at J side will also become active and so remaining Q to HIGH. Ultimately this circuit has no change in the output even you set the clock. Can you please explain me as I am confused how to reset Q when it is set in a condition J=0, K=1. Thanks in advance!
Hope it would be correct using all of them as NAND gates instead of AND & NOR gates.
ure back have happy holidays
Great set of videos (content). Good shooting. Understandable English.
I have seen the JK stand for Jump and Kill
Perfect ! thank you for teaching this .. it was confusing me
finally! please post more tutorials
This was great! Tank you.
How sharp do the clock pulse edges have to be? Would it respond the same way if the clock signal were a sinewave as opposed to a squarewave?
electronics usually works with dc circuits which give a square pulse, not a wave.
If a logic chip is powered by 5, 9, 12 or 20 Volt, the threshold internally is divided by 50%, so it will respond to anything above 50%.
regardless the shape of the wave/pulse, if properly offset-ted or some diode if it's bi-polar. off course the timing will be later on a sine wave vs a regular pulse.