A Complete Guide to Timing Diagrams: Signals & Problem Solving

What is a Timing Diagram?

Timing diagrams or waveforms graphically represent signal values against time. Engineers plot time along the x-axis in suitable units. Meanwhile, they position signal values, or magnitudes, along the y-axis. In digital design contexts, designers stack multiple variables atop one another and plot them against a shared x-axis. Consequently, they confine the signal’s variations to the allocated stack space.

Representing Signals in a Timing Diagram

To represent a signal on a timing diagram, we allot it a dedicated space and inscribe its name based on our choice or requirements. In digital design contexts, furthermore, we handle single- or multi-bit variables. Consequently, in the following subsection, we will explore how to plot a timing diagram for both scenarios.

1-bit Signals on a Timing Diagram

In digital designs, moreover, single-bit signals assume one of four key values: 0, 1, X (don’t care or unknown), and Z (disconnected, high-impedance, or open). Consequently, these extend beyond the basic 0 and 1 states commonly referenced in introductory contexts.

To enhance clarity, the following list outlines each state’s meaning, graphical representation, and typical color in color-coded timing diagrams (noting that colors can vary by tool or convention):

  • Logic 0: Represents a low voltage state. Designers draw it as a horizontal line near the base of the signal’s allocated space (often labeled with a 0 on the scale). In color-coded diagrams, it appears in green.
  • Logic 1: Denotes a high voltage state. Engineers position it as a horizontal line higher up in the signal’s space (with a fixed offset, sometimes labeled with a 1). Like 0, it typically renders in green within color-coded views.
  • X (Don’t Care/Unknown): Signifies an indeterminate or irrelevant state, familiar from truth tables and Karnaugh maps where it aids circuit simplification. They depict it by drawing an explicit “X” shape along the timeline for the relevant duration. In color-coded diagrams, moreover, it often displays in red.
  • Z (High-Impedance): Indicates a disconnected or open-circuit output, neither driven to 0 nor 1, allowing other devices to control the line. This state manifests as a horizontal line centered in the signal’s stacked space. Generally, in color-coded timing diagrams, it renders in blue.

These conventions, furthermore, ensure precise visualization of signal behaviors in tools like Verilog simulations or hardware description languages.

Transitions between Logic 0 and 1

When a signal shifts from logic 0 to logic 1 or vice versa, designers maintain a continuous line, drawing a vertical segment to connect the two logic levels. This vertical line visually captures the instantaneous transition, ensuring clarity in depicting state changes.

this image shows the timing diagram representation of different logic values for a single-bit signal

Multi-bit Signals on a Timing Diagram

In digital designs, moreover, multi-bit signals consist of grouped single-bit signals. Consequently, each individual bit can assume one of the four states discussed earlier: 0, 1, X, or Z. Collectively, however, these bits encode larger numerical values beyond simple binary 0 or 1โ€”for instance, a 4-bit signal can reach up to 15 (binary 1111), while a 32-bit signal can extend as high as 4,294,967,295 (32 ones in binary).

To confine these values within the signal’s allocated space, furthermore, designers employ a standardized graphical approach: two parallel horizontal lines span the timelineโ€”one positioned at the logic 0 height (near the base) and the other at the logic 1 height (higher up). Between these lines, they explicitly inscribe the collective value of the signal.

When the value changes, moreover, a transition appears as a sharp, steeply angled line segment that shifts the upper line downward to the low level and the lower line upward to the high level. This depiction emphasizes an instantaneous value switch. In the subsequent time interval, consequently, the updated value occupies the space between the now-parallel lines.

By default, the inscribed value uses decimal notation if no radix is specified. For clarity and best practices, though, engineers should always indicate the total bit width and the base (radix) of the value. This follows digital design and Verilog HDL conventions, such as:

  • Plain decimal: 10 (for a 4-bit value of 10)
  • Binary: 4'b1010
  • Decimal with width: 4'd10
  • Hexadecimal: 4'hA
this image shows the timing diagram representation of different logic values for a multi-bit signal

Solving Timing Diagram-Based Problems

In digital design, timing diagram problems typically present a circuit diagram alongside input variable values that change over time. Engineers are often tasked with plotting the complete or partial output function, or even specific variable values, based on the given inputs or outputs.

These problems resemble traditional schematic analysis, where we compute an output for a single set of input values. However, timing diagrams introduce a dynamic element: multiple input values evolve over time, requiring us to determine and plot the corresponding output across a timeline. Essentially, this combines several static circuit problems into a single, time-dependent challenge.

To solve these problems effectively, follow these steps:

  1. Identify Stable Time Windows: Examine the timing diagram to locate time intervals where input values remain constant.
  2. Compute the Output: For each stable time window, analyze the circuit using the given input values to calculate the output function or specific variable values.
  3. Plot the Output: Represent the computed output in the designated output space on the timing diagram, ensuring it aligns with the corresponding time interval.
  4. Repeat for Each Interval: Move to the next time window where inputs remain unchanged, repeating the process until the entire timeline is addressed.

By systematically evaluating each time window, engineers can construct a complete and accurate output plot, seamlessly capturing the circuitโ€™s behavior over time.

Example 1:

this image shows an and gate to be used to solve for its output waveform

Solve the given circuit and draw the output waveform.

this image shows the initial set up in the solution when trying to draw the output timing diagram of the and gate with given input values

To determine the output waveform Z for a two-input AND gate with inputs A and B, we actively segment the timeline into distinct intervals where both inputs maintain constant values, ensuring a consistent output Z during each period. Multiple intervals arise due to changes in one or both inputs, requiring us to compute Z = A AND B for each segment and plot the result. The identified time spans (in nanoseconds, ns) are:

  • 0โ€“10 ns
  • 10โ€“24 ns
  • 24โ€“26 ns
  • 26โ€“40 ns
  • 40โ€“50 ns
  • 50โ€“60 ns
  • 60โ€“80 ns
  • 80โ€“100 ns

For each interval, we read the values of inputs A and B, calculate the output Z using the AND gateโ€™s logic, and plot Z within the corresponding time span. These steps are visually demonstrated in the accompanying figures, which illustrate the input and output waveforms across the specified time spans.

this image shows the step 1 of the solution when trying to draw the output timing diagram of the and gate with given input values
Step 1 of the Solution
this image shows the step 2 of the solution when trying to draw the output timing diagram of the and gate with given input values
Step 2 of the Solution
this image shows the step 3 of the solution when trying to draw the output timing diagram of the and gate with given input values
Step 3 of the Solution
this image shows the step 4 of the solution when trying to draw the output timing diagram of the and gate with given input values
Step 4 of the Solution
this image shows the step 5 of the solution when trying to draw the output timing diagram of the and gate with given input values
Step 5 of the Solution
this image shows the step 6 of the solution when trying to draw the output timing diagram of the and gate with given input values
Step 6 of the Solution
this image shows the step 7 of the solution when trying to draw the output timing diagram of the and gate with given input values
Step 7 of the Solution
this image shows the step 8 of the solution when trying to draw the output timing diagram of the and gate with given input values
Step 8 of the Solution
this image shows the final solution of the solution when trying to draw the output timing diagram of the and gate with given input values
Final Solution

Example 2:

this image shows the symbol of a 2-to-4 decoder with active-low enable

Solve the given circuit and draw the output waveform.

this image shows the input signals on the timing diagram of a 2-to-4 decoder with active-low enable

To create the timing diagram for a \(\mathsf{2\times{}4}\) decoder with an active-low enable, we systematically segment the timeline based on the state of the enable signal. When the enable is low (0), indicating an active decoder, we further divide the timeline into intervals where inputs A and B remain constant, calculating the corresponding output (one of the four outputs set to 1 based on the A and B combination). During these active periods, we plot the appropriate output in its designated space. However, when the enable is high (1), the decoder is disabled, forcing all outputs to remain at 0, regardless of A and B values. This structured approach ensures the output waveform accurately reflects the decoderโ€™s behavior over time.

Solution
this image shows the solution to the input signals on the timing diagram of a 2-to-4 decoder with active-low enable

Example 3:

this image shows the circuit diagram of a 2-to-1 mux to solve for its output signal z

Solve the given circuit and draw the output waveform.

this image shows the input signals on the timing diagram of a 2-to-1 mux

To create the timing diagram for a \(\mathsf{2\times{}1}\) single-bit multiplexer (MUX) with inputs A, B, C, and select signal Sel, we begin by evaluating the state of Sel, which determines the output Z. When Sel is 0, Z equals A AND B; when Sel is 1, Z equals the complement of C (\(\mathsf{C’}\)). Accordingly, we segment the timeline based on changes in Selโ€™s value. Within each segment, we further divide the timeline according to the active input signalsโ€”A and B for Sel = 0, or C for Sel = 1โ€”ensuring stable input values in each interval. We then compute and plot the output Z in its allocated space, accurately reflecting the MUXโ€™s behavior across the timeline.

Solution
this image shows the solution to the input signals on the timing diagram of a 2-to-1 mux

Example 4:

this image shows the circuit diagram of a 4-to-1 mux to solve for its output signal z

Solve the given circuit and draw the output waveform.

this image shows the input signals on the timing diagram of a 4-to-1 mux

To create the timing diagram for a \(\mathsf{4\times{}1}\) multiplexer (MUX) with inputs (A OR B), \(\mathsf{C’}\), D, and (D AND E), controlled by a 2-bit select signal Sel, we start by assessing Selโ€™s value to identify which input determines the output Z. Specifically, Z equals (A OR B) for Sel = 00, C’ for Sel = 01, D for Sel = 10, or (D AND E) for Sel = 11. Accordingly, we segment the timeline based on transitions in Sel. Within each segment, we further subdivide into intervals where the relevant inputsโ€”(A OR B), C, D, or (D AND E)โ€”remain stable, depending on Selโ€™s value. We then calculate Z for each interval and plot it in its allocated space, ensuring the waveform clearly captures the MUXโ€™s behavior over time. The final solution is illustrated in the accompanying diagram.

Solution
this image shows the solution to the input signals on the timing diagram of a 4-to-1 mux