1 of 14

Digital Logic Designs

Lecture # 5

Flip-Flops and Latches

2 of 14

Latches and Flip-Flops

  • Digital electronics are at the heart of modern electronics, dealing with binary numbers (0s and 1s). Key components in these systems are Flip-Flops and Latches, which are used to store binary data.
  • Latches and Flip-Flops are types of memory devices.
  • Both can store one bit of data, meaning they can hold a value of either 0 or 1.
  • They control how data is stored and when it can be changed, which is crucial for digital logic circuits, such as computers and controllers.

3 of 14

Latches

A Latch is a simple storage device that keeps track of data. Unlike a flip-flop, it is sensitive to the level of the input signal. The output can change any time the input is active.

  • Types of Latches
  • SR Latch (Set-Reset Latch)
  • D Latch (Data Latch)

4 of 14

SR Latch

  • SR Latch (Set-Reset Latch)**
  • Inputs: Set (S) and Reset (R)
  • Outputs: Q (Stored Value) and \(\overline{Q}\) (Inverted Value)
  • Working of SR Latch
  • Set Condition (S = 1, R = 0): The latch sets the output Q to 1.
  • Reset Condition (S = 0, R = 1): The latch resets the output Q to 0.
  • Hold Condition (S = 0, R = 0): Q maintains its current state.
  • Invalid Condition (S = 1, R = 1):This state is undefined (not allowed).

5 of 14

SR Latch Using Gates

6 of 14

D Latch (Data Latch)

  • D Latch (Data Latch)
  • The D Latch is a more advanced type that has a single data input.

  • Input: Data (D) and Enable (E)
  • Output: Q

Working of D Latch

  • When E (Enable) is 1, Q takes the value of D.
  • When E is 0, Q holds its last value.

7 of 14

8 of 14

Flip-Flops

  • A Flip-Flop is more sophisticated than a latch. It changes its output only at specific moments, typically related to a clock signal. This makes it synchronous.

Types of Flip-Flops

  • SR Flip-Flop
  • D Flip-Flop
  • J-K Flip-Flop
  • T Flip-Flop

9 of 14

SR Flip-Flop

  • Similar to SR Latch but incorporates a clock input (C).
  • Inputs: Set (S), Reset (R), and Clock (C)

Working of SR Flip-Flop

  • The outputs change only on a specific edge (rising or falling) of the clock signal. This prevents confusion from changing inputs during operation.

10 of 14

D Flip-Flop

  • The D Flip-Flop only has one input for data.

  • Input: Data (D) and Clock (C)
  • Output: Q

 

Working of D Flip-Flop

  • On the rising edge of the clock signal, the output Q captures the value of D.

11 of 14

J-K Flip-Flop

  • The J-K Flip-Flop improves on the SR Flip-Flop by eliminating the invalid state.

  • Inputs: J, K, and Clock (C)

Working of J-K Flip-Flop

  • J = 1, K = 0: Set Q to 1.
  • J = 0, K = 1: Reset Q to 0.
  • J = 1, K = 1: Toggle the output (if it was 0, change it to 1, and vice versa).

12 of 14

T Flip-Flop

  • A T Flip-Flop is a simplified version of the J-K Flip-Flop.

  • Input: Toggle (T) and Clock (C)

 

Working of T Flip-Flop

  • When T = 1, the output toggles with each clock pulse. If T = 0, the output remains the same.

13 of 14

Applications of Latches and Flip-Flops

Latches and Flip-Flops form the basis for a variety of applications in digital circuits:

  • Memory elements in computers and electronic devices.
  • Data storage in registers within CPUs.
  • Counters for counting events (like clock cycles).
  • Finite State Machines for controlling systems (like traffic lights).
  • Shift Registers for data movement in digital communications.

14 of 14

The End