Question

i hope someone could help me with this. I can't get the point of the utility of flip-flops, the point of saving the state. If we want to save the previous state, why don't we simple maintain the inputs as they are. In general why is not this way : input=output using to not gates for example. Or are flip-flops used in memory storage because of the fact that after giving the output, the inputs can be put to zero and use them for other purpose and still maintain the output?

Was it helpful?

Solution

The utility of flip flop is to store state and make it stable.

For your statement about making "input = output", you have to understand that every change in the input line is not necessarily the input for the flip flop. And another thing is that output can be some operation of previous output and present input then you need previous output which you should store in somewhere, for which flip flop is used (and register is a group of flip flops).

In flip flop, we use clock to synchronize the operation. Depending upon the types of flip flop i.e. edge-trigger or level-trigger, the input in the flip flop affects its output. For example: for level-trigger flip flop, the input in the flip flop affects its output only when the clock is high.
So, for your question that "inputs can be put to zeros to maintain the outputs", you are right that it helps to maintain the outputs but that is not only the case to maintain the outputs. When the clock is low, change in inputs does not affect the output.

OTHER TIPS

Flip Flops are used to store 1 bit of information. They are commonly used in the registers that store values to be operated on (32/64 bit values). Flip flops usually have an enable. When the enable is turned off, the flip flop maintains state (i.e. stores the 1 bit of information). When the enable is turned on, then on the next clock edge (positive or negative), the flip flop's output will change, based on what type of flip flop it is, and what the inputs are.

For example, in a T (toggle) Flip flop, the output state is flipped (1 to 0 or 0 to 1) whenever T = 1 and Enable = 1. So, as long as Enable =0, whatever the value of T is, the output will not change, and the flip flop will continue to maintain the same state. When enable is changed to 1, and if T = 1, then at the next clock edge, the flip flop will change state (1 to 0 or o to 1).

A more practical example involving registers. Lets say we have a 32-bit register. Each flip flop stores 1 bit, so we have 32 flip flops. When a 32-bit value is loaded into the register, the flip flop enables are turned on, and the flip flop states are set according to the input. And then the enables will be turned off, and the flip flops will maintain state until the register is loaded with some other value.

This is the correct answer (quoting from the question):

... because of the fact that after giving the output, the inputs can be put to zeros and still maintain the output

More to the point, FFs that are more complex than the basic SR FF you encounter in the first class on FFs have an enable input that tells the FF when the data inputs should be looked at, so that if either input changes to one when the enable is off, the output remains unchanged.

This makes it possible to retain values in the output regardless of the value of the input.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top