Skip to main content

Someone wanted to learn this too, so Grasp built them a personal learning path.

You can keep exploring this one or create your own

Constructing Truth Tables for Boolean Expressions

Hello! Last lesson, you treated bit patterns as numbers with a base, width, and possibly a signed interpretation. Here, each bit is a logic input: 0 means false and 1 means true. You’ll construct a truth table that records the output of a Boolean expression for every possible input combination. That table will give you an unambiguous description of the function before you try to simplify or build it.


What a truth table describes

A Boolean expression combines inputs that can each be 0 or 1. A truth table lists every possible assignment of those inputs and the output the expression produces for each assignment. For distinct inputs, there are rows: three inputs require eight rows, whether a variable appears once or several times in the expression.

The three operations you will use most often are NOT, AND, and OR:

Operation Common notation Output is 1 when…
NOT is 0
AND , or Both inputs are 1
OR At least one input is 1

These symbols describe logic, not ordinary arithmetic. In particular, when denotes OR. An overbar applies to everything beneath it: means “OR and , then invert the result,” whereas means “invert , then OR it with .”

Read the following portions of Boolean Algebra Basics—An Overview of Boolean Logic from All About Circuits to establish the definitions and notation.

Boolean Algebra Basics—An Overview of Boolean Logic

Read this for the meaning of a complete truth table, the three fundamental operations, and how grouping affects an expression.

In “Boolean Truth Table,” begin where the author explains why all input combinations can be listed. Read the truth-table explanation through the discussion of a proper table; stop before “Condensed Truth Tables.” In “The Three Fundamental Boolean Operators,” read the gate definitions, including the “The NOT Gate (Logical Negation),” “The OR Gate (Logical Disjunction),” and “The AND Gate (Logical Conjunction)” subsections. Concentrate on when each output is true rather than memorizing every alternative notation. Finally, in “Operator Precedence and Associativity,” find the paragraph beginning “Shifting our attention to Boolean algebra.” Read the precedence discussion. Notice both the common NOT–AND–OR convention and the reason to use parentheses when scope could be unclear.

A useful working convention is to evaluate grouped expressions first, then NOT, then AND, then OR. Parentheses and the extent of an overbar make the intended grouping explicit. For example, in inverts only ; inverts the result of the entire AND operation.


Build the rows before calculating outputs

Suppose the expression uses , , and . Start with one column per distinct input and list the eight combinations systematically:

0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1

This is the same ordering as counting from binary through , although any order is valid if every combination appears exactly once. Notice the pattern: changes every four rows, every two rows, and every row. It provides a quick way to check that you have neither skipped nor duplicated an input case.

Next, add a column for each intermediate result needed to evaluate the expression. Calculate those columns from the inside of the expression outward, leaving the final output for last. This makes an incorrect row easier to trace than calculating a complicated expression entirely in your head.

The Intermation video Ep 028: Boolean Expressions, Circuits, and Truth Tables demonstrates this approach for . You can skip its circuit-drawing segment for now; focus on how the speaker builds the table.

Ep 028: Boolean Expressions, Circuits, and Truth Tables

Watch the brief operator review and the truth-table construction to see intermediate columns evaluated in dependency order.

Watch operators and grouping for NOT, AND, OR, and the scope of an overbar. Then skip to table construction. In that second segment, track how the eight input rows are generated, how the complemented inputs and two AND terms receive their own columns, and how the final OR column uses those terms.


Work through a grouped expression

Now consider a different function:

There are three distinct inputs, so the table needs eight rows. The expression tells you what intermediate columns to add: first , then its complement , and separately . Finally, OR the last two results to obtain .

0 0 0 0 1 0 1
0 0 1 0 1 0 1
0 1 0 1 0 0 0
0 1 1 1 0 1 1
1 0 0 1 0 0 0
1 0 1 1 0 0 0
1 1 0 1 0 0 0
1 1 1 1 0 1 1

Look at the row . Because , its complement is 0. But , so the final OR produces 1. In the row , the opposite term supplies the 1: , its complement is 1, and .

The intermediate columns also offer a check on the completed table. can be 1 only when both and are 0, regardless of . Likewise, can be 1 only when both and are 1, regardless of . Every bold output of 1 is accounted for by at least one of those conditions.

If an expression contains an unfamiliar named operation, establish its two-input behavior before filling in the larger table. For example, XOR is 1 when its inputs differ, whereas OR is 1 when either input is 1. Thus , but when means OR. For a NAND or NOR term, calculate the AND or OR result first, then invert it. The same row-by-row method still applies.


A reliable construction routine

For any Boolean expression, identify its distinct inputs and make input rows. Parse the expression’s grouping, add intermediate columns in the order their values are needed, and compute the final output from those columns. Check both that every input combination appears once and that each output agrees with the intermediate values in its row.

A truth table describes what a combinational function does, independent of how you implement it. In the next lesson, you’ll use those output rows to minimize a Boolean function with a Karnaugh map.

Can't find a good explanation? Sign up and we'll make it for you

Sign up