Digital Circuits
Flip-Flop Circuits
26 questions By Tony R. Kuphaldt
-
Question 1 of 26
Don’t just sit there! Build something!! Learning to analyze digital circuits requires much study and practice. Typically, students practice by working through lots of sample problems and checking their answers against those provided by the textbook or the instructor. While this is good, there is a much better way.
You will learn much more by actually building and analyzing real circuits, letting your test equipment provide the “answers” instead of a book or another person. For successful circuit-building exercises, follow these steps:
- Draw the schematic diagram for the digital circuit to be analyzed.
- Carefully build this circuit on a breadboard or other convenient medium.
- Check the accuracy of the circuit’s construction, following each wire to each connection point, and verifying these elements one-by-one on the diagram.
- Analyze the circuit, determining all output logic states for given input conditions.
- Carefully measure those logic states, to verify the accuracy of your analysis.
- If there are any errors, carefully check your circuit’s construction against the diagram, then carefully re-analyze the circuit and re-measure.
Always be sure that the power supply voltage levels are within specification for the logic circuits you plan to use. If TTL, the power supply must be a 5-volt regulated supply, adjusted to a value as close to 5.0 volts DC as possible.
One way you can save time and reduce the possibility of error is to begin with a very simple circuit and incrementally add components to increase its complexity after each analysis, rather than building a whole new circuit for each practice problem. Another time-saving technique is to re-use the same components in a variety of different circuit configurations. This way, you won’t have to measure any component’s value more than once.
Reveal answerLet the electrons themselves give you the answers to your own “practice problems”!
Notes:It has been my experience that students require much practice with circuit analysis to become proficient. To this end, instructors usually provide their students with lots of practice problems to work through, and provide answers for students to check their work against. While this approach makes students proficient in circuit theory, it fails to fully educate them.
Students don’t just need mathematical practice. They also need real, hands-on practice building circuits and using test equipment. So, I suggest the following alternative approach: students should build their own “practice problems” with real components, and try to predict the various logic states. This way, the digital theory “comes alive,” and students gain practical proficiency they wouldn’t gain merely by solving Boolean equations or simplifying Karnaugh maps.
Another reason for following this method of practice is to teach students scientific method: the process of testing a hypothesis (in this case, logic state predictions) by performing a real experiment. Students will also develop real troubleshooting skills as they occasionally make circuit construction errors.
Spend a few moments of time with your class to review some of the “rules” for building circuits before they begin. Discuss these issues with your students in the same Socratic manner you would normally discuss the worksheet questions, rather than simply telling them what they should and should not do. I never cease to be amazed at how poorly students grasp instructions when presented in a typical lecture (instructor monologue) format!
I highly recommend CMOS logic circuitry for at-home experiments, where students may not have access to a 5-volt regulated power supply. Modern CMOS circuitry is far more rugged with regard to static discharge than the first CMOS circuits, so fears of students harming these devices by not having a “proper” laboratory set up at home are largely unfounded.
A note to those instructors who may complain about the “wasted” time required to have students build real circuits instead of just mathematically analyzing theoretical circuits:
What is the purpose of students taking your course?
If your students will be working with real circuits, then they should learn on real circuits whenever possible. If your goal is to educate theoretical physicists, then stick with abstract analysis, by all means! But most of us plan for our students to do something in the real world with the education we give them. The “wasted” time spent building real circuits will pay huge dividends when it comes time for them to apply their knowledge to practical problems.
Furthermore, having students build their own practice problems teaches them how to perform primary research, thus empowering them to continue their electrical/electronics education autonomously.
In most sciences, realistic experiments are much more difficult and expensive to set up than electrical circuits. Nuclear physics, biology, geology, and chemistry professors would just love to be able to have their students apply advanced mathematics to real experiments posing no safety hazard and costing less than a textbook. They can’t, but you can. Exploit the convenience inherent to your science, and get those students of yours practicing their math on lots of real circuits!
-
Question 2 of 26
A common topology for DC-AC power converter circuits uses a pair of transistors to switch DC current through the center-tapped winding of a step-up transformer, like this:

In order for this form of circuit to function properly, the transistor “firing” signals must be precisely synchronized to ensure the two are never turned on simultaneously. The following schematic diagram shows a circuit to generate the necessary signals:

Explain how this circuit works, and identify the locations of the frequency control and pulse duty-cycle control potentiometers.
Reveal answerA timing diagram is worth a thousand words:

- Vref = DC reference voltage set by duty cycle potentiometer
- Vcap = Voltage measured at top terminal of the 555’s capacitor
- Vcomp = Comparator output voltage
- V555(out) = 555 timer output voltage
- Q = Noninverted output of J-K flip-flop
- [Q] = Inverted output of J-K flip-flop

Follow-up question: which direction would you have to move the frequency potentiometer to increase the output frequency of this circuit? Which direction would you have to move the duty cycle potentiometer to increase that as well?
Challenge question: suppose you were prototyping this circuit without the benefit of an oscilloscope. How could you test the circuit to ensure the final output pulses to the transistors are never simultaneously in the “high” logic state? Assume you had a parts assortment complete with light-emitting diodes and other passive components.
Notes:This question is an exercise in schematic diagram and timing diagram interpretation. By the way, I have built and tested this circuit and I can say it works very well.
-
Question 3 of 26
A common type of rotary encoder is one built to produce a quadrature output:

The two LED/phototransistor pairs are arranged in such a way that their pulse outputs are always 90o out of phase with each other. Quadrature output encoders are useful because they allow us to determine direction of motion as well as incremental position.
Building a quadrature direction detector circuit is easy, if you use a D-type flip-flop:

Analyze this circuit, and explain how it works.
Reveal answerThe operation of this circuit is quite easy to understand if you draw a pulse diagram for it and analyze the flip-flop’s output over time. When the encoder disk spins clockwise, the Q output goes high; when counterclockwise, the Q goes low.
Follow-up question: comment on the notation used for this circuit’s output. What does the label “CW/[CCW]” tell you, without having to analyze the circuit at all?
Notes:Quadrature direction-detection circuits such as this become important when encoders are linked to digital counter circuits. The complemented notation is also very common in counter circuits.
Students may show a reluctance to draw a timing diagram when they approach this problem, even when they realize the utility of such a diagram. Instead, many will try to figure the circuit out just by looking at it. Note the emphasis on the word “try.” This circuit is much more difficult to figure out without a timing diagram! Withhold your explanation of this circuit until each student shows you a timing diagram for it. Emphasize the fact that this step, although it consumes a bit of time, is actually a time-saver in the end.





