Skip to content
๐Ÿ“š Combinational vs Sequential Circuits

๐Ÿ“š Combinational vs Sequential Circuits

Understanding the difference between combinational and sequential circuits is foundational to designing reliable, audit-ready hardware systems. This note breaks down both styles with annotated clarity.


๐Ÿ”Œ Combinational Circuits

Definition: Circuits whose outputs depend only on current inputsโ€”no memory, no timing.

assign y = a & b;

Behavior

  • Output updates instantly when inputs change.
  • No concept of time or history.

โœ… Characteristics

  • Stateless: no internal memory.
  • Timing-independent: output changes as soon as inputs do.
  • Used for: logic gates, multiplexers, decoders, ALUs.

๐Ÿ“Œ Notes

  • Can be written using assign or always @(*).
  • Ideal for pure logic transformations.
  • Cannot model behavior that depends on past inputs.

โฑ๏ธ Sequential Circuits

Definition: Circuits whose outputs depend on current inputs and past statesโ€”they store values across time.

reg [3:0] counter;
always @(posedge clk) begin
    counter <= counter + 1;
end

Behavior

  • Output updates only on clock edge or triggering event
  • Stores internal state using flip-flops or latches

โœ… Characteristics

  • Stateful: remembers past values.
  • Timing-dependent: reacts to clock or control signals.
  • Used for: FSMs, counters, registers, pipelines.

๐Ÿ“Œ Notes

  • Requires reg and clocked always blocks.
  • Enables modeling of time-aware systems.
  • Essential for control flow, synchronization, and data retention.

๐Ÿงช Comparison Table

FeatureCombinational CircuitSequential Circuit
Depends onCurrent inputs onlyInputs + stored state
TimingInstantaneousClocked or event-driven
MemoryโŒ Noneโœ… Flip-flops, latches
Syntaxassign, always @(*)always @(posedge clk)
Use caseLogic gates, ALUsFSMs, counters, registers
State retentionโŒ Noโœ… Yes

๐Ÿงญ When to Use Each

Use combinational circuits when:

  • You need pure logic transformations.
  • Output should reflect inputs immediately.
  • No history or timing is involved.

Use sequential circuits when:

  • You need to store or remember values.
  • Behavior depends on clock cycles or control signals.
  • You’re building FSMs, counters, or pipelines.

๐Ÿงฐ Vault Notes

Rule of Thumb If your circuit needs memory or timing, it’s sequential.
If itโ€™s just logic transformation, itโ€™s combinational.

โ„น๏ธ

Combinational Decoder

reg [3:0] out;
always @(*) begin
    case (in)
        2'b00: out = 4'b0001;
        2'b01: out = 4'b0010;
        2'b10: out = 4'b0100;
        2'b11: out = 4'b1000;
    endcase
end
โ„น๏ธ

Sequential Counter

reg [3:0] count;
always @(posedge clk) begin
    if (rst)
        count <= 0;
    else
        count <= count + 1;
end
โš ๏ธ
Common Mistake Donโ€™t use combinational logic to model behavior that depends on time or historyโ€”it will fail in synthesis or simulation.
Last updated on