1. What Is a Truth Table?
A truth table describes a logic operation by listing the output for each combination of input signals:
Inputs → logic operation → outputFor FBD, it helps predict when the output should be TRUE or FALSE before running the diagram.
2. Why Truth Tables Help
Reading the diagram visually is useful; a table adds a systematic check. It helps you understand a block's rule, test all input states, find output conditions, catch mistakes before execution, and explain the diagram to another person.
3. One Input
A Boolean input has two possible states:
| Input_1 | Output_1 |
|---|---|
| FALSE | FALSE |
| TRUE | TRUE |
This table describes a direct connection:
[Input_1] ───────────────> [Output_1]4. NOT Truth Table
NOT produces the opposite value:
Output_1 = NOT Input_1| Input_1 | Output_1 |
|---|---|
| FALSE | TRUE |
| TRUE | FALSE |
5. Two Inputs
Two Boolean inputs have four combinations:
| Input_1 | Input_2 | Combination |
|---|---|---|
| FALSE | FALSE | Both off |
| TRUE | FALSE | Only the first on |
| FALSE | TRUE | Only the second on |
| TRUE | TRUE | Both on |
These rows form the basis for testing AND, OR, XOR, and other two-input operations.
6. AND Truth Table
AND produces TRUE only when every input is TRUE:
Output_1 = Input_1 AND Input_2| Input_1 | Input_2 | Output_1 |
|---|---|---|
| FALSE | FALSE | FALSE |
| TRUE | FALSE | FALSE |
| FALSE | TRUE | FALSE |
| TRUE | TRUE | TRUE |
This suits permissives: a motor may run only when Start is pressed and Safety_OK is active.
7. OR Truth Table
OR produces TRUE when at least one input is TRUE:
Output_1 = Input_1 OR Input_2| Input_1 | Input_2 | Output_1 |
|---|---|---|
| FALSE | FALSE | FALSE |
| TRUE | FALSE | TRUE |
| FALSE | TRUE | TRUE |
| TRUE | TRUE | TRUE |
This suits an action requested by several different conditions.
8. Building a Truth Table
- 1. List all diagram inputs.
- 2. List every TRUE/FALSE combination.
- 3. Calculate the block results for each row.
- 4. Record the final output.
- 5. Compare the table with the simulator.
The number of rows grows quickly: two inputs require 4 rows, three require 8, and four require 16.
9. FBD Example: Motor Start
The motor should run only when Start is pressed and Safety_OK is active:
[Start_Button] ───┐
├── [AND] ──> [Motor_Run]
[Safety_OK] ──────┘| Start_Button | Safety_OK | Motor_Run |
|---|---|---|
| FALSE | FALSE | FALSE |
| TRUE | FALSE | FALSE |
| FALSE | TRUE | FALSE |
| TRUE | TRUE | TRUE |
The table shows that pressing Start alone is insufficient.
10. Simulator Practice
Open the lesson example and start the simulation. Test both inputs FALSE, only Start_Button TRUE, only Safety_OK TRUE, and both TRUE. Compare Motor_Run with the table above.
The goal is to check the diagram against a prepared table rather than trying inputs at random.
11. Key Points
A truth table shows a diagram's output for every input combination. It is a reliable way to understand and check AND, OR, NOT, and other logic blocks.
Practice block
Open the related example in the editor, run the simulation, and repeat the exercise from the article. The JSON is also available as a direct download.