Logic Levels & Digital Signals
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.
Define HIGH and LOW logic levels in terms of voltage ranges.
Explain TTL and CMOS voltage thresholds and noise margins.
Describe pulse characteristics including rise time, fall time, and duty cycle.
Understand why digital signals are highly resistant to noise.
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.
Maximum noise allowed on a HIGH signal before it becomes undefined.
NMH = 2.4V - 2.0V = 0.40V
Maximum noise allowed on a LOW signal before it becomes undefined.
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.
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
Worked Examples
Example 1 (Period): A clock signal has a frequency of 1 kHz (1000 Hz). What is its period?
Example 2 (Frequency): A pulse train has a period of 20 ms. What is its frequency?
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?
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%