C71 of 57
0 XP
  1. Hook
  2. Play
  3. Predict
  4. Name it
  5. Check
  6. Explain

C7 · Lesson 1 · Logic levels

How a continuous voltage becomes a clean 0 or 1

Digital circuits are analog circuits that agree to ignore most of the voltage range. Anything near ground means 0, anything near the supply means 1, and the region in between is forbidden. Every logic gate restores signals as they pass through it: a slightly degraded 1 goes in, a crisp 1 comes out. The gap between what a gate guarantees to output and what the next gate needs to see is the noise margin, and it's why digital signals survive noise that would ruin an analog one.

Play

  • The curve is an inverter's output voltage against its input voltage. Its steep middle is where it amplifies; the flat ends are where it saturates.
  • The markers are VIL and VIH, where the curve's slope is −1: inputs below VIL count as 0, above VIH as 1.
  • Make the gain steeper. What happens to the forbidden region and the noise margins?

Predict

A 3.3 V CMOS chip's output, guaranteed to be at least 2.4 V when high, drives a 5 V CMOS input that needs at least 3.5 V to read 1. Will it work reliably?

Name it

Logic levels

Four numbers define a logic family:

  • VOH, the lowest voltage an output guarantees for a 1;
  • VOL, the highest it guarantees for a 0;
  • VIH, the lowest voltage an input promises to read as 1;
  • VIL, the highest it promises to read as 0.

Between VIL and VIH is the forbidden region.

Noise margins are how much noise can be added before a valid output becomes an invalid input:

NMH=VOH−VIHNML=VIL−VOL

From the transfer curve. VIL and VIH are conventionally the input voltages where the inverter's slope is −1; beyond them, a change at the input is shrunk at the output. That shrinking is what restores logic levels at each stage: a gain greater than 1 in the middle and less than 1 at the ends.

Common families:

FamilyVOHVOLVIHVIL
5 V TTL2.4 V0.4 V2.0 V0.8 V
CMOS (supply VDD)near VDDnear 00.7VDD0.3VDD
3.3 V LVCMOS2.4 V0.4 V2.0 V0.8 V

Why it works. An analog signal accumulates noise at every stage. A digital one is cleaned up at every gate, as long as the noise stays within the margins.

Worked example

A logic family guarantees VOH = 2.4 V and VOL = 0.4 V, and its inputs accept VIH = 2.0 V and VIL = 0.8 V. Find its noise margins.

Show the solution
  1. High noise margin. NMH=VOH−VIH=2.4−2.0=0.4V
  2. Low noise margin. NML=VIL−VOL=0.8−0.4=0.4V
  3. What that means. Any noise smaller than 0.4 V on a wire between two gates can't flip a bit.

Answer both noise margins are 0.4 V.

Worked example

A 3.3 V chip whose high output is guaranteed to be 2.9 V drives a 5 V CMOS input. Will it work?

Show the solution
  1. The 5 V input's threshold. VIH=0.7×5V=3.5V
  2. High noise margin. NMH=2.9−3.5=−0.6V so a 1 may not be read as 1.
  3. The fix. A level shifter, or a 5 V input that accepts lower thresholds, is needed.

Answer no. The high noise margin is −0.6 V, so it needs a level shifter or a 5 V input that accepts lower thresholds.

Worked example

A CMOS output with about 50 Ω of on-resistance drives 10 pF of wiring plus some number of inputs at 5 pF each. How many inputs can it drive before its 50% delay exceeds 5 ns?

Show the solution
  1. Set up the delay. The output charges the total capacitance C=(10+5N) pF through its on-resistance, and an RC step reaches 50% after 0.69RC: 0.69×50Ω×C≤5ns
  2. Solve for the capacitance. C≤5ns0.69×50Ω=144.93pF
  3. Solve for N. 10+5N≤144.93N≤26.99 so N ≤ 26.
  4. What sets the limit. CMOS inputs draw no DC current, so the static fan-out is unlimited; it's the capacitance, and with it the delay, that limits how many inputs one output should drive.

Answer up to 26 inputs.

Check

An output guarantees VOH = 2.7 V; the input it drives needs VIH = 2 V. What's the high noise margin?

Write units the way you normally would: 1.5 V, 1500 mV and 0.0015 kV are the same answer.

Check

An input reads anything below VIL = 0.8 V as 0; the output driving it guarantees VOL = 0.2 V. What's the low noise margin?

Write units the way you normally would: 1.5 V, 1500 mV and 0.0015 kV are the same answer.

Check

A CMOS input runs from a 3.3 V supply. Using the usual 70% rule, what's its VIH?

Write units the way you normally would: 1.5 V, 1500 mV and 0.0015 kV are the same answer.

Check

A 2.9 V output (its guaranteed high) drives a 5 V CMOS input. Will a 1 always read as 1? Enter 1 for yes, 0 for no.

Check

Why does a chain of logic gates restore a degraded signal instead of letting noise build up?

Check

A CMOS output of 50 Ω drives 5 pF of wiring plus N inputs of 5 pF each, and must keep its 50% delay under 10 ns.

(a)

What's the delay with no inputs at all?

Write units the way you normally would: 1.5 ns, 1500 ps and 0.0015 µs are the same answer.

(b)

What's the largest N, before rounding down?

Check

A logic family guarantees VOH = H and VOL = L, and its inputs need VIH = h and VIL = l.

Step 1

What's the high noise margin?

Type it the way you would write it, like 3sin(2πft) or 3*sin(2*pi*f*t). Angles can be in radians or carry a degree sign, like 45°.

Explain why

Why do digital signals tolerate noise that would corrupt an analog signal?

Practice

Keep practicing

8 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.