Kepler's equation: Difference between revisions

From formulasearchengine
Jump to navigation Jump to search
en>Gilliam
m Reverted edits by 75.95.38.171 (talk) to last version by Addbot
Line 1: Line 1:
{{More footnotes|date=May 2013}}
My name is Herbert (37 years old) and my hobbies are Disc golf and Tour skating.<br><br>Here is my web page :: web directory ([http://www.estetyczna-dermatologia.net www.estetyczna-dermatologia.net])
 
[[File:Transistor Bistable interactive animated EN.svg|thumb|An animated interactive SR latch (''R1, R2'' = 1 k&Omega; ''R3, R4'' = 10 kΩ).]]
 
[[File:R-S mk2.gif|thumb|right|An SR latch, constructed from a pair of cross-coupled [[NOR gate|NOR]] [[logic gate|gates]].]]
 
In [[electronics]], a '''flip-flop''' or '''latch''' is a [[electronic circuit|circuit]] that has two stable states and can be used to store state information. A flip-flop is a [[bistable multivibrator]]. The circuit can be made to change state by signals applied to one or more control inputs and will have one or two outputs. It is the basic storage element in [[sequential logic]]. Flip-flops and latches are a fundamental building block of [[digital electronics]] systems used in computers, communications, and many other types of systems.
 
Flip-flops and latches are used as data storage elements. Such data storage can be used for storage of ''[[state (computer science)|state]]'', and such a circuit is described as [[sequential logic]]. When used in a [[finite-state machine]], the output and next state depend not only on its current input, but also on its current state (and hence, previous inputs). It can also be used for counting of pulses, and for synchronizing variably-timed input signals to some reference timing signal.
 
Flip-flops can be either simple (transparent or opaque) or [[clock signal|clock]]ed (synchronous or edge-triggered); the simple ones are commonly called latches.<ref name="pedroni"/> The word ''latch'' is mainly used for storage elements, while clocked devices are described as ''flip-flops''.<ref name="ee42"/> A latch is level-sensitive, whereas a flip-flop is edge-sensitive. That is, when a latch is enabled it becomes transparent, while a flip flop's output only changes on a single type (positive going or negative going) of clock edge.
 
==History==
[[File:Eccles-Jordan trigger circuit flip-flip drawings.png|right|thumb|300px|Flip-flop schematics from the Eccles and Jordan patent filed 1918, one drawn as a cascade of amplifiers with a positive feedback path, and the other as a symmetric cross-coupled pair]]
The first electronic flip-flop was invented in 1918 by [[William Eccles]] and [[F. W. Jordan]].<ref>
William Henry Eccles and Frank Wilfred Jordan, "[http://v3.espacenet.com/origdoc?DB=EPODOC&IDX=GB148582&F=0&QPN=GB148582 Improvements in ionic relays]" British patent number: GB 148582 (filed: 21 June 1918; published: 5 August 1920).
</ref><ref>
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).
</ref>
It was initially called the ''Eccles–Jordan trigger circuit'' and consisted of two active elements ([[vacuum tube]]s).<ref>
{{cite book| author = Emerson W. Pugh, Lyle R. Johnson, John H. Palmer| coauthors = Lyle R. Johnson, John H. Palmer| title = IBM's 360 and early 370 systems| url = http://books.google.com/?id=MFGj_PT_clIC| year = 1991| publisher = MIT Press| isbn = 978-0-262-16123-7| page = 10 }}</ref>  Such circuits and their transistorized versions were common in computers even after the introduction of [[integrated circuit]]s, though flip-flops made from [[logic gate]]s are also common now.<ref>
{{cite book| author = Earl D. Gates| title = Introduction to electronics| url = http://books.google.com/?id=IwC5GIA0cREC| edition = 4th| date = 2000-12-01| publisher = Delmar Thomson (Cengage) Learning| isbn = 978-0-7668-1698-5| page = 299 }}</ref><ref>
{{cite book| author = Max Fogiel and You-Liang Gu| title = The Electronics problem solver, Volume 1| url = http://books.google.com/?id=6oXuRAAACAAJ| edition = revised| year = 1998| publisher = Research & Education Assoc.| isbn = 978-0-87891-543-9| page = 1223 }}</ref>
Early flip-flops were known variously as trigger circuits or [[multivibrator]]s.
 
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.''<ref>P. L. Lindley, Aug. 1968, [[EDN (magazine)]], (letter dated June 13, 1968).</ref><ref>
{{cite book
| title = Logical Design of Digital Computers.
| author = Montgomery Phister
| publisher = Wiley
| year = 1958
| page = 128
| url = http://books.google.com/?id=Ri1IAAAAIAAJ&q=inauthor:phister+j-k-flip-flop&dq=inauthor:phister+j-k-flip-flop
}}</ref>
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.  Nelson used the notations "''j''-input" and "''k''-input" in a patent application filed in 1953.<ref>
{{cite web
| url = http://www.google.com/patents?id=JNUAAAAAEBAJ&pg=PA15
| work = US Patent  2850566
| title = High-Speed Printing System
| author = Eldred C. Nelson
| date = Sept. 2, 1958 (filed Sept. 8, 1953)
| quote = Each flip-flop or bistable multivibrator includes two input terminals, hereinafter termed the j-input and the k-input terminals, respectively, and two output terminals for producing complementary bivalued electrical output signals hereinafter termed Q and Qbar, respectively. Signals applied separately to the j-input and k-input terminals set the flip-flop to conduction states corresponding to the binary values one and zero, respectively, while signals applied simultaneously to both input terminals trigger or change the conduction state of the flip-flop.
}}</ref>
 
==Implementation==
 
[[File:TTL flip-flop.svg|thumb|right|300px|A traditional flip-flop circuit based on [[bipolar junction transistor]]s]]
 
Flip-flops can be either simple (transparent or asynchronous) or clocked (synchronous); the transparent ones are commonly called latches.<ref name="pedroni">
{{cite book| author = Volnei A. Pedroni| title = Digital electronics and design with VHDL| url = http://books.google.com/?id=-ZAccwyQeXMC| year = 2008| publisher = Morgan Kaufmann| isbn = 978-0-12-374270-4| page = 329 }}</ref> The word ''latch'' is mainly used for  storage elements, while clocked devices are described as ''flip-flops''.<ref name="ee42">[http://rfic.eecs.berkeley.edu/ee100/pdf/lect24.pdf Latches and Flip Flops] (EE 42/100 Lecture 24 from Berkeley)  ''"...Sometimes the terms flip-flop and latch are used interchangeably..."''</ref>
 
Simple flip-flops can be built around a pair of cross-coupled inverting elements: [[vacuum tube]]s, [[bipolar transistor]]s, [[field effect transistor]]s, [[inverter (logic gate)|inverter]]s, and inverting [[logic gate]]s 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 [[signal edge|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 [[:File:Eccles-Jordan trigger circuit flip-flip drawings.png|drawings]] are initially introduced in the Eccles–Jordan patent).
 
== Flip-flop types ==
Flip-flops can be divided into common types: the '''SR''' ("set-reset"), '''D''' ("data" or "delay"<ref>
{{cite book| author = Sajjan G. Shiva| title = Computer design and architecture| url = http://books.google.com/?id=kKQFttdG7hcC| edition = 3rd| year = 2000| publisher = CRC Press| isbn = 978-0-8247-0368-4| page = 81 }}</ref>), '''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, {{math|<VAR>Q</VAR><SUB>next</SUB>}} in terms of the input signal(s) and/or the current output, <math>Q</math>.
 
===Simple set-reset latches===
 
====SR NOR latch====
[[File:R-S mk2.gif|thumb|right|An SR latch, constructed from a pair of cross-coupled [[NOR gate|NOR]] [[logic gate|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 gate|NOR]] [[logic gate]]s.  The stored bit is present on the output marked Q.
 
While the S and R inputs are both low, [[feedback]] maintains the Q and {{overline|Q}} outputs in a constant state, with {{overline|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.
 
{|class="wikitable" style="text-align:center"
|-
! colspan="9" | SR latch operation<ref>Roth, Charles H. Jr. "Latches and Flip-Flops." Fundamentals of Logic Design. Boston: PWS, 1995. Print.</ref>
|-
! colspan="4" | [[State transition table|Characteristic table]] !! colspan="4" | [[Excitation table]]
|-
|'''S'''||'''R'''||'''Q<sub>next</sub>''' || '''Action''' || '''Q''' || '''Q<sub>next</sub>''' || '''S''' || '''R'''
|-
| 0 || 0 || Q || hold state||0||0||0||X
|-
| 0 || 1 || 0 || reset||0||1||1||0
|-
| 1 || 0 || 1 || set||1||0||0||1
|-
| 1 || 1 || X || not allowed||1||1||X||0
|}
 
The R = S = 1 combination is called a '''restricted combination''' or a '''forbidden state''' because, as both NOR gates then output zeros, it breaks the logical equation Q = '''not''' {{overline|Q}}. The combination is also inappropriate in circuits where ''both'' inputs may go low ''simultaneously'' (i.e. a transition from ''restricted'' to ''keep'').  The output would lock at either 1 or 0 depending on the propagation time relations between the gates (a [[race condition]]).
 
To overcome the restricted combination, one can add gates to the inputs that would convert <tt>(S,R) = (1,1)</tt> to one of the non-restricted combinations. That can be:
* Q = 1 (1,0) – referred to as an ''S (dominated)-latch''
* Q = 0 (0,1) – referred to as an ''R (dominated)-latch''
This is done in nearly every [[Programmable logic controller]].
* Keep state (0,0) – referred to as an ''E-latch''
Alternatively, the restricted combination can be made to ''toggle'' the output. The result is the [[#JK latch|JK latch]].
 
Characteristic:  Q+ = R'Q + R'S or Q+ = R'Q + S.<ref>
{{cite book| last = Langholz| first = Gideon| coauthors = Abraham Kandel, Joe L. Mott| title = Foundations of Digital Logic Design| url = http://books.google.com/?id=4sX9fTGRo7QC| year = 1998| publisher = World Scientific Publishing Co. Ptc. Ltd.| location = Singapore| isbn = 978-981-02-3110-1| page = 344| last3 = Mott| last2 = Kandel| first2 = Abraham| first3 = Joe L. }}</ref>
 
===={{overline|SR}} NAND latch====
[[File:SR Flip-flop Diagram.svg|thumb|right|An {{overline|SR}} latch]]
 
This is an alternate model of the simple SR latch which is built with [[NAND gate|NAND]] [[logic gate]]s. ''Set'' and ''reset'' now become active low signals, denoted {{overline|S}} and {{overline|R}} respectively. Otherwise, operation is identical to that of the SR latch. Historically, {{overline|SR}}-latches have been predominant despite the notational inconvenience of [[logic level|active-low]] inputs.{{Citation needed|date=June 2011}}
 
{|
|-
|
{| class="wikitable"
! colspan="7"|{{overline|SR}} latch operation
|-
!{{overline|S}}!!{{overline|R}}!!Action
|-
|0||0||Restricted combination
|-
|0||1||Q = 1
|-
|1||0||Q = 0
|-
|1||1||No Change
|}
|
[[File:Inverted SR latch symbol.png|frame|Symbol for an {{overline|SR}} NAND latch]]
|}
 
====JK latch====
The JK latch is much less frequently used than the [[Flip-flop (electronics)#JK flip-flop|JK flip-flop]]. The JK latch follows the following state table:
 
{|class = wikitable
|-
|colspan = 5| '''JK latch truth table'''
|-
|'''J''' || '''K''' || '''Q<sub>next''' || '''Comment'''
|-
| 0        || 0      || Q || No change
|-
| 0        || 1      || 0                || Reset
|-
| 1        || 0      || 1                || Set
|-
| 1        || 1      || {{overline|Q}} || Toggle
|}
 
Hence, the JK latch is an SR latch that is made to ''toggle'' its output when passed the restricted combination of 11.{{citation needed|date=December 2013}}<!-- what is the meaning of toggle? Oscillate?-->  Unlike the JK flip-flop, the 11 input combination for the JK latch is not useful because there is no clock that directs toggling.<ref>{{cite book| author = Hassan A. Farhat| title = Digital design and computer organization, Volume 1| url = http://books.google.com/?id=jwZZcgAACAAJ| year = 2004| publisher = CRC Press| isbn = 978-0-8493-1191-8| page = 274 }}</ref>
 
===Gated latches and conditional transparency===
 
Latches are designed to be ''transparent.'' That is, input signal changes cause immediate changes in output; when several ''transparent'' latches follow each other, using the same enable signal, signals can propagate through all of them at once. Alternatively, additional logic can be added to a simple transparent latch to make it ''non-transparent'' or ''opaque'' when another input (an "enable" input) is not asserted. By following a ''transparent-high'' latch with a ''transparent-low'' (or ''opaque-high'') latch, a master–slave flip-flop is implemented.
 
====Gated SR latch====
[[File:SR (Clocked) Flip-flop Diagram.svg|frame|A gated SR latch circuit diagram constructed from NOR gates.]]
 
A ''synchronous SR latch'' (sometimes ''clocked SR flip-flop'') can be made by adding a second level of NAND gates to the inverted SR latch (or a second level of AND gates to the direct SR latch). The extra gates further invert the inputs so the simple {{overline|SR}} latch becomes a gated SR latch (and a simple SR latch would transform into a gated {{overline|SR}} latch with inverted enable).
 
With E high (''enable'' true), the signals can pass through the input gates to the encapsulated latch; all signal combinations except for (0,0) = ''hold'' then immediately reproduce on the (Q,{{overline|Q}}) output, i.e. the latch is ''transparent''.
 
With E low (''enable'' false) the latch is ''closed (opaque)'' and remains in the state it was left the last time E was high.
 
The ''enable'' input is sometimes a [[clock signal]], but more often a read or write strobe.
 
{|style="text-align:center; margin: 1em auto 1em auto"
|-
|
{|class = wikitable style="text-align:center; margin: 1em auto 1em auto"
|-
|+ '''Gated SR latch operation'''
|-
!width=40| E/C !! Action
|-
| 0 || No action (keep state)
|-
| 1 || The same as non-clocked SR latch
|}
|valign=center|[[File:Gated SR flip-flop Symbol.svg|frame|Symbol for a gated SR latch]]
|}
 
====Gated D latch====
[[File:D-Type Transparent Latch.svg|frame|alt=Schematic diagram|A D-type transparent latch based on an {{overline|SR}} NAND latch]]
 
[[File:D-type Transparent Latch (NOR).svg|frame|A gated D latch based on an SR NOR latch]]
 
This latch exploits the fact that, in the two active input combinations (01 and 10) of a gated SR latch, R is the complement of S. The input NAND stage converts the two D input states (0 and 1) to these two input combinations for the next {{overline|SR}} latch by inverting the data input signal. The low state of the ''enable'' signal produces the inactive "11" combination. Thus a gated D-latch may be considered as a ''one-input synchronous SR latch''. This configuration prevents application of the restricted input combination. It is also known as ''transparent latch'', ''data latch'', or simply ''gated latch''. It has a ''data'' input and an ''enable'' signal (sometimes named ''clock'', or ''control''). The word ''transparent'' comes from the fact that, when the enable input is on, the signal propagates directly through the circuit, from the input D to the output Q.
 
Transparent latches are typically used as I/O ports or in asynchronous systems, or in synchronous two-phase systems ([[synchronous system]]s that use a [[two-phase clock]]), where two latches operating on different clock phases prevent data transparency as in a master–slave flip-flop.
 
Latches are available as [[integrated circuit]]s, usually with multiple latches per chip.  For example, 74HC75 is a quadruple transparent latch in the [[7400 series]].
 
{| style="text-align:center; margin: 1em auto 1em auto"
|-
|
{|class = wikitable style="text-align:center; margin: 1em auto 1em auto"
|-
|+ Gated D latch truth table
|-
!width=40| E/C !!width=40| D
|rowspan=4 |
!width=40| Q !! width=40| {{overline|Q}} !!width=80| Comment
|-
| 0 || X  || Q<sub>prev</sub> || {{overline|Q}}<sub>prev</sub> || No change
|-
| 1 || 0  || 0 || 1 || Reset
|-
| 1 || 1  || 1 || 0 || Set
|}
|
[[File:Transparent Latch Symbol.svg|frame|Symbol for a gated D latch]]
|}
The truth table shows that when the ''e''nable/''c''lock input is 0, the D input has no effect on the output. When E/C is high, the output equals D.
 
{{Clear}}
 
==== Earle latch ====
[[File:SVG Earle Latch.svg|frame|Earle latch uses complementary enable inputs: enable active low (E_L) and enable active high (E_H)]]
The classic gated latch designs have some undesirable characteristics.<ref name="kogge">
{{cite book| last = Kogge| first = Peter M.| title = The Architecture of Pipelined Computers| year = 1981| publisher = McGraw-Hill| isbn = 0-07-035237-2| pages = 25–27 }}</ref>
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.<ref>
{{Cite journal
|last= Cotten
|first= L. W.
|title= Circuit Implementation of High-Speed Pipeline Systems
|journal= AFIPS Proc. Fall Joint Computer Conference
|pages= 489–504
|year= 1965
}}</ref>
A successful alternative is the Earle latch. 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, in some cases, be merged with the last two gate levels of the circuits driving the latch because many common computational circuits have an OR layer followed by an AND layer as their last two levels. Merging the latch function can implement the latch with no additional gate delays.<ref name=kogge/>  The merge is commonly exploited in the design of pipelined computers, and, in fact, was originally developed by J. G. Earle to be used in the IBM System/360 Model 91 for that purpose.<ref>
{{Cite journal
|last= Earle
|first= J.
|title= Latched Carry-Save Adder
|journal= IBM Technical Disclosure Bulletin
|volume= 7
|issue= 10
|date= March 1965
|pages= 909–910
}}</ref>
 
The Earle latch is hazard free.<ref name="omondi">
{{cite book| last = Omondi| first = Amos R.| title = The Microarchitecture of Pipelined and Superscalar Computers| url = http://books.google.com/?id=Pf2ZbKM2-5MC| date = 1999-04-30| publisher = Springer| isbn = 978-0-7923-8463-2| pages = 40–42 }}</ref>
If the middle NAND gate is omitted, then one gets the '''polarity hold latch''', which is commonly used because it demands less logic.<ref name=omondi/><ref name="kunkel">
{{Cite journal
|first= Steven R.
|last= Kunkel
|first2= James E.
|last2= Smith
|title= Optimal Pipelining in Supercomputers
|pages= 404–411 [406]
|journal= ACM SIGARCH Computer Architecture News
|volume= 14
|issue= 2
|date= May 1986
|publisher= ACM
|issn=0163-5964
|id = {{citeseerx|10.1.1.99.2773}}
|doi= 10.1145/17356.17403
}}</ref>
However, it is susceptible to [[#Metastability|logic hazard]].
Intentionally skewing the clock signal can avoid the hazard.<ref name=kunkel/>
{{Clear}}
 
=== D flip-flop ===
<!-- This section is linked from [[Counter]] -->
[[File:D-Type Flip-flop.svg|frame|right|D flip-flop symbol]]
 
The D flip-flop is widely used. It is also known as a "data" or "delay" flip-flop.
 
The D flip-flop captures the value of the D-input at a definite portion of the clock cycle (such as the rising edge of the clock). That captured value becomes the Q output. At other times, the output Q does not change.<ref>[http://www.play-hookey.com/digital/d_nand_flip-flop.html The D Flip-Flop<!-- Bot generated title -->]</ref><ref>[http://www.ee.usyd.edu.au/tutorials/digital_tutorial/part2/flip-flop02.html Edge-Triggered Flip-flops]</ref> The D flip-flop can be viewed as a memory cell, a [[zero-order hold]], or a [[Analog delay line|delay line]].{{citation needed|date=December 2011}}
 
Truth table:
 
::{|class="wikitable" style="text-align:center"
||'''Clock'''||'''D'''||'''Q<sub>next</sub>'''
|-
||Rising edge||0||0
|-
||Rising edge||1||1
|-
||Non-Rising||X||Q
|}
('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. Here is the truth table for the others S and R possible configurations:
 
::{|class="wikitable" style="text-align:center" width=150
!colspan=4|Inputs!!colspan=2|Outputs
|-
|'''S'''||'''R'''||'''D'''||'''>'''||'''Q'''||'''Q''''
|-
||0||1||X||X||0||1
|-
||1||0||X||X||1||0
|-
||1||1||X||X||1||1
|}
 
[[File:4 Bit Shift Register 001.svg|thumb|right|4-bit [[Shift register#Serial-in, parallel-out (SIPO)|serial-in, parallel-out (SIPO) shift register]]]]
 
These flip-flops are very useful, as they form the basis for [[shift registers]], which are an essential part of many electronic devices.  The advantage of the D flip-flop over the D-type "transparent latch" is that the signal on the D input pin is captured the moment the flip-flop is clocked, and subsequent changes on the D input will be ignored until the next clock event. An exception is that some flip-flops have a "reset" signal input, which will reset Q (to zero), and may be either asynchronous or synchronous with the clock.
 
The above circuit shifts the contents of the register to the right, one bit position on each active transition of the clock. The input X is shifted into the leftmost bit position.
 
==== Classical positive-edge-triggered D flip-flop ====
[[File:Edge triggered D flip flop.svg|thumb|right|A positive-edge-triggered D flip-flop]]
This circuit<ref>[http://focus.ti.com/lit/ds/symlink/sn7474.pdf SN7474 TI datasheet]</ref> consists of two stages implemented by [[#SR NAND latch|<span style="text-decoration:overline">SR</span> NAND latches]]. The input stage (the two latches on the left) processes the clock and data signals to ensure correct input signals for the output stage (the single latch on the right). If the clock is low, both the output signals of the input stage are high regardless of the data input; the output latch is unaffected and it stores the previous state. When the clock signal changes from low to high, only one of the output voltages (depending on the data signal) goes low and sets/resets the output latch: if D = 0, the lower output becomes low; if D = 1, the upper output becomes low. If the clock signal continues staying high, the outputs keep their states regardless of the data input and force the output latch to stay in the corresponding state as the input logical zero remains active while the clock is high. Hence the role of the output latch is to store the data only while the clock is low.
 
The circuit is closely related to the [[#Gated D latch|gated D latch]] as both the circuits convert the two D input states (0 and 1) to two input combinations (01 and 10) for the output <span style="text-decoration:overline">SR</span> latch by inverting the data input signal (both the circuits split the single D signal in two complementary <span style="text-decoration:overline">S</span> and <span style="text-decoration:overline">R</span> signals). The difference is that in the gated D latch simple NAND logical gates are used while in the positive-edge-triggered D flip-flop <span style="text-decoration:overline">SR</span> NAND latches are used for this purpose. The role of these latches is to "lock" the active output producing low voltage (a logical zero); thus the positive-edge-triggered D flip-flop can be thought of as a gated D latch with latched input gates.
 
====Master–slave edge-triggered D flip-flop====
A master–slave D flip-flop is created by connecting two [[gated D latch]]es in series, and inverting the ''enable'' input to one of them. It is called master–slave because the second latch in the series only changes in response to a change in the first (master) latch.
 
[[File:Negative-edge triggered master slave D flip-flop.svg|thumb|right|A master–slave D flip-flop. It responds on the falling edge of the ''enable'' input (usually a clock)]]
 
[[File:D-Type Flip-flop Diagram.svg|thumb|right|An implementation of a master–slave D flip-flop that is triggered on the rising edge of the clock]]
 
For a positive-edge triggered master–slave D flip-flop, when the clock signal is low (logical 0) the "enable" seen by the first or "master" D latch (the inverted clock signal) is high (logical 1). This allows the "master" latch to store the input value when the clock signal transitions from low to high. As the clock signal goes high (0 to 1) the inverted "enable" of the first latch goes low (1 to 0) and the value seen at the input to the master latch is "locked". Nearly simultaneously, the twice inverted "enable" of the second or "slave" D latch transitions from low to high (0 to 1) with the clock signal. This allows the signal captured at the rising edge of the clock by the now "locked" master latch to pass through the "slave" latch. When the clock signal returns to low (1 to 0), the output of the "slave" latch is "locked", and the value seen at the last rising edge of the clock is held while the "master" latch begins to accept new values in preparation for the next rising clock edge.
 
By removing the leftmost inverter in the circuit at side, a D-type flip-flop that strobes on the ''falling edge'' of a clock signal can be obtained. This has a truth table like this:
 
::{|class="wikitable" style="text-align:center"
||'''D'''||'''Q'''||'''>'''||'''Q<sub>next</sub>'''
|-
||0||X||Falling||0
|-
||1||X||Falling||1
|}
 
[[File:True single-phase edge-triggered flip-flop with reset.svg|thumb|300px|right|A CMOS IC implementation of a "true single-phase edge-triggered flip-flop with reset"]]
 
====Edge-triggered dynamic D storage element====
An efficient functional alternative to a D flip-flop can be made with dynamic circuits (where information is stored in a capacitance) as long as it is clocked often enough; while not a true flip-flop, it is still called a flip-flop for its functional role. While the master–slave D element is triggered on the edge of a clock, its components are each triggered by clock levels. The "edge-triggered D flip-flop", as it is called even though it is not a true flip-flop, does not have the master–slave properties.
 
Edge-triggered D flip-flops are often implemented in integrated high-speed operations using [[dynamic logic (digital electronics)|dynamic logic]].  This means that the digital output is stored on parasitic device capacitance while the device is not transitioning.  This design of dynamic flip flops also enables simple resetting since the reset operation can be performed by simply discharging one or more internal nodes. A common dynamic flip-flop variety is the true single-phase clock (TSPC) type which performs the flip-flop operation with little power and at high speeds.  However, dynamic flip-flops will typically not work at static or low clock speeds: given enough time, leakage paths may discharge the parasitic capacitance enough to cause the flip-flop to enter invalid states.
 
===T flip-flop===
[[File:T-Type Flip-flop.svg|frame|right|A circuit symbol for a T-type flip-flop]]
If the T input is high, the T flip-flop changes state ("toggles") whenever the clock input is strobed. If the T input is low, the flip-flop holds the previous value. This behavior is described by the characteristic [[equation]]:
 
:<math>Q_{next} = T \oplus Q = T\overline{Q} + \overline{T}Q</math>  (expanding the [[XOR gate|XOR]] operator)
 
and can be described in a [[truth table]]:
 
{| class="wikitable" style="text-align:center"
! colspan="9"|T flip-flop operation<ref name="manokime">{{cite book| last = Mano| first = M. Morris| coauthors = Kime, Charles R.| title = Logic and Computer Design Fundamentals, 3rd Edition| year = 2004| publisher = Pearson Education International| location = Upper Saddle River, NJ, USA| isbn = 0-13-191165-1| pages = pg283 }}</ref>
|-
! colspan="4"|[[State transition table|Characteristic table]] !! colspan="5" | [[Excitation table]]
|-
! <math>T</math> !! <math>Q</math> !! <math>Q_{next}</math> !! Comment !! <math>Q</math> !! <math>Q_{next}</math> !! <math>T</math> !! Comment
|-
|| 0 || 0 || 0 || hold state (no clk)||0||0||0||No change
|-
|| 0 || 1 || 1 || hold state (no clk)||1||1||0||No change
|-
|| 1 || 0 || 1 || toggle||0||1||1||Complement
|-
|| 1 || 1 || 0 || toggle||1||0||1||Complement
|}
 
When T is held high, the toggle flip-flop divides the clock frequency by two; that is, if clock frequency is 4&nbsp;MHz, the output frequency obtained from the flip-flop will be 2&nbsp;MHz. This "divide by" feature has application in various types of digital [[counter]]s.  A T flip-flop can also be built using a JK flip-flop (J & K pins are connected together and act as T) or D flip-flop (T input and Q<sub>previous</sub> is connected to the D input through an XOR gate).
 
=== JK flip-flop ===
<!-- linked from redirect [[JK flip-flop]] and [[j-k ff]] -->
[[File:JK Flip-flop (Simple) Symbol.svg|frame|right|A circuit symbol for a positive-edge-triggered JK flip-flop]]
[[File:JK timing diagram.svg|thumb|right|JK flip-flop timing diagram]]
The JK flip-flop augments the behavior of the SR flip-flop (J=Set, K=Reset) by interpreting the S = R = 1 condition as a "flip" or toggle command. Specifically, the combination J = 1, K = 0 is a command to set the flip-flop; the combination J = 0, K = 1 is a command to reset the flip-flop; and the combination J = K = 1 is a command to toggle the flip-flop, i.e., change its output to the logical complement of its current value. Setting J = K = 0 does NOT result in a D flip-flop, but rather, will hold the current state.  To synthesize a D flip-flop, simply set K equal to the complement of J. Similarly, to synthesize a T flip-flop, set K equal to J. The JK flip-flop is therefore a universal flip-flop, because it can be configured to work as an SR flip-flop, a D flip-flop, or a T flip-flop.
 
The characteristic equation of the JK flip-flop is:
 
<math>Q_{next} = J\overline Q + \overline KQ</math>
 
and the corresponding truth table is:
 
{|class="wikitable" style="text-align:center"
|-
! colspan="9" | JK flip-flop operation<ref name="manokime" />
|-
! colspan="4" | [[State transition table|Characteristic table]] !! colspan="5" | [[Excitation table]]
|-
|'''J'''||'''K'''|| '''Comment''' || '''Q<sub>next</sub>''' || '''Q''' || '''J''' || '''K'''||'''Comment'''||'''Q<sub>next</sub>'''
|-
| 0 || 0 || hold state|| Q ||0||0||X||No Change||0
|-
| 0 || 1 || reset|| 0 ||0||1||X||Set||1
|-
| 1 || 0 || set|| 1 ||1||X||1||Reset||0
|-
| 1 || 1 || toggle|| <span style="text-decoration:overline">Q</span> ||1||X||0||No Change||1
|}
 
==Metastability==
Flip-flops are subject to a problem called [[Metastability in electronics|metastability]], which can happen when two inputs, such as data and clock or clock and reset, are changing at about the same time.  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.<ref>
{{cite journal
| journal = IEEE Transactions on Computers
| title = Anomalous Behavior of Synchronizer and Arbiter Circuits
| author = Thomas J. Chaney and [[Charles Molnar|Charles E. Molnar]]
| volume = C-22
| issue = 4
| pages = 421–422
| issn= 0018-9340
| doi = 10.1109/T-C.1973.223730
| date = April 1973
| url = http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1672323
}}</ref>
 
== Timing considerations ==
 
===Setup, hold, recovery, removal times===
[[File:FF Tsetup Thold Toutput.svg|thumb|right|Flip-flop setup, hold and clock-to-output timing parameters]]
'''Setup time''' is the minimum amount of time the data signal should be held steady '''before''' the clock event so that the data are reliably sampled by the clock.  This applies to synchronous input signals to the flip-flop.
 
'''Hold time''' is the minimum amount of time the data signal should be held steady '''after''' the clock event so that the data are reliably sampled.  This applies to synchronous input signals to the flip-flop.
 
Synchronous signals (like Data) should be held steady from the set-up time to the hold time, where both times are relative to the clock signal.
 
'''Recovery time''' is like setup time for asynchronous ports (set, reset). It is the time available between the asynchronous signals going inactive and the active clock edge.
 
'''Removal time''' is like hold time for asynchronous ports (set, reset). It is the time between active clock edge and asynchronous signal going inactive.<ref>https://solvnet.synopsys.com/retrieve/customer/application_notes/attached_files/026030/App_Note_generic_constraint.pdf</ref>
 
Short impulses applied to asynchronous inputs (set, reset) should not be applied completely within the recovery-removal period, or else it becomes entirely indeterminable whether the flip-flop will transition to the appropriate state. In another case, where an asynchronous signal simply makes one transition that happens to fall between the recovery/removal time, eventually the asynchronous signal will be applied, but in that case it is also possible that a very short glitch may appear on the output, dependent on the synchronous input signal. This second situation may or may not have significance to a circuit design.
 
Set and Reset (and other) signals may be either synchronous or asynchronous and therefore may be characterized with either Setup/Hold or Recovery/Removal times, and synchronicity is very dependent on the [[Transistor–transistor logic|TTL]] design of the flip-flop.
Differentiation between Setup/Hold and Recovery/Removal times is often necessary when verifying the timing of larger circuits because asynchronous signals may be found to be less critical than synchronous signals. The differentiation offers circuit designers the ability to define the verification conditions for these types of signals independently.
 
The metastability in flip-flops can be avoided by ensuring that the data and control inputs are held valid and constant for specified periods before and after the clock pulse, called the '''setup time''' (t<sub>su</sub>) and the '''hold time''' (t<sub>h</sub>) respectively.  These times are specified in the data sheet for the device, and are typically between a few nanoseconds and a few hundred picoseconds for modern devices.
 
Unfortunately, it is not always possible to meet the setup and hold criteria, because the flip-flop may be connected to a real-time signal that could change at any time, outside the control of the designer. In this case, the best the designer can do is to reduce the probability of error to a certain level, depending on the required reliability of the circuit. One technique for suppressing metastability is to connect two or more flip-flops in a chain, so that the output of each one feeds the data input of the next, and all devices share a common clock. With this method, the probability of a metastable event can be reduced to a negligible value, but never to zero. The probability of metastability gets closer and closer to zero as the number of flip-flops connected in series is increased.
 
So-called metastable-hardened flip-flops are available, which work by reducing the setup and hold times as much as possible, but even these cannot eliminate the problem entirely. This is because metastability is more than simply a matter of circuit design. When the transitions in the clock and the data are close together in time, the flip-flop is forced to decide which event happened first. However fast we make the device, there is always the possibility that the input events will be so close together that it cannot detect which one happened first. It is therefore logically impossible to build a perfectly metastable-proof flip-flop.
 
===Propagation delay===
Another important timing value for a flip-flop is the clock-to-output delay (common symbol in data sheets: t<sub>CO</sub>) or [[propagation delay]] (t<sub>P</sub>), which is the time a flip-flop takes to change its output after the clock edge. The time for a high-to-low transition (t<sub>PHL</sub>) is sometimes different from the time for a low-to-high transition (t<sub>PLH</sub>).
 
When cascading flip-flops which share the same clock (as in a [[shift register]]), it is important to ensure that the t<sub>CO</sub> of a preceding flip-flop is longer than the hold time (t<sub>h</sub>) of the following flip-flop, so data present at the input of the succeeding flip-flop is properly "shifted in" following the active edge of the clock. This relationship between t<sub>CO</sub> and t<sub>h</sub> is normally guaranteed if the flip-flops are physically identical. Furthermore, for correct operation, it is easy to verify that the clock period has to be greater than the sum t<sub>su</sub>&nbsp;+&nbsp;t<sub>h</sub>.
 
==Generalizations==
Flip-flops can be generalized in at least two ways: by making them 1-of-N instead of 1-of-2, and by adapting them to logic with more than two states.  In the special cases of 1-of-3 encoding, or multi-valued [[ternary logic]], these elements may be referred to as ''flip-flap-flops''.<ref>Often attributed to [[Don Knuth]] (1969) (see {{cite book| author = Midhat J. Gazalé| title = Number: from Ahmes to Cantor| url = http://books.google.com/?id=WO1gQYIrG24C| year = 2000| publisher = Princeton University Press| isbn = 978-0-691-00515-7| page = 57 }}), the term ''flip-flap-flop'' actually appeared much earlier in the computing literature, for example,
{{cite book
| title = The design and application of a "flip-flap-flop" using tunnel diodes (Master's thesis)
| author = Edward K. Bowdon
| publisher = University of North Dakota
| year = 1960
| url = http://books.google.com/?id=0pA7AAAAMAAJ&q=flip-flap-flop+core&dq=flip-flap-flop+core
}}, and in
{{cite journal
| journal = Electronics and Power
| title = The ternary computer
| author = Alexander, W.
| volume = 10
| issue = 2
| publisher = IET
| pages = 36–39
| date = Feb 1964
| url = http://scholar.google.com/scholar?gcx=c&q=alexander+flip-flap-flop&um=1&ie=UTF-8&hl=en&sa=N&tab=ws
| doi = 10.1049/ep.1964.0037
}}
</ref>
 
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.<ref>{{cite web |url=http://www.goldenmuseum.com/1411FlipFlap_engl.html |title=Ternary "flip-flap-flop"}}</ref>  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.<ref>{{cite patent|US|6975152}}</ref>
 
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.<ref>{{cite journal |title=Flip-Flops for Multiple-Valued Logic
|author=Irving, Thurman A. and Shiva, Sajjan G. and Nagle, H. Troy
|journal=Computers, IEEE Transactions on
|date=March 1976
|volume=C-25
|issue=3
|pages=237–246
|doi=10.1109/TC.1976.5009250}}</ref>  In addition, a multiple-valued clock can also be used, leading to new possible clock transitions.<ref>{{cite journal
|title=Research into ternary edge-triggered JKL flip-flop
|journal=Journal of Electronics (China)
|volume=8
|issue=Volume 8, Number 3 / July, 1991
|doi=10.1007/BF02778378
|year=1991
|pages=268–275
|author=Wu Haomin  and Zhuang Nan}}</ref>
 
==See also==
{{Commons category|Flip-flops}}
* [[Multivibrator]]
* [[Positive feedback]]
* [[Deadlock]]
* [[Pulse transition detector]]
* [[Latching relay]]
* [[Counter]]
 
==References==
{{Reflist|30em}}
 
==External links==
{{wikibooks|Digital Circuits/Flip-Flops}}
* [http://teahlab.com/Multivibrators_FlipFlop/ FlipFlop Hierarchy], shows interactive flipflop circuits.
 
{{DEFAULTSORT:Flip-Flop (Electronics)}}
[[Category:Digital electronics]]
[[Category:Electronic engineering]]
[[Category:Digital systems|Circuit]]
[[Category:Logic gates]]
[[Category:Computer memory]]

Revision as of 18:58, 25 February 2014

My name is Herbert (37 years old) and my hobbies are Disc golf and Tour skating.

Here is my web page :: web directory (www.estetyczna-dermatologia.net)