Timing Diagram: How to Read Circuit Behavior
When you build a circuit in the simulator, you need to verify it works correctly for all possible input combinations. That's what the truth table is for. But a table is just raw numbers. To see the circuit's behavior as a whole, a timing diagram is displayed above the table.
What Is a Timing Diagram
A timing diagram is a chart showing the state of every circuit signal (inputs and outputs) for each test case. Think of a multi-channel oscilloscope: you connect probes to all signals and watch how they change from test to test.
In our simulator:
- Top rows — input signals (Input). A high horizontal line means 1, a low line means 0. This shows the inputs for each test.
- Bottom rows — output signals (Output). Same: high = 1, low = 0. This is what your circuit should output.
- Each column — a single test case (one row of the truth table).
- Dashed lines separate columns, like ruler markings.
- Horizontal divider separates inputs from outputs.
How to Read the Diagram
Move left to right. In each column:
- Check the top signals — these are the inputs for this test.
- Check the bottom signals — these are the expected outputs.
- Compare with the table below: a diagram column corresponds to a truth table row.
For example, for an AND gate with inputs A and B and output Q:
- Column 1: A=0, B=0 → Q=0 (both input lines low, output low)
- Column 2: A=0, B=1 → Q=0 (A low, B high, Q low)
- Column 3: A=1, B=0 → Q=0 (A high, B low, Q low)
- Column 4: A=1, B=1 → Q=1 (A and B high, Q high)
8-Bit Buses
For bus signals (BusInput, BusOutput), the diagram shows numeric values instead of a waveform. Each column displays a number from 0 to 255 — the current value on the bus. This is handy when working with 8-bit data: you can instantly see what value is passing through the circuit.
Interactivity
The diagram and truth table are linked:
- Hover over a table row — the corresponding column on the diagram highlights.
- Hover over a diagram column — the corresponding table row highlights.
This connection helps you quickly find mismatching values and understand exactly which column (test case) has the error.
Diagram After Verification
After running a test (the ▶ button), the diagram updates: now the output signals show the actual values produced by your circuit, not the expected ones. Columns with mismatches are highlighted with a red background. This lets you instantly spot which tests your circuit fails and compare expected vs. actual values in the table below.