/en-tutor-prep-alevel-computer-science-logic-gates-circuits/
/en-tutor-prep-alevel-computer-science-logic-gates-circuits/
General Inquiry: info@TutorZone.com.hk
Office Hours: Monday to Saturday - 9:00 AM to 6:00 PM
WhatsApp Monday to Sunday - 24 hours
Hotline: +852 6828 1809
Instant Support: +852 9061 3106

A-Level Computer Science — Logic Gates and Logic Circuits: six gates, truth tables and expressions (lesson-prep guide for tutors)

A-Level Computer Science — Logic Gates and Logic Circuits: six gates, truth tables and expressions (lesson-prep guide for tutors)

  • 2026-11-27

Most students can recite AND and OR, then fall apart on NAND and draw XOR as OR. This chapter pins all six gates to one line each: AND outputs 1 only when both inputs are 1, OR outputs 0 only when both are 0, NAND and NOR are those answers flipped, and XOR outputs 1 only when the inputs differ. Every question type afterwards is just moving those 4 rows up to 8.

Objectives — Students can: (1) draw the six symbols and define each in one sentence, stating that every gate except NOT has exactly two inputs; (2) write all six truth tables and name the exception row for each, with AND true in 1 row, OR false in 1, NAND false in 1 and XOR true in 2; (3) build a circuit from an expression and count the gates; (4) build a 8-row truth table from a problem statement, such as an alarm that sounds when a door or window is open and the system is armed, true in only 3 of the 8 rows; (5) write an expression back from a truth table by turning each true row into an AND group and OR-ing the groups; (6) state that an XOR costs 4 NAND gates against 5 with AND, OR and NOT.

01 Prerequisites (3-minute check)

If any of these fails, fix it before the lesson starts.

Skill Quick check Pass mark
Binary 0 and 1 What does 1 mean and what does 0 mean 1 is true or current on, 0 is false or current off
Everyday AND and OR You must bring a pen and a book; is a pen alone enough No, and means both
NOT What is NOT 1 0
Counting truth-table rows How many rows for a circuit with three inputs Eight, doubling with each extra input
Reading a circuit diagram Signals flow left to right; where does a gate output go Into the input of the next gate

02 Lesson flow (60 minutes)

Time Stage Tutor does Student does
0-8 min Quick check and six symbols Ask about and versus or, then draw all six symbols Name each symbol
8-20 min Truth tables for the three basic gates Fill NOT, AND and OR row by row, naming the one exception row Fill four rows unaided
20-32 min NAND, NOR and XOR NAND and NOR as flipped answers, XOR as different gives 1 Explain how XOR differs from OR
32-44 min Circuits from statements and expressions Alarm in three steps, then count gates Draw the circuit and count gates
44-52 min Expressions from truth tables and the half adder One AND per true row then OR them; SUM as XOR and CARRY as AND Write both expressions
52-60 min Practice and exit check Take three answers and mark them live Work independently

03 Teaching script (read it out)

Scene 1: Six symbols, three sentences

Draw three shapes first: a triangle with a small circle (NOT), a semicircle (AND) and a pointed semicircle (OR). Then say three sentences. NOT turns 0 into 1 and 1 into 0. AND outputs 1 only when both inputs are 1. OR outputs 1 when at least one input is 1.
Draw the other three underneath and derive them with the same sentence: NAND is AND followed by NOT, so it is the exact opposite of AND and only one of the 4 rows is 0; NOR is OR followed by NOT and only one row is 1; XOR, exclusive or, outputs 1 when the inputs differ, so two 1s give 0.
State the hard rule here: the syllabus says every gate except NOT has exactly two inputs. A three-input AND is therefore wrong; the correct build is (A AND B) then AND with C, which uses two gates. This rule comes back when students count gates.
Student task: from memory, write the four NAND rows and the four NOR rows, and name the single exception row in each.

Say this: six gates are three answers plus flipped and different.

Scene 2: The truth table is the workbench

The truth table is the only workbench in this chapter. Write the four rows 00, 01, 10 and 11 on the board and read each row left to right. For AND, hold a hand up only on 11. For OR, keep the hand down only on 00. NAND and NOR swap those two gestures. XOR raises the hand on 01 and 10 because the inputs differ.
Then give a number students find surprising: two inputs allow 16 different truth tables, because there are four rows with two possible answers each, and the syllabus names only six of them. Three inputs allow 256. The point is not to memorise the number but to see that an expression selects one truth table out of many.
Count gates next. If Q equals NOT (A AND B) OR (C XOR D), the circuit needs 4 gates: one AND, one NOT, one XOR and one OR, over 4 inputs. Have students count aloud; most errors are a missed NOT circle. This question type appears almost every series.
Student task: for Q equals (A OR B) AND NOT C, draw the circuit, count the gates and state which of the three-input rows give 1.

Say this: fill four rows, count the gates, then talk about the answer.

Scene 3: From one sentence to eight rows, then back to two

Run the whole loop twice, once forwards from a problem statement and once backwards from a truth table.
Alarm first: D is door open, W is window open, A is armed, and the alarm sounds when a door or window is open and the system is armed. Three inputs means 8 rows. Ask row by row: where A is 0 nothing sounds, so 4 rows are 0 at once; of the four rows where A is 1, only 011, 101 and 111 have D or W set, so 3 rows are true.
Then a majority vote: three judges, two or more in favour passes, Q equals (A AND B) OR (B AND C) OR (A AND C). Of the 8 rows, 4 are true: 011, 101, 110 and 111. Students should notice that the three rows with a single 1 are all false.
Finally go backwards. Take the alarm rows 011, 101 and 111, write each as an AND group, then OR the groups. That expression is always correct though gate-hungry, and it simplifies to (D OR W) AND A, which is 3 gates. Say clearly that simplification is not a separate mark: a correct long expression already scores, so never leave the answer blank because the tidy form is not obvious.
Close with the half adder, the shortest case of two gates doing arithmetic: SUM equals A XOR B and CARRY equals A AND B, 2 gates in total. The 1 plus 1 row gives SUM 0 and CARRY 1, and that is the cell students usually write as SUM 1.
Add one line on NAND economics: NOT costs 1 NAND gate, AND costs 2, OR costs 3 and XOR costs 4, one fewer than the 5 gates of AND, OR and NOT, so a factory can stock a single gate type.
Student task: write the 8 rows of the majority vote, then explain why 1 plus 1 gives SUM 0 rather than 1.

Say this: one sentence becomes eight rows, eight rows become two; simplifying earns extra, being right earns the mark.

04 Question types and worked steps

Type Example Steps Answer
Truth table from gates Two-input AND and NAND Write 00, 01, 10, 11 then apply the definition row by row AND gives 0, 0, 0, 1; NAND gives 1, 1, 1, 0
Circuit and gate count from an expression Q equals NOT (A AND B) OR (C XOR D) Work from the innermost bracket out, one gate per operator, then total 4 gates over 4 inputs
Truth table from a problem statement Alarm: door or window open and armed Count inputs for the rows, ask the condition on each row 8 rows, true in 3 (011, 101, 111)
Expression from a truth table Output is 1 only on 00 and 11 One AND group per true row, OR the groups; or same gives 1 equals NOT XOR NOT (A XOR B), 2 gates
Half adder SUM and CARRY of A plus B SUM looks at different, CARRY looks at both being 1 SUM equals A XOR B, CARRY equals A AND B, 2 gates
Sanity check (teach this): Six checks. First, rows are always 2 to the power of the inputs: 4 for two, 8 for three and 16 for four, so six or ten rows means missing combinations. Second, AND and OR mirror each other: AND is true in 1 row (both 1) and OR is false in 1 row (both 0), and getting these backwards means the definitions were swapped. Third, NAND and NOR must flip the counts: NAND gives three 1s and 1 zero, NOR the reverse. Fourth, XOR is true in 2 rows and those rows must be the differing pairs 01 and 10; three true rows means OR was drawn. Fifth, the gate count equals the number of operators, counting each NOT as a gate, so 4 gates go with four operators. Sixth, no gate except NOT may have three inputs, so a three-input AND costs two gates, not one.

05 Independent practice (3 questions)

Question Answer What to watch
For Q equals (A XOR B) AND C, write all 8 rows and say how many output 1. 8 rows; only two are 1, at A 0, B 1, C 1 and at A 1, B 0, C 1 XOR gives two 1s first, then AND with C keeps both
A lamp lights only when a white mouse and a black mouse appear together, or when neither appears. Write the expression using only the six gates. NOT (W XOR B): XOR is 1 when the inputs differ, so inverting it gives 1 when they match, two gates Same gives 1 has no gate of its own, so invert XOR
How many NAND gates build an XOR, and how many AND, OR and NOT gates build the same XOR? What is the difference? 4 NAND gates against 5 (two AND, two NOT, one OR), a difference of 1 NAND is universal: any circuit can be built from it alone

06 Common mistakes and what to say

Mistake Student writes Say this
Treating XOR as or Saying XOR means A or B, so 1 or 1 gives 1 XOR is different gives 1, so 1 and 1 give 0, while OR gives 1. Make the student state rows 01 and 10.
Inverting only one input of NAND Writing NAND as 1, 0, 1, 0 for 00, 01, 10, 11 NAND inverts the whole AND answer: AND is 0, 0, 0, 1, so NAND is 1, 1, 1, 0 and only 11 is 0.
Drawing a three-input gate Drawing one three-input AND fed by D, W and A The syllabus allows two inputs only except NOT, so three inputs need two gates: ((D AND W) AND A).
Writing 1 plus 1 as SUM 1 Half adder: 1 plus 1 gives SUM 1 and CARRY 0 1 plus 1 is binary 10, so the SUM bit is 0 and the carry is 1: XOR gives 0, AND gives 1.

07 Homework (paper, section and question numbers)

08 Exit check (last 5 minutes)

Question Answer Decision
One exception row NAND is 0 only on 11 Two zero rows means scene 2 needs redoing
One hard rule Every gate except NOT has two inputs Allowing three means scene 1 needs redoing
One number The alarm is true in 3 of its 8 rows Four rows means scene 3 needs redoing

09 Tutor FAQ

Why does the syllabus allow only two inputs per gate?

Because the truth-table definition is written for two inputs: a third input moves the table from 4 rows to 8 and the marking template no longer applies. Three inputs are handled by chaining two two-input gates, so each step can be checked against its own table.

How should a student tell XOR from OR under exam pressure?

OR means at least one 1, so 11 is also 1 and only 00 gives 0. XOR means exactly one 1, so 11 gives 0 and 2 of the 4 rows are true. Writing those two rows first prevents the mistake.

Must an expression taken from a truth table be simplified?

The syllabus asks for a correct expression, and simplification is not a separate mark. A long form is correct as long as each AND group matches one true row and the groups are OR-ed. Simplification may be attempted when time allows, and must be re-checked against all rows of the table.

Find a tutor — freeTutor Registration →

A TutorZone lesson-prep guide. Written by the TutorZone team; questions and lesson flow are original and are not taken from any school or publisher material.

Join as a tutor or coach — academic, music, sports, arts, STEM. Free to register. See how it works →