ChipKraftChipKraft
Start Learning
ChipKraft/Sequential Circuits

DIGITAL ELECTRONICS · STATE & MEMORY

Sequential Circuit Lab

Combinational circuits calculate from their current inputs. Sequential circuits also remember what happened before.

4 flip-flop types

Try it

Set the inputs, then pulse the clock to capture them.

DQQ̅CLK
Q0
Q̅1
CLK01LOW
Waiting for rising edge
Q is 0. Set D, then pulse the clock.

CMOS flip-flop visualizer

Follow D through two clocked latches. The master is transparent during CLK low; the slave transfers its stored value during CLK high.

CLK = 0

Master-to-slave handoff · JK view

MASTERSLAVEJₘKₘQₘQ̅ₘJₛKₛQQ̅SETRESETQQ̅CLK ININVERTER OUTPUT · CLK̅ TO MASTERCLK to slaveQₘ → JₛQ̅ₘ → Kₛ
MASTER LATCHtransparent · CLK̅ = 1SLAVE LATCHhold · CLK = 0INPUT TG · CLK̅INPUT TG · CLKFEEDBACK TG · CLKFEEDBACK TG · CLK̅D0INV AM · MASTER OUTPUTINV BQ0INV MINV SCLKCLK̅LOW PHASE · MASTER TRANSPARENT · SLAVE HOLDING
NMOS PMOS Active path

During CLK low, CLK̅ opens the master input gate while the slave feedback gate holds Q. During CLK high, the master closes and the slave input gate opens. Each transmission gate pairs an NMOS and PMOS; the feedback inverter and gate retain the latch value.

CMOS transistor-level implementation

A static transmission-gate D flip-flop: two complementary MOS switches and two CMOS inverters make each latch. Master and slave share the data path and use opposite clock phases.

CLK = 0
STATIC CMOS MASTER–SLAVE D FLIP-FLOPMASTER ACTIVE · SLAVE HOLDINGCLKCLK̅MASTER LATCH · ENABLED WHEN CLK = 0SLAVE LATCH · ENABLED WHEN CLK = 1DTG INXₘP1N1VDDGNDM = QₘP2N2FₘQₘ → DₛTG INXₛP3N3VDDGNDQP4N4FₛP = PMOS pull-up · N = NMOS pull-down · CLK and CLK̅ drive opposite gates in each transmission-gate pair
PMOS device NMOS device Signal path

The first transmission gate samples D while CLK is low. Its feedback gate closes to retain the master value as the slave opens on CLK high. The paired CMOS inverters restore the logic level and the slave stores the transferred value.

Inside this flip-flop

Follow the input signals through the gates and feedback wires into the selected base cell.

Base cell
D FLIP-FLOPSRBASE FLIP-FLOPS0R1Q0Q̅1

What makes a circuit sequential?

01

It stores a state

The output depends on the current inputs and the value already stored inside the circuit.

02

The clock sets the pace

Flip-flops capture input values on a clock edge, keeping larger circuits in sync.

03

It builds memory

Connect flip-flops together to make registers, counters, and state machines.