Teachers' Portal  /  IGCSE Computer Science 0478  /  Boolean logic  /  Drawing logic circuits
Lesson pack · IGCSE Computer Science 0478 · 10 (3) · IGCSE

Drawing logic circuits

Gates, wired together. A single gate cannot do much, but connect a few together and you can control an alarm, a greenhouse fan or a vending machine.

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 2 of 4 in Boolean logic; follows The six logic gates; leads into Completing truth tables
Central model
Fig. 1: the circuit for X = (A AND B) OR NOT C, with the output of each gate labelled
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
  • From an expression: Choose an expression in the lab and watch it become a circuit.
  • From a problem statement: Pick a problem in the lab.
  • From a truth table: Look at the rows where the output is 1.
Key points to leave on the board
  • Each bracket is a gate; the operator outside the brackets is the final gate.
  • Statements: and = AND, or = OR, not or = 0 means NOT. Draw what is written; do not simplify.
  • Truth tables: one AND term per row where X = 1, joined with OR; or spot a single gate.
  • Two inputs per gate (one for NOT), at most three inputs and one output; label everything.
The core visual model

One picture every idea returns to

A logic circuit joins gates so that the output of one gate becomes an input of the next. Work from the inputs on the left to the single output on the right. Every bracket in an expression is one gate whose output feeds the next gate. At IGCSE, NOT has one input and every other gate has exactly two inputs, so three inputs need two gates; circuits have at most three inputs and one output. Draw the circuit for the statement exactly as given, without simplifying it.

A B C X A AND B NOT C X = (A AND B) OR NOT C
Fig. 1: the circuit for X = (A AND B) OR NOT C, with the output of each gate labelled
Lesson sequence

Forty-five minutes, phase by phase

TimePhaseWhat happens in the roomGrouping
0 to 5 minHook: predictOpen with the question in the title, Gates, wired together.. A single gate cannot do much, but connect a few together and you can control an alarm, a greenhouse fan or a vending machine. 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: From an expressionChoose an expression in the lab and watch it become a circuit. Project tab 2 of the lab (Expression to circuit) and let a student drive it while the class predicts. Model the worked example Three gates on the board, one line at a time. Your turn: Which gates, and how many, are needed for X = NOT (A AND B) XOR C?Whole class, then pairs
13 to 21 minTeach and check: From a problem statementPick a problem in the lab. Project tab 3 of the lab (Problem statements) and let a student drive it while the class predicts. Model the worked example Greenhouse fan on the board, one line at a time.Pairs
21 to 30 minTeach and check: From a truth tableLook at the rows where the output is 1. Model the worked example Three inputs on the board, one line at a time. Your turn: A two-input truth table has X = 1, 0, 1, 1 for the rows 00, 01, 10, 11. Which two gates make it?Corners
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, 17 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 truth table, 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

Corners

Put one answer or viewpoint in each corner of the room. Students move to the corner they agree with, justify the choice to a partner there, then hear one voice from each corner before the reveal.

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
Do not draw a three-input AND gate: at IGCSE every gate except NOT has exactly two inputs.To AND together A, B and C, use two gates: (A AND B) AND C.
Do not simplify.If the statement says "(L and S) or (M and S)", draw two AND gates and an OR gate, even though a shorter circuit would give the same table.
Worksheet

Drawing logic circuits: worksheet

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

NameClassDate
Q1 · write[2 marks]

Draw the logic circuit for X = (A NOR B) AND C. Describe the gates and how they are connected.

Q2 · write[4 marks]

Draw the logic circuit for X = NOT (A AND B) OR (B XOR C). Describe the gates and how they are connected.

Q3 · apply[4 marks]

A water pump P switches on (P = 1) if the tank is low (L = 1) and the mains supply is on (S = 1), or if the manual switch is on (M = 1) and the mains supply is on (S = 1). Write the logic expression and describe the circuit. Do not simplify it.

Q4 · apply[2 marks]

A truth table has inputs A and B. The output X is 1, 0, 1, 1 for the rows A B = 00, 01, 10, 11. Draw a logic circuit with two gates that produces this truth table.

Q5 · analysis[2 marks]

A student draws X = (A AND B) AND C as a single AND gate with three inputs. Explain why this is not acceptable at IGCSE and describe a correct circuit.

Q6 · apply[3 marks]

A truth table has inputs A, B and C. The output X is 1 only in the row A = 0, B = 1, C = 1. Write a logic expression for X and describe a circuit for it.

Answer key and marking notes
Q1 · 2 marks
  • A NOR gate with inputs A and B.
  • An AND gate with inputs from the NOR gate and C; its output is X.
Q2 · 4 marks
  • An AND gate with inputs A and B.
  • A NOT gate on the output of the AND gate.
  • An XOR gate with inputs B and C.
  • An OR gate with inputs from the NOT gate and the XOR gate; its output is X.
Q3 · 4 marks
  • P = (L AND S) OR (M AND S).
  • An AND gate with inputs L and S.
  • A second AND gate with inputs M and S.
  • An OR gate with inputs from the two AND gates; its output is P.
Q4 · 2 marks
  • X is 0 only for A = 0, B = 1, so X = A OR NOT B.
  • A NOT gate on B, and an OR gate with inputs A and NOT B; its output is X.
Q5 · 2 marks
  • Logic gates other than NOT are limited to two inputs.
  • Use one AND gate for A and B, then a second AND gate with its output and C.
Q6 · 3 marks
  • X = (NOT A AND B) AND C.
  • A NOT gate on A, and an AND gate with inputs NOT A and B.
  • A second AND gate with inputs from the first AND gate and C; its output is X.
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

In IGCSE logic circuits, how many inputs does each gate other than NOT have?

  • Aexactly two
  • Bexactly one
  • Ctwo or three
  • Das many as the circuit needs
Q21 mark

How many logic gates are needed to draw the circuit for X = (A NAND B) OR (B AND C), exactly as written?

  • A3
  • B2
  • C4
  • D5
Q31 mark

In this logic circuit, the inputs are A = 1, B = 0 and C = 0. What are the values of P and X?

A B C X P
  • AP = 1, X = 1
  • BP = 1, X = 0
  • CP = 0, X = 0
  • DP = 0, X = 1
Q41 mark

A door alarm D sounds (D = 1) when the door is open (O = 1) and the alarm is set (S = 1). Which single gate should be used to produce D from O and S?

  • AAND
  • BOR
  • CXOR
  • DNAND
Q51 mark

A pump P runs (P = 1) when the tank is not full (F = 0) and either switch A or switch B is on (= 1). Which circuit is correct?

  • Aa NOT gate on F, an OR gate for A and B, and an AND gate joining their outputs
  • Ban OR gate for A and B, and an AND gate joining its output to F
  • Ca NOT gate on F, an AND gate for A and B, and an OR gate joining their outputs
  • Da NOT gate on F, an AND gate joining it to A, and an OR gate joining that to B
Q61 mark

Which set of inputs makes the output of this logic circuit X = 1?

A B C X
  • AA = 0, B = 0, C = 1
  • BA = 1, B = 1, C = 1
  • CA = 0, B = 0, C = 0
  • DA = 1, B = 0, C = 1
Quiz key
Q1: A

Every gate except NOT has exactly two inputs, so a condition on three inputs needs two gates. Exactly one is true only for NOT. Three-input gates are not used at IGCSE. A circuit can have up to three inputs in total, but each individual gate still has two.

Q2: A

Each operator is one gate: a NAND gate for A and B, an AND gate for B and C, and an OR gate joining their outputs, so 3. Two gates would leave out the OR gate that produces X. Four or five counts letters or brackets, but input B is simply wired to two gates and needs no gate of its own.

Q3: A

P comes from the XOR gate: 1 XOR 0 = 1, because exactly one input is 1. C = 0 goes through the NOT gate to give 1. The AND gate then has inputs 1 and 1, so X = 1. P = 1, X = 0 forgets to invert C. P = 0 treats the first gate as AND (or NOR) instead of XOR.

Q4: A

The alarm needs the door open and the alarm set, so both inputs must be 1: an AND gate. OR would sound the alarm when the alarm is not set. XOR would stay silent when both are 1, the very case the alarm is for. NAND would sound it in every case except the one that matters.

Q5: A

The statement gives P = NOT F AND (A OR B): invert F, combine the switches with OR, then join the two with AND. Wiring F straight into the AND gate makes the pump run when the tank is full. Swapping the AND and OR roles gives NOT F OR (A AND B), so the pump could run with no switch on. The last circuit, (NOT F AND A) OR B, lets switch B run the pump even when the tank is full.

Q6: A

The first gate is NOR (OR shape with a circle), which outputs 1 only when A = 0 and B = 0. The AND gate then needs C = 1 as well, so X = 1 only for A = 0, B = 0, C = 1. With A = 1 and B = 1 the NOR output is 0, so X = 0. With C = 0 the AND gate outputs 0. With A = 1 the NOR output is 0, so X = 0 even though C = 1.

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 lessonThe six logic gates