How does an SR flip-flop work?
Technical Blog / Author: icDirectory United Kingdom / Date: Jun 24, 2024 05:06
An SR flip-flop (Set-Reset flip-flop) is a type of bistable multivibrator, which means it has two stable states and can store one bit of information. It has two inputs, labeled S (Set) and R (Reset), and two outputs, Q and Q' (Q complement). Here's a detailed explanation of how an SR flip-flop works:

## Basic Structure

An SR flip-flop can be constructed using NOR gates or NAND gates. For simplicity, let's first consider the NOR gate implementation.

## NOR Gate Implementation:

1. Inputs: S (Set), R (Reset)
2. Outputs: Q, Q'

The basic circuit of an SR flip-flop using NOR gates looks like this:

```
S R
/
/
NOR NOR
| |
Q Q'
```

## Functionality

The SR flip-flop operates based on the combination of the inputs S and R. Here’s how it behaves for different input conditions:

## 1. Set State (S = 1, R = 0):

- When S = 1 and R = 0, the output Q is set to 1.
- The output Q' will be 0.
- This condition forces the flip-flop to store a logic high (1).

## 2. Reset State (S = 0, R = 1):

- When S = 0 and R = 1, the output Q is reset to 0.
- The output Q' will be 1.
- This condition forces the flip-flop to store a logic low (0).

## 3. No Change State (S = 0, R = 0):

- When both S and R are 0, the flip-flop maintains its previous state.
- If the last state was Q = 1, it remains 1; if it was Q = 0, it remains 0.
- This condition is used to hold or retain the current state of the flip-flop.

## 4. Undefined State (S = 1, R = 1):

- When both S and R are 1, the outputs Q and Q' will both be 0, which contradicts the property of the flip-flop where Q and Q' should always be opposites.
- This creates an invalid or undefined state. In practical circuits, this condition must be avoided.

## Truth Table

Here's a truth table summarizing the behavior of an SR flip-flop:

| S | R | Q (Next State) | Q' (Next State) |
|---|---|----------------|-----------------|
| 0 | 0 | Q (Previous) | Q' (Previous) |
| 0 | 1 | 0 | 1 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | Undefined | Undefined |

## Operation with NOR Gates

In a NOR gate-based SR flip-flop, the cross-coupled structure ensures that each NOR gate's output is fed back into the other gate's input. Here’s the step-by-step operation for setting and resetting:

1. Set Condition (S = 1, R = 0):
- S = 1 sets the input of the first NOR gate to 1 regardless of the feedback from Q', making Q = 0.
- This 0 is fed into the second NOR gate along with R = 0, making Q' = 1.
- Due to feedback, Q' being 1 ensures that the first NOR gate remains at Q = 0, stabilizing the set condition.

2. Reset Condition (S = 0, R = 1):
- R = 1 sets the input of the second NOR gate to 1 regardless of the feedback from Q, making Q' = 0.
- This 0 is fed into the first NOR gate along with S = 0, making Q = 1.
- Due to feedback, Q being 1 ensures that the second NOR gate remains at Q' = 0, stabilizing the reset condition.

3. No Change Condition (S = 0, R = 0):
- Both S and R are 0, the outputs Q and Q' depend on their previous states.
- If previously Q = 1 and Q' = 0, they remain the same.
- If previously Q = 0 and Q' = 1, they remain the same.

4. Undefined Condition (S = 1, R = 1):
- This condition is avoided because it leads to both Q and Q' being 0, which is not valid since Q and Q' should be complements of each other.

## Summary

The SR flip-flop is a simple and fundamental type of flip-flop that stores a single bit of data and changes its state based on the inputs S (Set) and R (Reset). It is primarily used in situations where simple memory storage and control logic are required. However, the undefined state when both inputs are 1 limits its practical use in some applications, leading to the development of more advanced flip-flops like the D and JK flip-flops.

icDirectory United Kingdom | https://www.icdirectory.co.uk/a/blog/how-does-an-sr-flip-flop-work.html
Related Products
74LCX112M
74LCX112M
Fairchild Semiconductor
Date: Jun 02, 2026
74ABT16374BDGG,118
74ABT16374BDGG,118
NXP Semiconductors
Date: Jun 02, 2026
74HCT574D,653
74HCT574D,653
Nexperia
Date: Jun 02, 2026
74LCX112MTCX
74LCX112MTCX
onsemi
Date: Jun 01, 2026
SN74173N
SN74173N
Texas Instruments
Date: Jun 01, 2026
74LCX162374MEA
74LCX162374MEA
Fairchild Semiconductor
Date: Jun 01, 2026
74ABT16273DGG,518
74ABT16273DGG,518
NXP Semiconductors
Date: Jun 01, 2026
SN74ABT162823ADLR
SN74ABT162823ADLR
Texas Instruments
Date: May 31, 2026
74ABT162823ADGGRG4
74ABT162823ADGGRG4
Texas Instruments
Date: May 31, 2026
74ABT16273DGG,512
74ABT16273DGG,512
NXP Semiconductors
Date: May 31, 2026
74LVT16374ADGG,518
74LVT16374ADGG,518
Nexperia
Date: May 31, 2026
MM74HC174MTC
MM74HC174MTC
Fairchild Semiconductor
Date: May 31, 2026
Technical Blog
  • What is the significance of the Q output in a flip-flop?
  • What is the difference between a positive-edge-triggered and a negative-edge-triggered JK flip-flop?
  • What is the purpose of the preset and clear inputs in a flip-flop?
  • How do you design a master-slave D flip-flop using NAND gates?
  • How do you implement a D flip-flop using CMOS technology?
  • How do you implement a D flip-flop using JK flip-flops?
  • What is the difference between a positive-edge-triggered and a negative-edge-triggered D flip-flop?
  • How do you implement a T flip-flop using transmission gates?
  • What is the purpose of the clock enable input in a flip-flop?
  • How do you design a master-slave JK flip-flop using NAND gates?
  • What is the difference between a flip-flop and a latch-based memory element?
  • How do you implement a T flip-flop using CMOS technology?
  • What is the propagation delay in a flip-flop?
  • How do you implement a JK flip-flop using T flip-flops?
  • What is a flip-flop in digital electronics?
  • How do you design a master-slave JK flip-flop using NOR gates?
  • How do you implement a T flip-flop using NOR gates?
  • How do you design a master-slave D flip-flop using NOR gates?
  • How do you design a master-slave T flip-flop using NAND gates?
  • What is the difference between a flip-flop and a latch-based flip-flop?
  • What is the difference between a JK flip-flop and a T flip-flop?
  • How do you implement a JK flip-flop using transmission gates?
  • How do you implement a T flip-flop using JK flip-flops?
  • How do you implement a D flip-flop using transmission gates?
  • What is the difference between a flip-flop and a latch-based counter?
  • How do you design a master-slave T flip-flop using NOR gates?
  • How do you implement a JK flip-flop using CMOS technology?
  • What is the setup time and hold time in a flip-flop?
  • How do you implement a JK flip-flop using NAND gates?
  • What is the race-around condition in a JK flip-flop?