# Given that you can set the output of a flip flop the way you want regardless its prior state, why it is considered a sequential device?

The literature states that a SR flip flop is a sequential device and that sequential devices are those whose output depends on its current inputs and prior state. However, that doesn't make sense to me: flip flops are the basic building blocks of some memories and I wonder how useful a memory can be if its next state depends on its prior state. That would be a very bizarre kind of storage! You have to have the ability to write anything you need to and, in fact, that is exactly what a flip flop allows you to do. So, my question is: am I missing something (conceptually speaking) or in fact a flip flop does not comply with the definition of sequential logic? Thank you very much in advance!

• Virtually all functional devices are initialized to a known state on power up (or stay electrically alive to maintain a known state. For memory, being able to set or reset a specific bit is what it is all about. What are you not understanding? – R Drast Mar 2 '17 at 13:20
• i actually understood your question.it is an interesting one. i will take some time when i get home to research and answer. i also recommend adding more relevant tags to the question. – yoyo_fun Mar 2 '17 at 13:28
• First, sorry if my question sounded a bit confusing, English is not my first language!! The way a sequential device is defined ("unlike combinational devices, sequential devices are those whose current output depends on the current inputs and prior state") doesn't seem to properly describe a flip flop because its output is uniquely defined by its current inputs. So, I ask why on Earth flip flops are considered sequential once they doen't meet the definition. – Humberto Fioravante Ferro Mar 2 '17 at 13:29
• "... its output is uniquely defined by its current inputs." No! See my answer below. – Dave Tweed Mar 2 '17 at 13:35

The output of a FF depends on not only the present values of its inputs, but also on the previous values of those inputs. This is the definition of a sequential circuit.

In other words, there are combinations of input values for which the output can be in either of two states — which one is determined by the past history of the input values. Internal feedback gives the circuit "memory".

• Hum, I think I've got what I missed so far: indeed you can write anything you want to the Q output by properly setting the S or R inputs, regardless the prior state. HOWEVER, once you did that, the FF will store the value you wrote even if you unassert the inputs; i.e., it will "remember" what was wrote and that's why it is sequential (and not combinational). Is that the idea? – Humberto Fioravante Ferro Mar 2 '17 at 13:47
• Yes, exactly right. – Dave Tweed Mar 2 '17 at 13:48

What is the current output state of this FlipFlop?

   _______
0-|S     Q|-?
0-|R      |
|_______|


It depends on the previous state!

• Christian, that case woundn't be the one in which the output is “undefined” since the output it is inconsistent (both Set and Reset inputs asserted)? – Humberto Fioravante Ferro Mar 2 '17 at 13:39
• No, he's showing them as both negated. – Dave Tweed Mar 2 '17 at 13:40