Professional Documents
Culture Documents
org/wiki/Flip-flop_(electronics)
Flip-flop (electronics)
From Wikipedia, the free encyclopedia
Jump to: navigation, search
Contents
[hide]
• 1 History
• 2 Implementation
• 3 Flip-flop types
○ 3.1 Simple set-reset latches
3.1.1 SR NOR latch
3.1.2 SR NAND latch
3.1.3 JK latch
○ 3.2 Gated latches and conditional transparency
3.2.1 Gated SR latch
3.2.2 Gated D latch
3.2.3 Earle latch
○ 3.3 D flip-flop
3.3.1 Classical positive-edge-triggered D flip-flop
3.3.2 Master–slave pulse-triggered D flip-flop
3.3.3 Edge-triggered dynamic D flip-flop
○ 3.4 T flip-flop
○ 3.5 JK flip-flop
• 4 Metastability
• 5 Timing considerations
○ 5.1 Setup and hold times
○ 5.2 Propagation delay
• 6 Generalizations
• 7 See also
• 8 References
[edit] History
The first electronic flip-flop was invented in 1918 by William Eccles and F. W. Jordan.[1][2] It
was initially called the Eccles–Jordan trigger circuit and consisted of two active elements
(vacuum tubes).[3] Such circuits and their transistorized versions were common in computers
even after the introduction of integrated circuits, though flip-flops made from logic gates are
also common now.[4][5]
Early flip-flops were known variously as trigger circuits or multivibrators. A multivibrator is
a two-state circuit; they come in several varieties, based on whether each state is stable or
not: an astable multivibrator is not stable in either state, so it acts as a relaxation oscillator; a
monostable multivibrator makes a pulse while in the unstable state, then returns to the stable
state, and is known as a one-shot; a bistable multivibrator has two stable states, and this is the
one usually known as a flip-flop. However, this terminology has been somewhat variable,
historically. For example:
• 1942 – multivibrator implies astable: "The multivibrator circuit (Fig. 7-6) is
somewhat similar to the flip-flop circuit, but the coupling from the anode of one valve
to the grid of the other is by a condenser only, so that the coupling is not maintained
in the steady state."[6]
• 1942 – multivibrator as a particular flip-flop circuit: "Such circuits were known as
'trigger' or 'flip-flop' circuits and were of very great importance. The earliest and best
known of these circuits was the multivibrator."[7]
• 1943 – flip-flop as one-shot pulse generator: "It should be noted that an essential
difference between the two-valve flip-flop and the multivibrator is that the flip-flop
has one of the valves biased to cutoff."[8]
• 1949 – monostable as flip-flop: "Monostable multivibrators have also been called
'flip-flops'."[9]
• 1949 – monostable as flip-flop: "... a flip-flop is a monostable multivibrator and the
ordinary multivibrator is an astable multivibrator."[10]
According to P. L. Lindley, a JPL engineer, the flip-flop types discussed below (RS, D, T,
JK) were first discussed in a 1954 UCLA course on computer design by Montgomery Phister,
and then appeared in his book Logical Design of Digital Computers.[11][12] Lindley was at the
time working at Hughes Aircraft under Dr. Eldred Nelson, who had coined the term JK for a
flip-flop which changed states when both inputs were on. The other names were coined by
Phister. They differ slightly from some of the definitions given below. Lindley explains that
he heard the story of the JK flip-flop from Dr. Eldred Nelson, who is responsible for coining
the term while working at Hughes Aircraft. Flip-flops in use at Hughes at the time were all of
the type that came to be known as J-K. In designing a logical system, Dr. Nelson assigned
letters to flip-flop inputs as follows: #1: A & B, #2: C & D, #3: E & F, #4: G & H, #5: J & K.
[edit] Implementation
Flip-flops can be either simple (transparent) or clocked; the transparent ones are commonly
called latches.[13]
The word latch is mainly used for storage elements, while clocked devices are described as
flip-flops.[14]
Simple flip-flops can be built around a pair of cross-coupled inverting elements: vacuum
tubes, bipolar transistors, field effect transistors, inverters, and inverting logic gates have all
been used in practical circuits. Clocked devices are specially designed for synchronous
systems; such devices ignore their inputs except at the transition of a dedicated clock signal
(known as clocking, pulsing, or strobing). Clocking causes the flip-flop to either change or
retain its output signal based upon the values of the input signals at the transition. Some flip-
flops change output on the rising edge of the clock, others on the falling edge.
Since the elementary amplifying stages are inverting, two stages can be connected in
succession (as a cascade) to form the needed non-inverting amplifier. In this configuration,
each amplifier may be considered as an active inverting feedback network for the other
inverting amplifier. Thus the two stages are connected in a non-inverting loop although the
circuit diagram is usually drawn as a symmetric cross-coupled pair (both the drawings are
initially introduced in the Eccles–Jordan patent).
[edit] Flip-flop types
Flip-flops can be divided into common types: the RS ("set-reset"), D ("data" or "delay"[15]), T
("toggle"), and JK types are the common ones. The behavior of a particular type can be
described by what is termed the characteristic equation, which derives the "next" (i.e., after
the next clock pulse) output, Qnext, in terms of the input signal(s) and/or the current output,
Q.
[edit] Simple set-reset latches
[edit] SR NOR latch
An RS latch, constructed from a pair of cross-coupled NOR gates (an animated picture). Red
and black mean logical '1' and '0', respectively.
When using static gates as building blocks, the most fundamental latch is the simple SR latch,
where S and R stand for set and reset. It can be constructed from a pair of cross-coupled
NOR logic gates. The stored bit is present on the output marked Q.
While the S and R inputs are both low, feedback maintains the Q and Q outputs in a constant
state, with Q the complement of Q. If S (Set) is pulsed high while R (Reset) is held low, then
the Q output is forced high, and stays high when S returns to low; similarly, if R is pulsed
high while S is held low, then the Q output is forced low, and stays low when R returns to
low.
SR latch operation
SR Action
0 0 No Change
0 1 Q=0
1 0 Q=1
1 1 Restricted combination
E/C Action
E/C D Q Q Comment
1 0 0 1 Reset
Symbol for a gated D latch
1 1 1 0 Set
The truth table shows that when the enable/clock input is 0, the D input has no effect on the
output. When E/C is high, the output equals D.
[edit] Earle latch
Earle latch uses complementary Enable inputs: Enable active Low (E_L) and Enable active H
(E_H)
The classic gated latch designs have some undesirable characteristics.[18] They require double-
rail logic or an inverter. The input-to-output propagation may take up to three gate delays.
The input-to-output propagation is not constant – some outputs take two gate delays while
others take three.
Designers looked for alternatives.[19] A successful alternative is the Earle latch.[20] It requires
only a single data input, and its output takes a constant two gate delays. In addition, the two
gate levels of the Earle latch can be merged with the last two gate levels of the circuits
driving the latch. Merging the latch function can implement the latch with no additional gate
delays.[18]
The Earle latch is hazard free.[21] If the middle NAND gate is omitted, then one gets the
polarity hold latch, which is commonly used because it demands less logic.[22][21]
Intentionally skewing the clock signal can avoid the hazard.[22]
[edit] D flip-flop
D flip-flop symbol
The D flip-flop is the most common flip-flop in use today. It is better known as data or delay
flip-flop (as its output Q looks like a delay of input D).
The Q output takes on the state of the D input at the moment of a positive edge at the clock
pin (or negative edge if the clock input is active low).[23] It is called the D flip-flop for this
reason, since the output takes the value of the D input or data input, and delays it by one
clock cycle. The D flip-flop can be interpreted as a primitive memory cell, zero-order hold, or
delay line. Whenever the clock pulses, the value of Qnext is D and Qprev otherwise.
Truth table:
Clock D Q Qprev
Rising edge 0 0 X
Rising edge 1 1 X
Non-Rising X Qprev
('X' denotes a Don't care condition, meaning the signal is irrelevant)
Most D-type flip-flops in ICs have the capability to be forced to the set or reset state (which
ignores the D and clock inputs), much like an SR flip-flop. Usually, the illegal S = R = 1
condition is resolved in D-type flip-flops. By setting S = R = 0, the flip-flop can be used as
described above.
Inputs Outputs
S R D > Q Q'
0 1 X X 0 1
1 0 X X 1 0
1 1 X X 1 1
A master–slave D flip-flop. It responds on the negative edge of the enable input (usually a
clock)
[edit] Metastability
Flip-flops are prone to a problem called metastability, which can happen when two inputs,
such as data and clock or clock and reset, are changing at about the same time, such that the
resulting state would depend on the order of the input events. When the order is not clear,
within appropriate timing constraints, the result is that the output may behave unpredictably,
taking many times longer than normal to settle to one state or the other, or even oscillating
several times before settling. Theoretically, the time to settle down is not bounded. In a
computer system, this metastability can cause corruption of data or a program crash, if the
state is not stable before another circuit uses its value; in particular, if two different logical
paths use the output of a flip-flop, one path can interpret it as a 0 and the other as a 1 when it
has not resolved to stable state, putting the machine into an inconsistent state.[26]
[edit] Timing considerations
[edit] Setup and hold times
In a conventional flip-flop, exactly one of the two complementary outputs is high. This can
be generalized to a memory element with N outputs, exactly one of which is high
(alternatively, where exactly one of N is low). The output is therefore always a one-hot
(respectively one-cold) representation. The construction is similar to a conventional cross-
coupled flip-flop; each output, when high, inhibits all the other outputs.[28] Alternatively,
more or less conventional flip-flops can be used, one per output, with additional circuitry to
make sure only one at a time can be true.[29]
Another generalization of the conventional flip-flop is a memory element for multi-valued
logic. In this case the memory element retains exactly one of the logic states until the control
inputs induce a change.[30] In addition, a multiple-valued clock can also be used, leading to
new possible clock transitions.[31]
[edit] See also
Wikimedia Commons has media related to: Flip-flops
• Multivibrator
• Positive feedback
• Deadlock
• Pulse transition detector
[edit] References
1. ^ William Henry Eccles and Frank Wilfred Jordan, "Improvements in ionic relays" British patent
number: GB 148582 (filed: 21 June 1918; published: 5 August 1920).
2. ^ W. H. Eccles and F. W. Jordan (19 September 1919) "A trigger relay utilizing three-electrode
thermionic vacuum tubes," The Electrician, vol. 83, page 298. Reprinted in: Radio Review, vol. 1, no.
3, pages 143–146 (December 1919).
3. ^ Emerson W. Pugh, Lyle R. Johnson, John H. Palmer (1991). IBM's 360 and early 370 systems. MIT
Press. p. 10. ISBN 9780262161237. http://books.google.com/?
id=MFGj_PT_clIC&pg=PA10&dq=eccles-jordan-trigger+vacuum&q=eccles-jordan-trigger
%20vacuum.
4. ^ Earl D. Gates (2000). Introduction to electronics (4th ed.). Delmar Thomson (Cengage) Learning.
p. 299. ISBN 9780766816985. http://books.google.com/books?id=IwC5GIA0cREC&pg=PA299&dq=
%22flip-flop%22+circuit+transistors+gates&hl=en&ei=YRP7TLqJDo-
4sQP24OX2DQ&sa=X&oi=book_result&ct=result&resnum=6&ved=0CDwQ6AEwBQ#v=onepage&
q=%22flip-flop%22%20circuit%20transistors%20gates&f=false.
5. ^ Max Fogiel and You-Liang Gu (1998). The Electronics problem solver, Volume 1 (revised ed.).
Research & Education Assoc.. p. 1223. ISBN 9780878915439. http://books.google.com/books?
id=Zpwtq_SjKSoC&pg=PA1223&dq=%22flip-flop
%22+circuit+transistors+gates&hl=en&ei=YRP7TLqJDo-
4sQP24OX2DQ&sa=X&oi=book_result&ct=result&resnum=7&ved=0CEEQ6AEwBg#v=onepage&q
=%22flip-flop%22%20circuit%20transistors%20gates&f=false.
6. ^ Wilfred Bennett Lewis (1942). Electrical counting: with special reference to counting alpha and
beta particles. CUP Archive. p. 68.
7. ^ The Electrician 128. Feb. 13, 1942.
8. ^ Owen Standige Puckle and E. B. Moullin (1943). Time bases (scanning generators): their design
and development, with notes on the cathode ray tube. Chapman & Hall Ltd. p. 51.
9. ^ Britton Chance (1949). Waveforms (Vol. 19 of MIT Radiation Lab Series ed.). McGraw-Hill Book
Co. p. 167.
10. ^ O. S. Puckle (Jan. 1949). "Development of Time Bases: The Principles of Known Circuits". Wireless
Engineer (Iliffe Electrical Publications) 26 (1): 139.
11. ^ P. L. Lindley, Aug. 1968, EDN (magazine), (letter dated June 13, 1968).
12. ^ Montgomery Phister (1958). Logical Design of Digital Computers.. Wiley. p. 128.
http://books.google.com/?id=Ri1IAAAAIAAJ&q=inauthor:phister+j-k-flip-
flop&dq=inauthor:phister+j-k-flip-flop.
13. ^ Volnei A. Pedroni (2008). Digital electronics and design with VHDL. Morgan Kaufmann. p. 329.
ISBN 9780123742704. http://books.google.com/books?id=-
ZAccwyQeXMC&pg=PA329&dq=latches+flip-
flops+transparent+clock&hl=en&ei=shr7TJ3EOJL2swPF-
rj3DQ&sa=X&oi=book_result&ct=result&resnum=10&ved=0CGYQ6AEwCQ#v=onepage&q=latches
%20flip-flops%20transparent%20clock&f=false.
14. ^ Latches and Flip Flops (EE 42/100 Lecture 24 from Berkeley) "...Sometimes the terms flip-flop and
latch are used interchangeably..."
15. ^ Sajjan G. Shiva (2000). Computer design and architecture (3rd ed.). CRC Press. p. 81.
ISBN 9780824703684. http://books.google.com/books?id=kKQFttdG7hcC&pg=PA81&dq=%22delay-
flip-flop%22+%22data-flip-flop
%22&hl=en&ei=Yz37TO_PAoX6sAOPoan3DQ&sa=X&oi=book_result&ct=result&resnum=2&ved=
0CCgQ6AEwAQ#v=onepage&q=%22delay-flip-flop%22%20%22data-flip-flop%22&f=false.
16. ^ Langholz, Gideon; Kandel, Abraham; Mott (1998), Foundations of Digital Logic Design, Singapore:
World Scientific Publishing Co. Ptc. Ltd., p. 344, ISBN 978-981-02-3110-1,
http://books.google.com/books?
id=4sX9fTGRo7QC&pg=PA344&lpg=PA344&dq=sr+characteristic+latch+equation&source=web&ot
s=9WdHN5uzTF&sig=ewGWuNX8g_4KozJuL5VyAS2yErc#v=onepage&q=sr%20characteristic
%20latch%20equation&f=false
17. ^ Hassan A. Farhat (2004). Digital design and computer organization, Volume 1. CRC Press. p. 274.
ISBN 9780849311918. http://books.google.com/books?id=QypINJ4oRI8C&pg=PA274&dq=
%22jk+latch
%22+oscillate&hl=en&ei=ADb7TN7gMpLAsAOVzJD3DQ&sa=X&oi=book_result&ct=result&resnu
m=3&ved=0CC8Q6AEwAg#v=onepage&q&f=false.
18. ^ a b Kogge, Peter M. (1981), The Architecture of Pipelined Computers, McGraw-Hill, pp. 25–27,
ISBN 0-07-035237-2
19. ^ Cotten, L. W. (1965), "Circuit Implementation of High-Speed Pipeline Systems", AFIPS Proc. Fall
Joint Computer Conference: 489–504
20. ^ Earle, J. (March, 1965), "Latched Carry-Save Adder", IBM Technical Disclosure Bulletin 7 (10):
909–910
21. ^ a b Omondi, Amos R. (1999), The Microarchitecture of Pipelined and Superscalar Computers,
pp. 40–42, ISBN 978-0792384632, http://books.google.com/books?id=Pf2ZbKM2-
5MC&pg=PA39&lpg=PA39&dq=%22earle+latch
%22&source=bl&ots=oB2eLzJgiN&sig=HR7T142isxJ2cLIo9xH6zX9lwa8&hl=en&ei=BnMFTKKR
N47ANYLitDs&sa=X&oi=book_result&ct=result&resnum=9&ved=0CDkQ6AEwCA#v=onepage&q
=%22earle%20latch%22&f=false
22. ^ a b Kunkel, Steven R.; Smith, James E. (May 1986), "Optimal Pipelining in Supercomputers", ACM
SIGARCH Computer Architecture News (ACM) 14 (2): 404–411, doi:10.1145/17356.17403,
ISSN 0163-5964, http://citeseerx.ist.psu.edu/viewdoc/download?
doi=10.1.1.99.2773&rep=rep1&type=pdf
23. ^ The D Flip-Flop
24. ^ SN7474 TI datasheet
25. ^ a b Mano, M. Morris; Kime, Charles R. (2004). Logic and Computer Design Fundamentals, 3rd
Edition. Upper Saddle River, NJ, USA: Pearson Education International. pp. pg283. ISBN 0-13-
1911651.
26. ^ Thomas J. Chaney and Charles E. Molnar (April 1973). "Anomalous Behavior of Synchronizer and
Arbiter Circuits". IEEE Transactions on Computers C-22 (4): 421–422. doi:10.1109/T-C.1973.223730.
ISSN 0018-9340. http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1672323.
27. ^ Often attributed to Don Knuth (1969) (see Midhat J. Gazalé (2000). Number: from Ahmes to Cantor.
Princeton University Press. p. 57. ISBN 9780691005157. http://books.google.com/?
id=hARkwMkeliUC&pg=PA57&dq=flip-flap-flop+knuth&q=flip-flap-flop%20knuth. ), the term flip-
flap-flop actually appeared much earlier in the computing literature, for example, Edward K. Bowdon
(1960). The design and application of a "flip-flap-flop" using tunnel diodes (Master's thesis).
University of North Dakota. http://books.google.com/?id=0pA7AAAAMAAJ&q=flip-flap-
flop+core&dq=flip-flap-flop+core.
28. ^ "Ternary "flip-flap-flop"". http://www.goldenmuseum.com/1411FlipFlap_engl.html.
29. ^ US 6975152
30. ^ Irving, Thurman A. and Shiva, Sajjan G. and Nagle, H. Troy (March 1976). "Flip-Flops for Multiple-
Valued Logic". Computers, IEEE Transactions on C-25 (3): 237–246. doi:10.1109/TC.1976.5009250.
31. ^ Wu Haomin1 and Zhuang Nan2 (1991). "Research into ternary edge-triggered JKL flip-flop".
Journal of Electronics (China) 8 (Volume 8, Number 3 / July, 1991): 268–275.
doi:10.1007/BF02778378.
Retrieved from "http://en.wikipedia.org/wiki/Flip-flop_(electronics)"
Categories: Digital electronics | Electronic engineering | Digital systems | Logic gates |
Computer memory
Hidden categories: All accuracy disputes | Articles with disputed statements from December
2010
Personal tools
• Log in / create account
Namespaces
• Article
• Discussion
Variants
Views
• Read
• Edit
• View history
Actions
Search
Top of Form
Special:Search
Search
Bottom of Form
Navigation
• Main page
• Contents
• Featured content
• Current events
• Random article
• Donate to Wikipedia
Interaction
• Help
• About Wikipedia
• Community portal
• Recent changes
• Contact Wikipedia
Toolbox
• What links here
• Related changes
• Upload file
• Special pages
• Permanent link
• Cite this page
Print/export
• Create a book
• Download as PDF
• Printable version
Languages
• العربية
• Bosanski
• Български
• Català
• Česky
• Dansk
• Deutsch
• Ελληνικά
• Español
• فارسی
• Français
• 한국어
• Hrvatski
• Bahasa Indonesia
• Italiano
• עברית
• Latviešu
• Magyar
• Malagasy
• Nederlands
• 日本語
• Norsk (bokmål)
• Polski
• Português
• Русский
• Simple English
• Slovenčina
• Slovenščina
• Српски / Srpski
• Suomi
• Svenska
• ไทย
• Türkçe
• Українська
• 中文
• This page was last modified on 15 March 2011 at 15:15.
• Text is available under the Creative Commons Attribution-ShareAlike License;
additional terms may apply. See Terms of Use for details.
Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit
organization.
• Contact us
• Privacy policy
• About Wikipedia
• Disclaimers