Source

Adapted from my own handwritten and hand-typed notes from Year 1 to Year 3 of my EEE degree

Combinational vs Sequential

A combinational circuit's outputs depend only on the present inputs. A sequential circuit's outputs depend on present and past inputs, so it needs memory (storage elements) fed back into combinational logic.

Storage elements:

  • latch: checks its inputs continuously and changes output whenever the inputs change
  • flip-flop: has a clock input and only changes output when triggered by the clock

Feedback and Memory

An inverter ring shows where memory comes from:

  • an odd number of inverters in a ring oscillates, with where is one inverter delay
  • an even number is bistable: it settles in one of two stable states, which is a primitive memory, but there is no input to control which state

Replacing the inverters with NAND or NOR gates adds inputs that set the stored value. This is the basic binary cell (SR latch), which stores one bit.

Operating conditions:

  • set: store a 1 ()
  • reset: store a 0 ()
  • rest (hold): keep the present state

NOR SR Latch

Cross-coupled NOR gates with active-high inputs and .

Mode
1010set
00rest
0101reset
1100not allowed

forces both outputs low, which contradicts . If both inputs are then released together, the final state depends on which gate is faster (a race), so it is unpredictable.

NAND SR Latch

Cross-coupled NAND gates with active-low inputs and .

Mode
0110set
11rest
1001reset
0011not allowed

Main difference: the dominant (asserting) input level is 1 for the NOR latch and 0 for the NAND latch.

Timing

For a NOR latch, when goes from 0 to 1:

  • falls first, after one gate delay through the gate driving (, S to Q')
  • then rises after a second gate delay (, S to Q is two gate delays)
  • resetting is the mirror image: falls first and rises one gate delay later

Here is the delay from an input change to a high-to-low output change and is for a low-to-high output change. Adding a clock to this cell gives the clocked circuits in Flip-Flop Types and Tables.