Back to the on-screen lesson ·

Truth-table rows

Laying the rows out in standard order, filling one column per subformula, and reading what the last column says.

Paper packet. Every task here also exists on screen, where it is checked automatically; answers written on paper are not assessed by Nydus. When you are back at a device, enter your answers there.

1. What you will learn

By the end of this lesson you will be able to lay out the rows of a truth table in standard order for two or three atoms, write a column for each subformula and fill it from the columns already written, count the rows on which a formula is true, and combine two columns without knowing the formulas they belong to.

2. What you already have

You can find the main connective of a formula and you know what each connective demands of a row. A truth table is those two facts used systematically: one row per valuation, one column per subformula.

3. Terms to use precisely

TermWhat it means
AssignmentOne truth value for each distinct atom.
Intermediate columnThe values of a subformula used to compute a larger formula.
Final columnThe values of the whole formula, controlled by its main connective.
Exhaustive tableA table containing every assignment once.

4. Building a truth table

A formula over $n$ atoms has $2^n$ valuations, and the table has one row for each. The standard order is the one this course always uses: the first atom is T for the top half of the rows and F for the bottom half, the second alternates in blocks of half that size, and the last alternates every row. Then a column is written for each subformula, innermost first, and the last column is the formula itself. Every entry is decided by the entries to its left on the same row, and by nothing else — this is what compositionality means, and it is why the method works for a formula of any length. Reading the finished column answers every question the unit will ask: no F at all and the formula is a tautology, no T and it is a contradiction, and two formulas with the same column are equivalent.

Another way: steps

  1. Count the atoms; write $2^n$ rows in standard order.
  2. List the subformulas from smallest to largest; give each a column.
  3. Fill each column from the columns already written, one row at a time.
  4. Read the last column.

Another way: example

$\neg (P \wedge \neg Q)$ over two atoms: the columns are $Q$, then $\neg Q$, then $P \wedge \neg Q$, then the whole formula. The conjunction holds on the second row alone, so the formula is F there and T on the other three.

5. Keep the rows aligned

For two atoms use TT, TF, FT, FF unless the activity displays a different order. For three use TTT, TTF, TFT, TFF, FTT, FTF, FFT, FFF. The first atom changes slowest. A repeated letter does not add an independent choice: P & P has one atom and two rows, not four.

To evaluate P & ~Q, first write the Q column, then reverse each of its entries to obtain ~Q, then combine with P. The final values are F, T, F, F. For ~(P & Q), first form the conjunction and then negate it; the column is F, T, T, T. The two formulas differ because the negation has different scope.

If one intermediate value is wrong, every later column using it may be wrong. Correct the earliest error rather than patching the final answer. Count the rows, check the first and last rows independently, and confirm that every intermediate entry was calculated from values on the same horizontal row. These checks catch layout mistakes without relying on a memorized final pattern.

6. Build an exhaustive list of assignments

A truth-table row assigns one value to every distinct atom that the exercise uses. Each atom has two available values in this classical framework. With one atom there are two assignments; with two there are four; with three there are eight. Adding a genuinely new atom doubles the possibilities because every old assignment can be extended once with the new atom true and once with it false.

Count distinct names, not written occurrences. The expression (P & Q) | P contains three letter occurrences but only two atoms. Its table needs four rows. The two occurrences of P share one value on every row. Treating them as independent would introduce assignments that contradict the meaning of a repeated letter and could produce false conclusions about the formula.

A systematic row order helps ensure completeness. For P, Q, R, begin with all three true. Let R alternate on every row, Q every pair of rows, and P every block of four. This produces TTT, TTF, TFT, TFF, FTT, FTF, FFT, FFF. Each choice for P is paired with all four choices for Q and R. You can check completeness by grouping the rows under P true and P false.

Other orders are legitimate if they contain every assignment exactly once. A displayed activity may specify its own order, and your submitted column must follow that display. A correct set of values in a different order can still be the wrong answer because entries are attached to particular assignments. Treat the row's atomic tuple as its identity, rather than relying only on its position on the page.

Duplicates do not compensate for omissions. A table with eight rows can still be incomplete if it repeats TTT and omits FFF. Count the rows and check uniqueness of the assignments. This is especially important when copying a handwritten table: an accidental repeated block can leave all later calculations internally consistent but fail to examine a possible case.

7. Calculate along one row at a time

For each compound formula, identify the smaller formulas that must be evaluated before its main connective. In (P -> Q) & (Q -> R), the two conditionals are the immediate inputs to conjunction. Calculate each conditional on the same row, then conjoin their outputs. There is no permission to combine the first conditional's value on one assignment with the second's value on another.

Intermediate columns are a written dependency record. If you calculate P -> Q incorrectly on a row, the final conjunction on that row may inherit the mistake. Fix the earliest incorrect operation and then recompute every dependent column. Changing only the final value conceals the source of error and leaves an inconsistent explanation. A reader should be able to reproduce the output from the displayed intermediate values.

Consider P true, Q false, R true. P -> Q is false because its antecedent is true and consequent false. Q -> R is true because its antecedent is false. Their conjunction is false because one input is false. If the first intermediate value were accidentally copied as true, the final conjunction would be wrong. Naming the decisive case for each operation makes the error easy to locate.

Negation requires similar attention to dependencies. In ~(P -> Q), first calculate the entire conditional and then reverse its value. In ~P -> Q, reverse P before applying the conditional. On P true and Q true, the first formula is false and the second true. The same visible symbols can therefore produce different columns when their grouping changes.

For longer expressions, label intermediate columns by the exact subformula rather than a vague name such as 'part one'. A label like Q | ~R reminds you which negation scope and which atoms were used. You can reuse a correctly computed repeated subformula on the same row, but never assume two merely similar subformulas have the same value. Parentheses and repeated names carry the dependency information.

8. Audit a table with independent checks

A complete table can be checked at several levels. First inspect the atom columns for the correct number of distinct assignments. Next inspect each intermediate column against its connective's truth rule. Finally inspect the main column using the immediate input columns. These are different checks: a flawless calculation on an incomplete list of assignments does not establish a result about every possible assignment.

Some decisive cases allow quick local checks. A conjunction with a false input must be false. A disjunction with a true input must be true. A conditional is false only when its left input is true and its right input false. A biconditional is true when the inputs match. Use these conditions to audit suspicious entries instead of trying to recall a long final sequence by memory.

An all-true or all-false atomic row can be a useful diagnostic, but neither row replaces the full table. A formula may behave differently only on a mixed assignment. For example, P -> Q is true on TT and FF but false on TF. Checking only the two extreme rows would miss its failure. Exhaustive enumeration matters when the intended conclusion concerns every assignment.

Distinguish a logical row from a real observation. The row P false, Q true can be considered even if your current dataset has no such record. A table explores the truth function under possible input values. A dataset records actual or reported cases and may omit logically possible combinations. Conversely, an empirical restriction may rule out some combinations in a particular application; if you rely on it, state it as an additional assumption rather than silently deleting rows.

When reporting a table result, include the expression, atom order, and row convention. A bare sequence such as true, false, false, true is ambiguous without these details. The sequence might be a biconditional column in one standard order, or a different condition under another order. Reproducible work gives another learner enough information to rebuild the calculations and identify exactly which assignment supports each output.

9. Testing a fan controller

A fictional ventilation controller switches on when the temperature is high and either a window is closed or the manual override is on. Let H mean high temperature, C mean closed window, and O mean override on. The rule is H & (C | O). There are three independent inputs, each with two possible truth values, so the test plan needs eight logical cases. In the order HCO = TTT, TTF, TFT, TFF, FTT, FTF, FFT, FFF, first compute C | O. Its column is T, T, T, F, T, T, T, F. Combining that with H gives T, T, T, F, F, F, F, F.

This exposes a consequential design choice. With low temperature and the override on, the fan remains off under the stated formula. If the intended meaning is that override always starts the fan, the rule should instead be (H & C) | O. At H false, C false, O true, the first formula is false and the second true. That one test record distinguishes the designs.

A table cannot decide which design is desirable. It can show exactly what each design does and where the two differ. Before building hardware, the designer can review those distinguishing rows. An exhaustive logical test also does not check a broken sensor, wiring fault, or a timing delay: those belong to a separate physical test plan. The exercise isolates the Boolean rule so that its behavior can be checked unambiguously.

10. Where this goes wrong

Almost every wrong table is one of three things. Rows are missed, because they were written down in an order that was invented row by row rather than laid out first. The conditional's two false-antecedent rows are marked F, on the thought that a promise about nothing must be broken rather than kept. Or the whole formula's column is attempted directly, without the intermediate columns, at which point a single slip is invisible.

11. Two atoms with a repeated occurrence

  1. Identify distinct atoms.

    (P & Q) | P uses P,Q

    The repeated P does not add an independent input.

  2. List assignments once each.

    TT,TF,FT,FF

    Two binary inputs have four combinations.

  3. Calculate the conjunction.

    P & Q: T,F,F,F

    Both inputs must be true.

  4. Disjoin with the same-row P.

    (P & Q) | P: T,T,F,F

    A true P suffices for the outer disjunction.

  5. Check the repeated letter.

    TF uses P=T in both places

    One row cannot give a repeated atom inconsistent values.

12. Keep negation and conditional columns aligned

  1. Fix the formula.

    ~P -> Q

    The negation applies to P only.

  2. List the rows.

    PQ: TT,TF,FT,FF

    Each assignment appears once.

  3. Negate the P column.

    ~P: F,F,T,T

    Reverse the P entry on each row.

  4. Copy the consequent column.

    Q: T,F,T,F

    The consequent is unnegated Q.

  5. Apply the conditional.

    ~P -> Q: T,T,T,F

    Only the last row has true antecedent and false consequent.

  6. Audit the last assignment.

    P=F,Q=F gives ~P=T and Q=F

    This confirms the unique false output independently.

13. Join two three-atom conditions

  1. Identify the immediate inputs.

    (P -> Q) & (Q -> R)

    The final operation joins two conditionals.

  2. Enumerate the rows.

    PQR: TTT,TTF,TFT,TFF,FTT,FTF,FFT,FFF

    Three independent atoms require eight distinct assignments.

  3. Calculate the left conditional.

    P -> Q: T,T,F,F,T,T,T,T

    It fails when P is true and Q false.

  4. Calculate the right conditional.

    Q -> R: T,F,T,T,T,F,T,T

    It fails when Q is true and R false.

  5. Conjoin aligned entries.

    T,F,F,F,T,F,T,T

    Both conditionals must hold on the same row.

  6. Inspect a mixed row.

    TFT gives F & T = F

    The right conditional cannot compensate for the false left one.

  7. Check the final row count.

    Eight assignments, eight final entries

    Every output belongs to exactly one listed input tuple.

14. A scoped negation

  1. Start with the stated assignment.

    P=F,Q=T

    Both letter occurrences retain these values.

  2. Calculate the inner conjunction.

    P & Q=F

    P is false.

  3. Your turn: work this step out. Its working is at the end of the packet.

    Apply the outer negation.

15. Guided practice

Calculate P & ~Q in the displayed row order, preserving the intermediate dependencies.

PQP & ~Q
   
   
   
   
   
   
   
   

16. Guided practice

Complete the table-size audit for (P & Q) | P.

  1. Group repeated names.

    P,Q: atoms distinct atoms

    P is one claim despite recurring in the expression.

  2. List every assignment.

    TT,TF,FT,FF: rows rows

    Each choice for P pairs with each choice for Q.

  3. Check uniqueness.

    No assignment repeats

    A duplicate cannot substitute for an omitted possibility.

17. Guided practice

Calculate (P -> Q) | P in the displayed row order, preserving the intermediate dependencies.

PQ(P -> Q) | P
   
   
   
   
   
   
   
   

18. Practice

Calculate (P | Q) & P in the displayed row order, preserving the intermediate dependencies.

PQ(P | Q) & P
   
   
   
   
   
   
   
   

19. Practice

A lamp lights when both the switch is on and the battery is charged. Treat this as a description of the lamp-on condition. S means switch on and B means charged. Write that condition.

Answer:

20. Somewhere new

Calculate P -> (Q & R) in the displayed row order, preserving the intermediate dependencies.

PQRP -> (Q & R)
    
    
    
    
    
    
    
    

21. Lesson test

Lesson test: one question per skill, one attempt each, no hints. Your answers are checked when you submit.

22. Test question

Calculate (P | Q) & ~R in the displayed row order, preserving the intermediate dependencies.

PQR(P | Q) & ~R
    
    
    
    
    
    
    
    

23. What you can do now

You can build a full truth table for a formula of two or three atoms and read the result off the final column. Say in your own words why the value of a compound formula on a row depends on nothing but the values of its parts on that row.

Working for the steps left to you

14. A scoped negation, step 3

~(P & Q)=T

Negation reverses the complete inner value.