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.
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)