How does a flip-flop work? - unknown state

In summary, a flip flop circuit will power up in one of two states, and when you don't reset the circuit before using it, you might end up with an unknown output.
  • #1
alexmath
35
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: 833
Physics news on Phys.org
  • #2
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.
 
  • #3
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:
  • #4
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.
 
  • #5


A flip-flop is a type of digital circuit that is commonly used in computer memory and other electronic devices. It is essentially a bi-stable circuit, meaning that it has two stable states: 0 and 1. The circuit maintains its current state until it receives a signal to change it.

The basic operation of a flip-flop involves two inputs: a "set" input and a "reset" input. When the set input is activated, the flip-flop changes its state to 1. When the reset input is activated, the flip-flop changes its state to 0. These inputs are typically controlled by external buttons or switches.

Now, let's address the issue of the unknown state. When a flip-flop is first powered on, it is in an unknown state. This means that it could be in either the 0 or 1 state, and there is no way to predict which one it will be in. This is due to the fact that the circuit is made up of electronic components, such as transistors, that have inherent variability in their behavior.

In order for a flip-flop to function properly, it needs to be initialized to a known state. This is typically done by using additional logic gates to control the set and reset inputs. For example, a simple flip-flop circuit might use an AND gate to control the set input and an OR gate to control the reset input. This ensures that the flip-flop is always in a known state when it is first powered on.

In summary, the operation of a flip-flop involves controlling the set and reset inputs to change its state, and it needs to be initialized to a known state in order to function properly. I hope this helps clarify the working of a flip-flop circuit for you.
 

1. How does a flip-flop store information in an unknown state?

A flip-flop is a type of electronic circuit that has two stable states, either a logic 0 or a logic 1. However, when it is first powered on or when it experiences a brief voltage disturbance, it can enter an unknown state. This unknown state is typically represented by an "X" or "Z" and it means that the flip-flop's output is indeterminate.

2. What causes a flip-flop to enter an unknown state?

An unknown state can occur due to a variety of reasons, including power-up conditions, noise or glitches on the input signals, and timing violations. It can also happen if the flip-flop is not properly reset or if it is not designed to handle certain input combinations.

3. How does a flip-flop recover from an unknown state?

In most cases, a flip-flop will recover from an unknown state on its own when the input signals stabilize. However, if the unknown state persists, the flip-flop may need to be reset or a specific input combination needs to be applied to force it back to a known state.

4. Can an unknown state be prevented in a flip-flop?

Yes, there are techniques that can be used to prevent a flip-flop from entering an unknown state. These include properly designing the circuit to handle all possible input combinations, using synchronous reset signals, and implementing proper timing constraints.

5. What are the implications of an unknown state in a flip-flop?

An unknown state can have serious implications in a circuit, as it can lead to incorrect outputs and potentially cause malfunctions in the system. It is important for designers to consider the possibility of unknown states and implement measures to prevent or recover from them in order to ensure the reliability and functionality of the circuit.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
20
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
34
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
18
Views
2K
Back
Top