Activity 1.2.3

Logic Levels & Digital Signals

Logic LevelsHIGHLOWTTL

Learn about voltage thresholds that define digital HIGH and LOW states, calculate noise margins for TTL and CMOS gates, and analyze pulse characteristics like rise time and duty cycle.

0 of 0

Logic levels are specific voltage ranges that digital circuits use to represent binary values (1s and 0s).

What Are Logic Levels?

In digital electronics, transistors function as electronic switches. Instead of processing raw analog values, they represent information using two distinct logical states. Rather than expecting a single exact voltage, digital devices use voltage ranges to define these states.

Logic State Binary Value Typical Voltages Description
HIGH 1 +5.0V or +3.3V Signal is present; circuit switch is closed/active.
LOW 0 0.0V (Ground) Signal is absent; circuit switch is open/inactive.

Why Do We Use Voltage Ranges?

If digital circuits expected exactly 5.0V for HIGH and exactly 0.0V for LOW, they would constantly fail. Digital circuits rely on ranges for three reasons:

  • Consistency: Ensures different chips in a system agree on logic states.
  • Noise Immunity: Prevents small fluctuations in voltage from corrupting the logical value.
  • Manufacturing Tolerances: Accounts for physical variations in silicon fabrication and resistance across wires.

Why do digital circuits use a range of voltages for HIGH and LOW instead of single exact voltages?

Real-world components have manufacturing variances, wiring resistance causes small voltage drops, and electromagnetic interference introduces noise. Defining voltage ranges ensures that a HIGH state is successfully received even if the voltage drops or spikes slightly.

Different semiconductor technologies have distinct voltage standards. The two main families are TTL (bipolar transistors) and CMOS (field-effect transistors).

Comparing Logic Standards

A logic family defines four critical threshold voltages. Notice how TTL uses fixed thresholds, while classic 5V CMOS thresholds are ratiometric (defined as 70% and 30% of supply voltage VCC):

  • VOH (Output HIGH): The minimum voltage an output gate guarantees to output for a 1.
  • VOL (Output LOW): The maximum voltage an output gate guarantees to output for a 0.
  • VIH (Input HIGH): The minimum voltage an input gate guarantees to recognize as a 1.
  • VIL (Input LOW): The maximum voltage an input gate guarantees to recognize as a 0.

Threshold & Noise Margin Simulator

Use the simulator below to compare standard TTL thresholds with CMOS thresholds. Drag the voltage slider to see how input receivers interpret the voltage, and notice the undefined transitional zone.

📊 Logic Levels & Noise Margin Simulator

Explore input/output thresholds and calculate noise margins.

Transistor-Transistor Logic standard. Note the wide undefined region and asymmetrical thresholds.

Interactive Gauge
5.0V -
2.4V (VOH) -
2.0V (VIH) -
0.8V (VIL) -
0.4V (VOL) -
0.0V -
2.50 V
Input Voltage (Vin)2.50 V
0.0V5.0V (Supply)5.5V (Max)
Input Receiver State
Receiver Reads
Logic 1 (HIGH)
Region analysis: Guaranteed HIGH Output: An output driver will output a voltage in this range (above VOH = 2.4V) to represent a HIGH state.
🧮 Noise Margin Safety Buffer
HIGH Noise Margin (NMH)0.40 V

Maximum noise allowed on a HIGH signal before it becomes undefined.

NMH = VOH(min) - VIH(min)
NMH = 2.4V - 2.0V = 0.40V
LOW Noise Margin (NML)0.40 V

Maximum noise allowed on a LOW signal before it becomes undefined.

NML = VIL(max) - VOL(max)
NML = 0.8V - 0.4V = 0.40V

What is the minimum voltage guaranteed to be produced by a TTL output driver in the HIGH state?

The minimum guaranteed output HIGH voltage for TTL is VOH = 2.4V. This voltage is intentionally higher than the minimum input HIGH threshold (VIH = 2.0V) to create a noise margin cushion.

Noise margin is the safety buffer voltage that prevents electromagnetic noise from corrupting digital states.

Calculating Noise Margin

Noise margins are calculated separately for the HIGH and LOW states using the differences between output guarantees and input requirements:

HIGH Noise Margin (NMH):
  NMH = VOH - VIH
  TTL example: 2.4V - 2.0V = 0.4V

LOW Noise Margin (NML):
  NML = VIL - VOL
  TTL example: 0.8V - 0.4V = 0.4V

Why Digital is Noise-Resistant

Imagine a digital wire routing a HIGH state from a TTL gate. The driver guarantees a minimum of 2.4V. As it travels down the line, nearby AC wiring induces 0.3V of negative noise. The receiver sees 2.1V. Since 2.1V is still above the VIH minimum input threshold of 2.0V, the receiver successfully reads a clear HIGH! The noise has zero impact on the logical state.

Key Insight: Digital signals are noise-resistant because thresholds create a buffer zone. As long as noise spikes do not push the voltage into the Undefined transition zone (between VIL and VIH), the data remains clean. This is the core advantage of digital signals over analog signals.

If a logic gate has V<sub>IL</sub> = 1.0V and V<sub>OL</sub> = 0.3V, what is its LOW noise margin?

The LOW noise margin is calculated as:
NML = VIL - VOL
NML = 1.0V - 0.3V = 0.7V.
This means the circuit can tolerate up to 0.7V of noise on a LOW signal without causing errors.

Digital signals are represented by pulses that switch rapidly between HIGH and LOW states, forming a square wave.

Transition Times

No signal can change voltage instantaneously; it takes time for charge to build up or drain away. We measure these transitions using rise and fall times:

  • Rise Time (tr): The time it takes for a signal to transition from 10% to 90% of its final amplitude.
  • Fall Time (tf): The time it takes for a signal to transition from 90% to 10% of its final amplitude.

Pulse Parameters

When analyzing a repeating square wave pulse, we look at several standard dimensions:

Parameter Symbol Definition
Amplitude A The peak voltage difference between the LOW and HIGH states.
Pulse Width PW The duration of the HIGH portion of a single pulse cycle.
Period T The total time required to complete one full cycle (HIGH time + LOW time).
Frequency f The number of complete cycles per second, measured in Hertz (1 Hz = 1/sec).
Duty Cycle D The percentage of the total period during which the signal is active (HIGH).

Why are rise time and fall time measured between 10% and 90% of the wave's height rather than 0% and 100%?

The edges of digital pulses are rounded due to capacitance and inductance in the circuit. Measuring from exactly 0% to 100% would include unstable settling time (ringing) at the top and bottom. The 10% to 90% range offers a highly consistent and repeatable measure of transition speed.

Digital waveforms can be analyzed mathematically using formulas for Period, Frequency, and Duty Cycle.

Governing Formulas

Period (T)
T = 1 / f
Units: Seconds (s, ms, µs)
Frequency (f)
f = 1 / T
Units: Hertz (Hz, kHz, MHz)
Duty Cycle (D)
D = (PW / T) × 100%
Units: Percentage (%)

Worked Examples

Example 1 (Period): A clock signal has a frequency of 1 kHz (1000 Hz). What is its period?

T = 1 / f = 1 / 1000 Hz = 0.001 s = 1 ms (millisecond)

Example 2 (Frequency): A pulse train has a period of 20 ms. What is its frequency?

f = 1 / T = 1 / 0.020 s = 50 Hz

Example 3 (Duty Cycle): A clock has a period T of 100 µs and stays HIGH (PW) for 30 µs. What is its duty cycle?

D = (PW / T) × 100% = (30 µs / 100 µs) × 100% = 30%

Practice Problems

1. Calculate the HIGH and LOW noise margins for a gate where V<sub>OH</sub> = 3.5V, V<sub>OL</sub> = 0.2V, V<sub>IH</sub> = 2.0V, and V<sub>IL</sub> = 0.8V.

NMH = VOH - VIH = 3.5V - 2.0V = 1.5V
NML = VIL - VOL = 0.8V - 0.2V = 0.6V

This chip has a significantly wider noise margin than standard TTL!

2. A clock signal has a frequency of 10 kHz and a duty cycle of 60%. Find the period and the active HIGH time (pulse width).

1. Period (T):
T = 1 / f = 1 / 10,000 Hz = 0.0001 seconds = 100 µs (microseconds)

2. Pulse Width (PW):
D = (PW / T) × 100%
60% = (PW / 100 µs) × 100%
PW = 0.60 × 100 µs = 60 µs

3. An oscilloscope shows a digital pulse that goes from 0V to 5V. It stays at 5V for 25 ms, and stays at 0V for 15 ms. Identify the Amplitude, Period, Frequency, and Duty Cycle.

1. Amplitude: Peak HIGH - Peak LOW = 5V - 0V = 5V
2. Period (T): HIGH time + LOW time = 25 ms + 15 ms = 40 ms
3. Frequency (f): f = 1 / T = 1 / 0.040 s = 25 Hz
4. Duty Cycle (D): D = (PW / T) × 100% = (25 ms / 40 ms) × 100% = 62.5%