ArticleslgStudy

computer science

Flip-flop (electronics)

Flip-flop (electronics) is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Flip-flop (electronics) rather than just read about it. In short: In electronics, flip-flops and latches are circuits that have two stable states that can store state information – a bistable multivibrator. The circuit can be made to change state by signals applied to one or more control inputs and will output its state (often along with its logical complement).

Flip-flop (electronics) — main illustration
Flip-flop (electronics) — illustration

Key takeaways

  • Flip-flop (electronics) belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Flip-flop (electronics) to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Flip-flop (electronics) from memory before moving on to harder problems.

Reference excerpt

In electronics, flip-flops and latches are circuits that have two stable states that can store state information – a bistable multivibrator. The circuit can be made to change state by signals applied to one or more control inputs and will output its state (often along with its logical complement). It is the basic storage element in sequential logic. Flip-flops and latches are fundamental building blocks of digital electronics systems used in computers, communications, and many other types of systems. Flip-flops and latches are used as data storage elements to store a single bit (binary digit) of data; one of its two states represents a one and the other represents a zero. Such data storage can be used for storage of state, and such a circuit is described as sequential logic in electronics. They are foundational elements of counters and other finite-state machines, and also used to synchronize variably-timed input signals to reference timing signals. The term flip-flop has historically referred generically to both level-triggered (asynchronous, transparent, or opaque) and edge-triggered (synchronous, or clocked) circuits that store a single bit of data using gates. Modern authors reserve the term flip-flop exclusively for edge-triggered storage elements and latches for level-triggered ones. The terms edge-triggered, and level-triggered may be used to avoid ambiguity. When a level-triggered latch is enabled, it becomes transparent, but an edge-triggered flip-flop's output only changes on a clock edge (either positive going or negative going). Different types of flip-flops and latches are available as integrated circuits, usually with multiple elements per chip. For example, 74HC75 is a quadruple transparent latch in the 7400 series. Low power flip-flops are designed for low-power electronics.

History

The first electronic latch was invented in 1918 by the British physicists William Eccles and F. W. Jordan. It was initially called the Eccles–Jordan trigger circuit and consisted of two active elements (vacuum tubes). The design was used in the 1943 British Colossus codebreaking computer and such circuits and their transistorized versions were common in computers even after the introduction of integrated circuits, though latches and flip-flops made from logic gates are also common now. Early latches were known variously as trigger circuits or multivibrators. According to P. L. Lindley, an engineer at the US Jet Propulsion Laboratory, the flip-flop types detailed below (SR, 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. Lindley was at the time working at Hughes Aircraft under Eldred Nelson, who had coined the term JK for a flip-flop which changed states when both inputs were on (a logical one). 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 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, 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.

Implementation

Transparent or asynchronous latches can be built around a single 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 flip-flops 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 either to change or to 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).

Types Flip-flops and latches can be divided into common types: SR (set-reset), D (data), T (toggle), and JK (see History section above). The behavior of a particular type can be described by the characteristic equation that derives the next output (Qnext) in terms of the input signal(s) and/or the current output, Q.

Asynchronous set-reset latches When using static gates as building blocks, the most fundamental latch is the asynchronous set-reset (SR) latch. Its two inputs S and R can set the internal state to 1 using the combination S=1 and R=0, and can reset the internal state to 0 using the combination S=0 and R=1. The SR latch can be constructed from a pair of cross-coupled NOR or NAND logic gates. The stored bit is present on the output marked Q. It is convenient to think of NAND, NOR, AND and OR as controlled operations, where one input is chosen as the control input set and the other bit as the input to be processed depending on the state of the control. Then, all of these gates have one control value that ignores the input (x) and outputs a constant value, while the other control value lets the input pass (maybe complemented):

NAND⁡(x,0)=1NAND⁡(x,1)=x¯NOR⁡(x,0)=x¯NOR⁡(x,1)=0AND⁡(x,0)=0AND⁡(x,1)=xOR⁡(x,0)=xOR⁡(x,1)=1 Essentially, they can all be used as switches that either set a specific value or let an input value pass.

SR NOR latch

… excerpt ends here. Continue reading the full article.

Illustrations

Flip-flop (electronics): An SR latch (R1, R2 = 1 kΩ; R3, R4 = 10 kΩ)
An SR latch (R1, R2 = 1 kΩ; R3, R4 = 10 kΩ)
Flip-flop (electronics): Schematics from the Eccles and Jordan trigger relay patent filed 1918, one drawn as a cascade of amplifiers with a positive feedback path, and the other as a symmetric cross-coupled pair
Schematics from the Eccles and Jordan trigger relay patent filed 1918, one drawn as a cascade of amplifiers with a positive feedback path, and the other as a symmetric cross-coupled pair
Flip-flop (electronics): A transparent latch circuit based on bipolar junction transistors
A transparent latch circuit based on bipolar junction transistors
Flip-flop (electronics): An animation of an SR latch, constructed from a pair of cross-coupled NOR gates. Red and black mean logical '1' and '0', respectively.
An animation of an SR latch, constructed from a pair of cross-coupled NOR gates. Red and black mean logical '1' and '0', respectively.
Flip-flop (electronics): An animated SR latch. Black and white mean logical '1' and '0', respectively.S = 1, R = 0: SetS = 0, R = 0: HoldS = 0, R = 1: ResetS = 1, R = 1: Not allowed
Transitioning from the restricted combination (D) to (A) leads to an unstable state.
An animated SR latch. Black and white mean logical '1' and '0', respectively.S = 1, R = 0: SetS = 0, R = 0: HoldS = 0, R = 1: ResetS = 1, R = 1: Not allowed Transitioning from the restricted combination (D) to (A) leads to an unstable state.

Worked examples

Example 1 — a first encounter with Flip-flop (electronics)

Start with the simplest possible case. Write down what Flip-flop (electronics) claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Flip-flop (electronics) before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Flip-flop (electronics) ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Flip-flop (electronics)

In research
Flip-flop (electronics) appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Flip-flop (electronics) in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Flip-flop (electronics) is common in secondary-school and first-year university syllabi. It links to neighbouring topics Computer-related introductions in 1918, Computer memory, Digital electronics, so understanding it makes those chapters shorter.
In everyday life
Look for Flip-flop (electronics) outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Flip-flop (electronics)” →

How to study Flip-flop (electronics) in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Flip-flop (electronics) means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Flip-flop (electronics) out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Flip-flop (electronics) in simple terms?

In electronics, flip-flops and latches are circuits that have two stable states that can store state information – a bistable multivibrator. The circuit can be made to change state by signals applied to one or more control inputs and will output its state (often along with its logical complement).

Why does Flip-flop (electronics) matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Flip-flop (electronics)?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Flip-flop (electronics).

Tags

  • Computer-related introductions in 1918
  • Computer memory
  • Digital electronics
  • Digital systems
  • Electronic engineering
  • Logic gates

Keep exploring