Flip-flops are basic digital memory elements used in sequential circuits to store one bit of data. The four primary types of flip-flops are:
### 1. **SR Flip-Flop (Set-Reset Flip-Flop)**
**Functionality**:
- The SR flip-flop has two inputs: **Set (S)** and **Reset (R)**.
- When the **S** input is activated, the output (**Q**) is set to 1.
- When the **R** input is activated, the output is reset to 0.
- If both **S** and **R** are inactive, the flip-flop retains its previous state.
- If both **S** and **R** are activated simultaneously, it results in an undefined state (not allowed in basic SR flip-flops).
**Truth Table**:
| S | R | Q (Next State) | Description |
|---|---|----------------|--------------------|
| 0 | 0 | Retains | No change |
| 0 | 1 | 0 | Reset |
| 1 | 0 | 1 | Set |
| 1 | 1 | Undefined | Invalid condition |
---
### 2. **D Flip-Flop (Data or Delay Flip-Flop)**
**Functionality**:
- The D flip-flop eliminates the undefined state of the SR flip-flop.
- It has a single input **D** (data) and a clock signal.
- The output (**Q**) follows the input **D** only on the triggering edge of the clock signal (positive or negative edge, depending on the design).
- Ensures a one-to-one mapping of input to output at the clock trigger.
**Truth Table**:
| D | Q (Next State) | Description |
|---|----------------|--------------|
| 0 | 0 | Q = D |
| 1 | 1 | Q = D |
---
### 3. **JK Flip-Flop**
**Functionality**:
- The JK flip-flop is an improvement over the SR flip-flop, removing the undefined state.
- It has two inputs: **J** (Set) and **K** (Reset).
- The outputs toggle when both **J** and **K** are active simultaneously, depending on the clock edge.
**Truth Table**:
| J | K | Q (Next State) | Description |
|---|---|----------------|---------------------|
| 0 | 0 | Retains | No change |
| 0 | 1 | 0 | Reset |
| 1 | 0 | 1 | Set |
| 1 | 1 | Toggle | Complements output |
---
### 4. **T Flip-Flop (Toggle Flip-Flop)**
**Functionality**:
- The T flip-flop is a simplified version of the JK flip-flop where both inputs are tied together.
- It has a single input **T** (toggle).
- The output toggles (switches between 0 and 1) when **T** is 1 and a clock edge occurs. If **T** is 0, the output remains the same.
**Truth Table**:
| T | Q (Next State) | Description |
|---|----------------|---------------------|
| 0 | Retains | No change |
| 1 | Toggle | Complements output |
---
### Summary of Characteristics:
| Flip-Flop | Inputs | Unique Feature | Applications |
|-----------|-------------|-------------------------------|----------------------------------------|
| SR | S, R | Simple set/reset behavior | Basic memory elements, latches |
| D | D | Eliminates invalid states | Data storage, shift registers |
| JK | J, K | Toggles without undefined state | Counters, more complex sequential logic |
| T | T | Simplified toggling behavior | Binary counters |
Each type of flip-flop has specific uses in digital systems, depending on the requirements for memory storage, toggling, or state retention.