A latch or flip-flop is a circuit that has two stable states and can be used to store state information. However latch is normally used to describe a simple storage device while flip-flop is normally reserved for clocked devices.
Questions tagged [latch]
414 questions
67
votes
9 answers
Difference between latch and flip-flop?
What is the difference between a latch and a flip-flop?
What I am thinking is that a latch is equivalent to a flip-flop since it is used to store bits and is also equivalent to a register which is also used to store data. But after reading some…

ATR
- 1,213
- 2
- 11
- 9
30
votes
5 answers
Why are inferred latches bad?
My compiler complains about inferred latches in my combinatorial loops (always @(*), in Verilog). I was also told that inferred latches should preferably be avoided.
What exactly is wrong with inferred latches? They certainly make combinatorial…

Randomblue
- 10,953
- 29
- 105
- 178
29
votes
6 answers
What is a flip flop?
There seem to be a number of different definitions of flip-flops and latches out there, some of which are contradictory.
The Computer Science text book for the course I teach is probably the most confusing (in fact I have little faith in the book…

Drummy
- 539
- 1
- 7
- 11
20
votes
5 answers
Why do we clock Flip Flops?
I am trying to understand Flip Flops & Latches. I am reading from Digital Logic book by Morris Mano. One thing I am not able to understand is why we clock flip-flops?
I understand why we need 'enabled' or gated latches. But what’s the use of clock?…

avi
- 605
- 2
- 8
- 13
13
votes
6 answers
How does an SR Latch get started
Noob question, but I'm not seeing how an SR latch such as the one in the image can "get started". If each input depends on the output from the other, how can there be two inputs to each gate to set the thing in motion?
In a rudimentary circuit…

Robin Andrews
- 251
- 2
- 8
10
votes
2 answers
SR Latch (Flip Flop) beginning Inputs?
Ok this is probably a basic question, but I understand how SR latches work except one thing.
In the R input and S input you can make them 0 or 1.....but what about the input lines next to them (That rely on the output of the R or gate or S or…
user3073
10
votes
1 answer
JK latch, possible Ben Eater error?
Is it possible that the schematic shown here is wrong?
I would expect something more like that...
It seems like that he inverted the feedback wires, but I'm quite suspicious because he made the circuit and it works, I'm a bit confused.
EDIT: as…

Paa
- 125
- 8
10
votes
5 answers
What is the difference between registers, flip flops and latches?
I want the answer to the very basic level. I know what they mean individually, but what I am looking for is connection between them.

SIK
- 165
- 2
- 2
- 8
9
votes
3 answers
Why do all transistor latch circuits (that ive seen) use two transistors?
I am looking at building a transistor latch to control a relay. I don't like soldering, so a few components as possible, especially those pesky transistors.
I am looking around at various transistor latches online, and seeing things very similar to…

64bit_twitchyliquid
- 281
- 1
- 3
- 11
8
votes
6 answers
Can someone explain the following flip-flop circuit?
I'm having trouble understand what's going on in this circuit. The question asks "what is the value of Q if \$\bar{R} = 1\$ and \$\bar{S} = 0\$" (as shown).
In this case, how can I determine what Q looks like? I realize that this question may…

Bob John
- 237
- 2
- 5
- 11
8
votes
3 answers
What is wrong with my D flip-flop toggle switch?
Until a few weeks ago, I had never drawn a circuit diagram in my life, so bear with me. I am currently trying to design (in Logisim) a circuit that acts like a toggle switch, using only basic logic gates and no clock. Basically, I want the LED…

norman
- 307
- 1
- 3
- 8
6
votes
1 answer
Resettable mechanical switch?
I'm looking for a mechanical on/off rocker or toggle switch that can be reset to a default state and position upon the removal of power.
The application is in a vehicle where I want the switch to return to a default position once the ignition is…

danpat
- 61
- 1
- 3
6
votes
1 answer
Model a set-reset relay in SPICE
I am designing a circuit with a magnetic latching set-reset relay, and I would like to test the design in ngspice (open-source spice). I have downloaded the documentation but I see nothing about relays, so I wonder: how can I model this device?
I…

Severo Raz
- 435
- 1
- 4
- 13
6
votes
2 answers
Do the logic gate inputs of 74HCXX integrated circuits exhibit a high impedance?
Do the inputs of the 74HC374-SMD D-type flip flop have high impedance inputs? In datasheet is stated that it has buffered inputs, I assume that means high impedance, right?
In other words, do I have to put resistors in the input pins?

Chris
- 554
- 6
- 13
6
votes
2 answers
Turn an LED off and on with the same push button
How can I have an LED turn on when a push button is pressed, turn off when the button is pressed again, and keep its state unchanged when the button is not pressed?
I don't want the LED to oscillate if the button is held down for a while, and I want…

skyler
- 10,136
- 27
- 80
- 130