How does a flip-flop work? - unknown state

  • Thread starter Thread starter alexmath
  • Start date Start date
  • Tags Tags
    State Work
AI Thread Summary
A flip-flop circuit can enter an unknown state upon initial power-up, as it may not reliably settle into a defined output without a reset mechanism. When a button is pressed while in this state, the output could oscillate or float between logic levels, leading to undefined behavior. It is crucial to ensure that all inputs are connected properly to avoid floating voltages that can cause unpredictable outputs. Best practices involve incorporating a reset input to establish a known state at startup, preventing potential hazards in critical applications. Understanding these principles is essential for designing reliable digital circuits.
alexmath
Messages
35
Reaction score
0
I'm having trouble understanding how a simple flip flop circuit works. Firstly - can a logic gate work only connected with one wire?
I don't actually understand what happen's when you press a button inside the circuit when the circuit is in the unknown state. When the circuit is in a stable position, all is clear, but when we wire up the wires and we set it for the first time then it does not makes sense... I want to know what's happening with the flip flop in the picture below. Sorry for my poor english grammar. Thank you!
 

Attachments

  • Capture.PNG
    Capture.PNG
    22.9 KB · Views: 914
Physics news on Phys.org
The logic gates are connected through several wires.
Aside from the input and outputs that are shown, each one also has a power line and ground.

When the flip flop devices shown are first powered up, two possible stable states are possible. Either the Nand gate can be "on" or the And gate is on. in practice, any given flip flop will almost always power up in the same state every time. But when you design a circuit that uses a flip flop, you cannot depend on its state until you pulse one of its two inputs.
 
I don't actually understand what happen's when you press a button inside the circuit when the circuit is in the unknown state.

The image you posted shows three circuits that illustrate two slightly different problems...

In the top circuit one input is not connected. That should never be done because the voltage on that input might float to any level. It might float to a voltage that is not a valid logic 1 or 0. In which case the output is said to be undefined. It could be a 1, 0, some value in between or even oscillate . You would have to look at the circuit inside the gate and treat it as an analogue device to know what the output would do. A bit of noise somewhere in the circuit might make it impossible to know for sure.

The other circuits illustrate a slightly different problem. Some time after the power rails are within spec the output of the flip flop will be found to be in one of two states. Which state it will be is undefined. However if you wait long enough it will eventually settle on a valid logic level even if you don't know which logic level that will be.

It's good practice to add another input to latches and flip flops to force the output to a known state on power up. This is usually connected to a signal called "Reset" or "Power ON Reset" which can be generated using an RC circuit like this...

http://www.renesas.com/media/support/faqs/faq_results/Q1000000-Q9999999/por1.gif

If you don't do this then you have to check that the output every latch or flip flop doesn't matter after a power failure. You wouldn't want something like a saw mill to start up on it's own after a brief power cut!

See also..

http://en.wikipedia.org/wiki/Power-on_reset
 
Last edited by a moderator:
the diagram you included represents a latch, not a flip flop. a flip flop is comprised of multiple latches. In the latch, typically one input is referred to as the reset line, and one is the set line. when using digital circuitry you ALLWAYS reset the circuit before using it. this gets rid of the unknown state problem.
 

Similar threads

Back
Top