This is a guide for making Flip Flops and Latches using NAND gates.
When I was studying about Flip Flops and Latches in my class, all I wondered was how in the world we can store a bit by interconnecting 4 NAND gates. So I decided to make Flip Flops on my own and verify.
- IC - 7400 (Quad 2-input NAND Gates)
- 4-5 LEDs
- Breadboard
- 5V power supply
These are all the things needed to make FFs.
IC-7400 is used in each circuit for NAND gates.
This is a Active LOW SR Latch, output is HIGH (SET) when S is LOW while output is LOW (reset) when R is LOW. Another type is Active HIGH SR Latch build using NOR Gate.
Here Active Low SR Latch is demonstated.
- Using IC-7400 connect the above shown circuit on a breadboard and supply 5V VCC to IC.
- Initially set S and R to 1, i.e. HIGH.
This is how my circuit was looking. I was using Arduino for 5V power supply. Don't forget to add resistor before an LED to prevent from over voltage.
- Now verify the truth table for the Latch.
- Active Low Latch changes output, i.e. SET or RESET only when S or R is LOW respectively.
So it is clear that a Latch stores a bit after it is SET or RESET even after the the input is changed. 🤘
Raw Video of Latch demo :
CLK or CK is CLOCK
This is a SR Flip Flop, output is HIGH (SET) when S and CLK is HIGH while output is LOW (reset) when R and CLK is HIGH. SR FF is clock synchronized SR Latch and has several advantage over SR Latch.
Due to unavailability of function generator and my laziness of making a square wave generator, I made a SR Gated Latch, which is nothing but a SR FF with ENABLE instead of CLK. You can make a square wave generator and use it as a clock.
EN or E is ENABLE
Here Gated SR Latch is demonstated.
- Using IC-7400 connect the above shown circuit on a breadboard and supply 5V VCC to IC.
- Initially set S, R and EN to 0, i.e. LOW.
This is how my circuit was looking. I was using Arduino for 5V power supply. Don't forget to add resistor before an LED to prevent from over voltage.
- Now verify the truth table for the Flip Flop.
- Flip Flop changed ouput when EN is HIGH and S or R is HIGH.
So it is clear that a Flip Flop stores a bit after it is SET or RESET even after the the input is changed. And a Flip FLop changes its value only when EN or CLK is HIGH. 👍
Raw Video of Flip Flop demo :
You can similarly make JK, D and T Flip Flops. Further the same concept can be applied to make counters and registers.