Skip to main content

Sequential Logic - Logic With Memory


💡 What Is Sequential Logic?​

Sequential logic circuits are circuits where the output depends on both the current inputs and the past history. They have memory and remember their previous state!

Think of it like a traffic light: it changes based on current sensor inputs, but also remembers its current state (green/yellow/red).


🔄 Key Concepts​

State​

The state represents what the circuit "remembers". It's the internal configuration of the circuit.

Clock​

Most sequential circuits use a clock signal - a regular, periodic square wave that synchronizes the circuit's operations.

Synchronous vs Asynchronous​

  • Synchronous: Changes only on clock signal edges
  • Asynchronous: Can change at any time, independent of clock

🔧 Basic Sequential Elements​

SR Latch (Set-Reset)​

The simplest sequential circuit. It has two inputs:

  • S (Set): Makes output Q = 1
  • R (Reset): Makes output Q = 0

Gated SR Latch​

Adds an enable input to control when changes can occur.

D Latch​

A simpler latch that has a single D (data) input. When enabled, Q follows D.

Edge-Triggered Flip-Flops​

Circuits that change state only on a clock edge (rising or falling).


📊 Two Types of Sequential Circuits​

Mealy Machine​

Output depends on current state and current input.

Moore Machine​

Output depends only on the current state.

Professional Explanation

The key difference between combinational and sequential logic is feedback. Sequential circuits have feedback paths where outputs (or internal states) feed back into the inputs. This creates memory!

The clock signal is crucial for synchronizing changes. In synchronous circuits, all changes happen on the clock edge, preventing race conditions.


🎓 Classroom Example​

A Simple Counter:

A counter is a classic sequential circuit that cycles through a sequence of states.

  • 3-bit counter: 8 possible states (000 → 001 → 010 → ... → 111 → 000)
  • Rising edge trigger: Changes state when clock goes from 0 to 1
  • Output: Binary count that increments with each clock pulse

This demonstrates how sequential logic can remember and update its state over time!


💡 Summary​

  • Sequential logic: Output depends on current inputs and past state
  • Has memory: Remembers previous state through feedback
  • Key elements: Latches, flip-flops, state
  • Timing: Clock signals synchronize operations
  • Two types: Mealy (output depends on state+input) and Moore (output depends on state)