Skip to main content

Digital Logic

Learning Targets​

  • Situation: A changing logic voltage reaching a register near its clock edge.
  • Targets: Valid levels, Boolean functions, stored state and timing.
  • Convention: Boolean multiplication as AND, + as OR, overbar as NOT.

Levels and Functions​

  • Input thresholds: Guaranteed low at or below VIL,maxV_{\mathrm{IL,max}}; high at or above VIH,minV_{\mathrm{IH,min}}.
  • Undefined band: Intermediate input voltage without a guaranteed logic interpretation.
  • Noise margins: NML=VIL,max−VOL,maxNM_L=V_{\mathrm{IL,max}}-V_{\mathrm{OL,max}}, NMH=VOH,min−VIH,minNM_H=V_{\mathrm{OH,min}}-V_{\mathrm{IH,min}}.
  • Example: Output low/high limits 0.2/2.9 V, receiver thresholds 0.8/2.0 V → margins 0.6/0.9 V.
  • Unused inputs: Defined valid levels; no floating CMOS input.
  • Multiplexer: Y=S‾A+SBY=\overline SA+SB; A for S = 0, B for S = 1.
  • Half-adder: Sum A⊕BA\oplus B, carry AB.
  • Full-adder: Sum A⊕B⊕CA\oplus B\oplus C, carry AB+C(A⊕B)AB+C(A\oplus B).
  • De Morgan: AB‾=A‾+B‾\overline{AB}=\overline A+\overline B.
  • Hazard: Temporary glitch from unequal delays; settled truth table insufficient.
Guaranteed input and output voltage bands beside a D flip-flop timing diagram showing setup, hold, propagation delay and clock edges
Figure 1. Guaranteed input and output voltage bands beside a D flip-flop timing diagram showing setup, hold, propagation delay and clock edges.

State and Timing​

  • Latch: Transparent during its enable interval.
  • D flip-flop: Edge sampling followed by clock-to-Q delay.
  • Four-bit counter: (Q+1) mod 16(Q+1)\bmod16; explicit reset state.
  • Setup: Data stability before the edge; hold after the edge.
  • Period budget: T≥tCQ,max+tlogic,max+tsetup+tmarginT\ge t_{\mathrm{CQ,max}}+t_{\mathrm{logic,max}}+t_{\mathrm{setup}}+t_{\mathrm{margin}}.
  • Example: 2 + 3 + 1 + 0.5 ns → 6.5 ns minimum period, about 154 MHz.
  • Hold: Minimum-delay constraint; no general repair by slowing the clock.
  • Reset: Asynchronous release subject to recovery/removal timing.

Asynchronous Inputs and Power​

  • Metastability: Uncertain resolution time near a sampling transition.
  • Single-bit synchronizer: Additional resolution time; lower failure probability, not zero probability.
  • Narrow pulse: Possible complete miss; toggle/handshake for event transfer.
  • Multi-bit word: Coherent transfer protocol or FIFO; independent bit synchronizers insufficient.
  • Debounce: Contact-transition filtering; separate from synchronization.
  • CMOS dynamic power: P≈αCLVDD2fP\approx\alpha C_LV_{DD}^2f; αf\alpha f as low-to-high events per second.
  • Example: 10 pF, 3.3 V, 10 MHz, α = 1 → 1.089 mW, excluding internal/leakage losses.
  • Supply path: Local bypass and short return; transient rail dips despite a correct DMM average.

Practice​

  • Preparation: Logic simulator; gate-built multiplexer and resettable four-bit counter; ideal 1 MHz clock.
  • Prediction: Eight selector vectors and sixteen-edge wraparound.
  • Execution: Settled selector readings; twenty counter edges; unequal-delay experiment; narrow-pulse phase variation.
  • Observation: Boolean simulation distinct from measured voltage.
TestExpected behaviorSimulation / timing
S = 0A selected—
S = 1B selected—
Sixteen counter edgesReturn to zero—
Narrow pulsePossible miss—
  • Optional extension: Device-specific physical threshold checks.
  • Carry forward: Truth table, state trace and timing budget.

Exercises​

  1. NAND: Output for A = B = 1.
  2. Selector: Output for S = 1, A = 0, B = 1.
  3. Counter: State after eighteen edges from four-bit zero.
  4. Timing: Minimum period for 1 ns clock-to-Q, 4 ns logic, 1 ns setup, 1 ns margin.
  5. Synchronization: Sufficiency of separate synchronizers for a changing eight-bit word.
Answers and reasoning
  1. Answer: 0.
  2. Answer: 1; B selected.
  3. Answer: 0010.
  4. Answer: 7 ns; about 142.9 MHz upper estimate.
  5. Answer: Insufficient for coherent words; handshake or appropriate FIFO transfer.

Continue​

Reference​

  • Reading: Paul Horowitz and Winfield Hill, The Art of Electronics, third edition, Chapter 10.
  • Lesson material: Original explanations, calculation examples and exercises; reference sections for further study.