Welcome back! In our last session, we got to know the individual building blocks of digital logic: the various logic gates. You learned to identify their symbols and understand their behavior through their unique truth tables.
Today, we'll start connecting those blocks to build simple combinational circuits. Our goal is to analyze these circuits and fully describe their behavior. To do this, we'll master the primary tool for this task: constructing a truth table for a complete circuit based on its logic diagram. This skill is fundamental for verifying that a circuit you've designed or are analyzing does what you expect it to.
By the end of this lesson, you will be able to take a logic diagram composed of several gates and systematically derive its complete truth table.
1. The Structure of a Truth Table
A truth table is a complete, unambiguous description of a combinational circuit's behavior. It lists every possible combination of input values and shows the resulting output value for each one.
Before we fill in the outputs, we need to set up the table itself. This involves two steps:
- Determine the Number of Rows: A circuit with n inputs has possible input combinations. For example, a circuit with 3 inputs (A, B, C) will have rows in its truth table.
- List All Input Combinations: You need a systematic way to list all combinations to ensure you don't miss any. The standard method is to count up in binary, from 0 to .
A helpful shortcut for listing the inputs is what's sometimes called the "half-and-half rule." Let's see it in action.
Constructing Truth Tables for Combinational Logic Circuits
Watch this short segment from the Engineers Academy video, "Constructing Truth Tables for Combinational Logic Circuits." It explains the 2^n rule and demonstrates the half-and-half method for setting up the input columns.
Focus on the explanation of how to calculate the number of rows and then watch the demonstration of the half-and-half rule for systematically filling them in. For a 3-input table, the first column is half 0s, half 1s; the second column is half of that (quarter 0s, quarter 1s, repeated); and the third is half of that again.
2. Analyzing a Circuit with Intermediate Steps
Once the input combinations are listed, we can determine the final output. For a circuit with more than one gate, it's difficult to calculate the final output in one go. The key is to break the problem down.
We do this by identifying intermediate points in the circuit—specifically, the outputs of gates that are not the final output. We then add a column to our truth table for each intermediate point. This allows us to work through the circuit logically, from inputs to outputs, one gate at a time.
Let's watch this method applied to a simple circuit.
Constructing Truth Tables for Combinational Logic Circuits
Return to the same video and watch the first full example. The circuit has an AND gate whose output feeds into an OR gate.
Observe how the presenter introduces an intermediate point 'P' at the output of the AND gate and adds a column for it in the truth table. They first calculate the 'P' column based on inputs A and B. Then, they use the 'P' and 'C' columns to calculate the final output Q.
This process transforms a complex problem into two simple ones:
- Find the output of the AND gate.
- Find the output of the OR gate.
This "divide and conquer" approach is the core technique for analyzing any combinational logic circuit.
3. A More Complex Example
The same technique applies no matter how many gates are in the circuit. You simply add more intermediate columns. A more complex circuit just means there are more steps, but each step is still just evaluating a single gate—a task you mastered in the last lesson.
Let's see this applied to a circuit with four gates and three intermediate points.
Logic Circuit Analysis using Truth Tables
This video from ElectronicsTeaching, "Logic Circuit Analysis using Truth Tables," provides an excellent, systematic walkthrough of a more involved circuit.
Follow along as the presenter analyzes the circuit: First, they set up the input combinations for A, B, and C using the binary counting method. They define the first intermediate point, 'x' (output of the first OR gate), and fill in its column. Next, they calculate the column for 'y' (the output of the NOT gate). Then, they calculate the column for 'z' (the output of the second OR gate). Finally, using the intermediate columns for 'x' and 'z', they determine the final output 'q' from the AND gate.
Notice how the presenter frequently refers back to the basic truth tables for each gate (OR, NOT, AND) at each step. This systematic, step-by-step propagation of values from input to output is exactly how you should approach these problems.
4. Practice Exercise
Now it's your turn to apply this method. Consider the following logic circuit:

Let's focus on Problem 3 from the image. It has two inputs, X and Y, and one output, Q.
-
Identify Inputs, Outputs, and Intermediate Points:
- Inputs: X, Y
- Output: Q
- There's an intermediate point at the output of the AND gate. Let's call it C, as labeled in the diagram.
-
Set up the Truth Table:
- How many rows do we need? With 2 inputs, we need rows.
- The columns will be: X, Y (inputs), C (intermediate), and Q (output).
| X | Y | C = ? | Q = ? |
|---|---|---|---|
| 0 | 0 | ||
| 0 | 1 | ||
| 1 | 0 | ||
| 1 | 1 |
-
Solve for the Intermediate Column 'C':
The point C is the output of an AND gate whose inputs are Y and NOT X (which we can write as ). So, the expression for C is . To calculate this, you first need to mentally invert X, then AND the result with Y.- Row 1: X=0, Y=0. . So, .
- Row 2: X=0, Y=1. . So, .
- Row 3: X=1, Y=0. . So, .
- Row 4: X=1, Y=1. . So, .
Our table now looks like this:
| X | Y | C = | Q = ? |
|---|---|---|---|
| 0 | 0 | 0 | |
| 0 | 1 | 1 | |
| 1 | 0 | 0 | |
| 1 | 1 | 0 |
- Solve for the Final Output 'Q':
The output Q is the result of an OR gate whose inputs are X and our intermediate point C. So, .- Row 1: X=0, C=0. So, .
- Row 2: X=0, C=1. So, .
- Row 3: X=1, C=0. So, .
- Row 4: X=1, C=1. So, .
And here is the final, completed truth table for the circuit:
| X | Y | C = | Q = |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 1 |
| 1 | 0 | 0 | 1 |
| 1 | 1 | 0 | 1 |
This truth table now fully describes the function of the circuit in Problem 3.
For more practice, you can try solving the other problems in the worksheet. You can also find additional exercises with solutions in the textbook "Introduction to Digital Logic with Laboratory Exercises". The solutions for the Chapter 2 Review Exercises provide several examples of truth table construction.
Introduction to Digital Logic with Laboratory Exercises
For optional extra practice, you can review the exercises and solutions in this PDF textbook.
First, look at the Review exercises at the end of the "Logic gates" chapter (Chapter 2), specifically problem 3, which asks you to construct truth tables for several Boolean expressions. Try to solve one or two on your own. Then, check your work by looking at the Solutions for the Chapter 2 review exercises in Appendix F. The solutions show the intermediate columns, reinforcing the method we learned today.
Conclusion
In this lesson, we made the jump from single gates to simple combinational circuits. You learned the essential skill of analyzing a logic diagram to determine its function.
Here are the main takeaways:
- A truth table for a circuit with n inputs must have rows to list all possible input combinations.
- The most effective way to analyze a multi-gate circuit is to break it down using intermediate columns in your truth table.
- Each intermediate column represents the output of a gate inside the circuit.
- By solving for each intermediate column one by one, you can systematically work from the circuit's inputs to its final outputs.
This analysis skill is the foundation for design. In our next lesson, we will begin designing our first standard combinational logic block: a 2-to-1 multiplexer. You will see how creating a truth table is often the very first step in the design process.