How does a flip-flop work? - unknown state

  • Thread starter Thread starter alexmath
  • Start date Start date
  • Tags Tags
    State Work
Click For Summary

Discussion Overview

The discussion revolves around the functioning of flip-flop circuits, particularly focusing on their behavior during initial power-up and the implications of unknown states. Participants explore the operation of logic gates within flip-flops and the importance of ensuring defined states in digital circuits.

Discussion Character

  • Technical explanation
  • Conceptual clarification
  • Debate/contested

Main Points Raised

  • One participant questions whether a logic gate can function with only one wire connected and expresses confusion about the circuit's behavior when in an unknown state.
  • Another participant explains that flip-flops can power up in either of two stable states, but their initial state is unpredictable until an input is pulsed.
  • A different participant highlights the risks of having unconnected inputs, which can lead to undefined output states due to floating voltages.
  • This participant also notes that while the output will eventually settle into a valid state, the initial state remains unknown without additional circuitry to enforce a known state on power-up.
  • One participant corrects another by stating that the diagram represents a latch rather than a flip-flop, emphasizing that flip-flops consist of multiple latches and that resetting the circuit is crucial to avoid unknown states.

Areas of Agreement / Disagreement

Participants express varying levels of understanding regarding the initial conditions of flip-flops and the implications of unknown states. There is no consensus on the best practices for ensuring defined states upon power-up, as some advocate for resetting while others discuss the inherent unpredictability of the circuit.

Contextual Notes

Participants mention the importance of additional circuitry, such as a reset mechanism, to manage the unknown state issue, but do not provide a unified approach to implementing this in practice. The discussion also touches on the potential consequences of undefined states in critical applications.

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: 965
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

  • · Replies 3 ·
Replies
3
Views
2K
Replies
20
Views
4K
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
1
Views
4K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
13K