Teachers' Portal  /  IGCSE Computer Science 0478  /  Boolean logic  /  Completing truth tables
Lesson pack · IGCSE Computer Science 0478 · 10 (3) · IGCSE

Completing truth tables

Every row, checked. A truth table proves what a circuit does for every possible input.

Student lesson Lab, full screen
At a glance

The shape of the lesson

Topic
Boolean logic
Syllabus reference
Cambridge IGCSE Computer Science 0478, 10 (3)
Level
IGCSE
Duration
45 minutes, lab-led; stretches to a 60 minute block (see the contingency notes)
Position in topic
Lesson 3 of 4 in Boolean logic; follows Drawing logic circuits; leads into Writing logic expressions
Central model
Fig. 1: the truth table for X = (A AND B) OR NOT C, with a working column for each gate
Cooperative structure
Assessment
Stage 1 check and the exam-style plenary from the student lesson, plus the worksheet as the exit task
Learning objectives

By the end of the lesson, learners can

Section by section
  • Count in binary: Each row of inputs is a binary number.
  • Working columns: In the lab, pick a circuit and switch on the working columns.
  • From a circuit or a statement: With a circuit, label the output of every gate with a letter or its expression, and make each label a working column.
Key points to leave on the board
  • Rows: 2n of them, in binary counting order 000 to 111.
  • Working columns: one for the output of each gate, from the inputs towards X.
  • Statements: write the expression first, taking care with which value means NOT.
  • Check: pick two rows and trace them through the circuit again.
The core visual model

One picture every idea returns to

A truth table shows the output for every combination of inputs. With n inputs there are 2n rows: 4 rows for two inputs, 8 rows for three. List the inputs in binary counting order (000, 001 ... 111) so no row is missed. Then add a working column for the output of each gate, working from the inputs towards the output, and use those columns to find the final output X.

working columns: one for each gate, then the output A B C A AND B NOT C X 0 0 0 0 1 1 0 0 1 0 0 0 0 1 0 0 1 1 0 1 1 0 0 0 1 0 0 0 1 1 1 0 1 0 0 0 1 1 0 1 1 1 1 1 1 1 0 1
Fig. 1: the truth table for X = (A AND B) OR NOT C, with a working column for each gate
Lesson sequence

Forty-five minutes, phase by phase

TimePhaseWhat happens in the roomGrouping
0 to 5 minHook: predictOpen with the question in the title, Every row, checked.. A truth table proves what a circuit does for every possible input. Put the figure on the board: it is the one picture every idea in the lesson returns to.Whole class, then pairs
5 to 13 minTeach and check: Count in binaryEach row of inputs is a binary number.Whole class, then pairs
13 to 21 minTeach and check: Working columnsIn the lab, pick a circuit and switch on the working columns. Project tab 4 of the lab (Complete the truth table) and let a student drive it while the class predicts. Model the worked example Two working columns on the board, one line at a time. Your turn: Complete the output column for X = (NOT (A OR B)) AND C.Pairs
21 to 30 minTeach and check: From a circuit or a statementWith a circuit, label the output of every gate with a letter or its expression, and make each label a working column. Project tab 3 of the lab (Problem statement to truth table) and let a student drive it while the class predicts. Model the worked example From a statement on the board, one line at a time. Your turn: Using Fig. 1, give X for A = 1, B = 0, C = 0.Numbered Heads Together
30 to 36 minCheckThe four Stage 1 questions from the student lesson, answered on mini whiteboards or by show of fingers. Re-teach the one most get wrong.Individual, then whole class
36 to 43 minPlenaryThe exam-style questions from Stage 2, one at a time: thirty seconds alone, then a random call. The feedback lines in the key give the examiner's wording.Individual, random call
43 to 45 minExit and homeworkSet the worksheet below (6 questions, 20 marks). Learners self-assess against the objectives before they leave.Individual
Timing and contingency

Protect the parts that carry the learning

The sequence carries about fifty minutes of material, so the lab is driven by one student while the class predicts rather than explored freely. Times are a guide.

Protected: the check at 30 minutes. It is the only individual read on whether the key idea landed, and it is not cut.

Cut first if the build overruns: the last check in From a circuit or a statement, never the check or the plenary.

In a 60 minute block: run worksheet questions 1 to 3 in class as a Rally Coach set and model both the hardest worked example and its check live.

Running the cooperative task

Numbered Heads Together

Teams of four number off. Put up a question, give the team time to make sure every member can answer, then call a number: that student answers for the team, so nobody can leave the thinking to someone else.

The full structure, with its variations and the other twelve, is on the cooperative-learning page.

Examiner traps to pre-empt

What to head off, and how

Trap learners fall intoTeaching move that pre-empts it
Check the input columns before you start.If you write your own and repeat a row (or miss one), every output after it can be marked wrong.
Read the meaning of 0 and 1 for each input. "The door is closed (D = 0)" means the condition is NOT D, not D.Return to From a circuit or a statement: ask a pair to state the correct version and show it on the lab before moving on.
Worksheet

Completing truth tables: worksheet

6 questions, 20 marks. Written in the style of the papers; no past paper question is reproduced.

NameClassDate
Q1 · calculate[4 marks]

Complete the truth table for X = (A OR B) AND NOT C, for the inputs 000 to 111 in binary order.

Q2 · trace[4 marks]

A logic circuit has a NAND gate with inputs A and B. Its output and input C go into an XOR gate, whose output is X. Complete the truth table for X.

Q3 · apply[4 marks]

A machine M starts (M = 1) when the safety guard is closed (G = 1) and either start button P or start button Q is pressed (= 1). (a) Write the logic expression. (b) Complete the truth table for inputs G, P, Q.

Q4 · explain[2 marks]

Explain why a truth table for a circuit with three inputs has eight rows, and why the rows are written in binary counting order.

Q5 · analysis[2 marks]

A student completes the truth table for X = A AND NOT B and writes X = 0, 1, 0, 0 for the rows A B = 00, 01, 10, 11. Identify the error and give the correct output column.

Q6 · calculate[4 marks]

Complete the truth table for X = (A AND B) OR (B AND C). Use working columns.

Answer key and marking notes
Q1 · 4 marks
  • Rows 000, 001: 0, 0.
  • Rows 010, 011: 1, 0.
  • Rows 100, 101: 1, 0.
  • Rows 110, 111: 1, 0.
Q2 · 4 marks
  • A NAND B is 1, 1, 1, 1, 1, 1, 0, 0 (working column).
  • Rows 000 to 011: X = 1, 0, 1, 0.
  • Rows 100, 101: X = 1, 0.
  • Rows 110, 111: X = 0, 1.
Q3 · 4 marks
  • (a) M = G AND (P OR Q).
  • (b) Rows 000 to 011: 0, 0, 0, 0.
  • Row 100: 0.
  • Rows 101, 110, 111: 1, 1, 1.
Q4 · 2 marks
  • Each input has two possible values, so there are 2 × 2 × 2 = 8 combinations.
  • Counting from 000 to 111 makes sure every combination appears once, with none missed or repeated.
Q5 · 2 marks
  • The student has worked out NOT A AND B (or applied the NOT to the wrong input).
  • Correct: NOT B is 1 only when B = 0, so X = 0, 0, 1, 0.
Q6 · 4 marks
  • A AND B: 0, 0, 0, 0, 0, 0, 1, 1.
  • B AND C: 0, 0, 0, 1, 0, 0, 0, 1.
  • X: 0, 0, 0, 1, 0, 0, 1, 1.
  • X = 1 in rows 011, 110 and 111 only.
Quiz

6 multiple-choice questions on this lesson

From the topic question bank. Assign them in the app for a marked score in your gradebook, or run the topic as a class game.

Q11 mark

A logic circuit has three inputs, A, B and C. How many rows of input combinations does its truth table need?

  • A8
  • B6
  • C9
  • D3
Q21 mark

Complete the output column of the truth table for X = NOT A AND B, for the rows A B = 00, 01, 10, 11.

  • A0, 1, 0, 0
  • B0, 0, 1, 0
  • C1, 1, 1, 0
  • D1, 1, 0, 1
Q31 mark

Complete the output column of the truth table for X = (A OR B) AND C. The rows are in binary counting order, from A B C = 000 to 111.

  • A0, 0, 0, 1, 0, 1, 0, 1
  • B0, 1, 0, 1, 0, 1, 1, 1
  • C0, 0, 0, 1, 1, 1, 1, 1
  • D0, 0, 0, 1, 0, 1, 0, 0
Q41 mark

The input rows of a three-input truth table are written in binary counting order. Which row comes straight after A B C = 0 1 1?

  • A1 0 0
  • B1 1 0
  • C0 1 0
  • D1 1 1
Q51 mark

In the full truth table for X = (A XOR B) OR NOT C, in how many of the 8 rows is X = 1?

  • A6
  • B5
  • C4
  • D7
Q61 mark

Which logic expression produces this truth table?

A B C X 0 0 0 0 0 0 1 1 0 1 0 0 0 1 1 1 1 0 0 0 1 0 1 1 1 1 0 0 1 1 1 0
  • AX = (A NAND B) AND C
  • BX = (A AND B) AND C
  • CX = (A NAND B) OR C
  • DX = (A NOR B) AND C
Quiz key
Q1: A

Each input has 2 possible values, so there are 2 × 2 × 2 = 23 = 8 combinations, 000 to 111. 6 is 2 × 3, which multiplies instead of using a power. 9 is 32, with the base and power swapped. 3 is just the number of inputs.

Q2: A

NOT A is 1, 1, 0, 0; ANDing it with B (0, 1, 0, 1) gives 1 only in row 01, so X = 0, 1, 0, 0. The column 0, 0, 1, 0 is A AND NOT B, with the NOT on the wrong input. 1, 1, 1, 0 applies NOT to the whole of A AND B. 1, 1, 0, 1 uses OR instead of AND.

Q3: A

A OR B is 0, 0, 1, 1, 1, 1, 1, 1; ANDing with C (0, 1, 0, 1, 0, 1, 0, 1) gives 0, 0, 0, 1, 0, 1, 0, 1. The column 0, 1, 0, 1, 0, 1, 1, 1 is (A AND B) OR C, with the gates swapped. 0, 0, 0, 1, 1, 1, 1, 1 is A OR (B AND C), with the brackets moved. 0, 0, 0, 1, 0, 1, 0, 0 uses XOR, which wrongly gives 0 in row 111.

Q4: A

011 is 3 in binary, so the next row is 4, which is 100. 110 is 6, skipping two rows. 010 is 2, the row before. 111 is 7, the last row of the table.

Q5: A

A XOR B is 0, 0, 1, 1, 1, 1, 0, 0 and NOT C is 1, 0, 1, 0, 1, 0, 1, 0. OR gives 1, 0, 1, 1, 1, 1, 1, 0: X = 1 in 6 rows (only 001 and 111 give 0). 4 counts the 1s in just one working column. 5 or 7 come from slipping one row, for example treating XOR as OR in row 111 gives 7.

Q6: A

X = 0 whenever C = 0, so C is ANDed with something; with C = 1, X = 0 only for A = 1, B = 1, which is A NAND B. So X = (A NAND B) AND C. (A AND B) AND C is 1 only in row 111. (A NAND B) OR C is 1 in every row except 110. (A NOR B) AND C is 1 only in row 001.

Lab and demo

What to project

The student lesson embeds these tabs. Open them full screen on the projector; every slider has a drag handle on the stage.

Slides

Slides for this lesson

A projectable deck for every pack is on the way. Until then, present the student lesson full screen: its sections, figure and lab tabs follow the same order as the plan above.

Also for this topic

Everything else you can use

Original work by the TheLucidSTEM team. The worksheet items are written in the style of the papers; no past paper question is reproduced.
Previous lessonDrawing logic circuits