A logic problem can be written in four ways: as a problem statement, a logic expression, a logic circuit or a truth table. Exam questions give you one and ask for another. Learn a reliable method for every conversion, using working columns so no row goes wrong.
A logic circuit connects gates so that the output of one is an input to the next, from the inputs on the left to the output on the right. A logic expression such as X = (A AND NOT B) OR (B NOR C) describes the same circuit: each bracket is one gate. To build a truth table, list every input combination in binary counting order and add a working column for each intermediate gate output. To get an expression from a truth table, take each row where X = 1, AND the inputs together (using NOT for each 0), then OR these terms: the sum of products. In 9618, every gate except NOT has exactly two inputs.
Fig. 1: a three-input circuit; input B is used twice, shown by the junction dot, and the intermediate outputs are labelled P and Q
Section 01
Expression, circuit and truth table.
Choose an expression in the lab and watch it become a circuit, then switch the inputs to see the values travel through each gate. Every conversion between an expression and a circuit works bracket by bracket.
Expression to circuit: each bracket is one gate fed by the inputs named inside it. NOT before a single input is a NOT gate on that input; NOT before a bracket is a NOT gate on that gate's output. The operator outside the brackets is the final gate.
Circuit to expression: label the output of each gate (P, Q) working from the inputs towards the output, then substitute: X = P OR Q = (A AND NOT B) OR (B NOR C).
Circuit or expression to truth table: 3 inputs give 8 rows. Add a working column for each intermediate output, then combine them for X.
A
B
C
P = A AND NOT B
Q = B NOR C
X = P OR Q
0
0
0
0
1
1
0
0
1
0
0
0
0
1
0
0
0
0
0
1
1
0
0
0
1
0
0
1
1
1
1
0
1
1
0
1
1
1
0
0
0
0
1
1
1
0
0
0
Worked example One row by hand
For the circuit in Fig. 1, find X when A = 1, B = 0, C = 1.
P = A AND NOT B = 1 AND NOT 0 = 1 AND 1 = 1.
Q = B NOR C = NOT (0 OR 1) = NOT 1 = 0.
X = P OR Q = 1 OR 0 = 1.
Answer: X = 1 (row 101 of the table)
Examiner trap
Working columns earn marks and catch errors. Examiners give credit for a correct output column; a missing or out-of-order row loses it, so always list the inputs 000 to 111.
Section 02
From a problem statement.
Pick a problem in the lab, write your own expression first, then reveal the answer to check. Turn each condition into a letter, each "and", "or" and "not" into an operator, and add brackets to show which conditions belong together.
Phrase in the statement
Logic
"D is on", "the door is open" (given as 1)
D
"the door is closed" (given as 0), "not ..."
NOT D
"both ... and ..."
AND
"either ... or ..." (or both)
OR
"either ... or ... but not both", "exactly one of"
XOR
"not both", "neither ... nor ..."
NAND, NOR
Worked example An alarm
An alarm X sounds if the door is open (D = 1) and the system is armed (R = 1), or if smoke is detected (S = 1). Write the logic expression and the truth table.
Conditions joined by "and" go in one bracket: (D AND R).
"or if smoke is detected" is OR with S: X = (D AND R) OR S.
Rows in the order D R S = 000 to 111. X is 1 whenever S = 1, and also for D = 1, R = 1, S = 0.
Output column: 0, 1, 0, 1, 0, 1, 1, 1.
Answer: X = (D AND R) OR S; X = 01010111 in rows 000 to 111
Your turn
A pump P runs when the tank is not full (F = 0) and either the timer T is on or the manual switch M is on (or both). Write the expression and give the rows (F T M) where P = 1.
P = NOT F AND (T OR M). P = 1 for rows 001, 010 and 011 only.
Examiner trap
Do not draw a three-input gate. To combine three conditions with AND, use two two-input gates, for example (A AND B) AND C.
Stage 1 · Learn
Check what the sim just showed you
Four quick checks. Each correct answer earns XP and records this skill on your profile.
Quick check+10 XP
In Fig. 1, what is X when A = 0, B = 0 and C = 0?
Quick check+10 XP
X = NOT (A OR B) AND C. For which inputs is X = 1?
Quick check+10 XP
A truth table has X = 1 only for A = 1, B = 0. Which expression matches it?
Quick check+10 XP
Which phrase in a problem statement usually means XOR?
Section 03
From a truth table.
Fill in truth tables in the lab until the output column comes easily. To go the other way, from a table to an expression, use the sum of products: one AND term for each row where X = 1.
Find every row where the output X = 1.
For each of those rows, write an AND term containing every input: the input itself if it is 1, NOT the input if it is 0.
Join the terms with OR. Because each gate has two inputs, a term with three inputs needs two AND gates: ((NOT A AND B) AND C).
Check: substitute one row where X = 1 and one where X = 0.
Worked example Two rows give two terms
A truth table for inputs A, B, C has X = 1 only in rows 011 and 101. Write a logic expression for X.
Row 011: A = 0, B = 1, C = 1 gives the term (NOT A AND B AND C).
Row 101: A = 1, B = 0, C = 1 gives the term (A AND NOT B AND C).
OR the terms together.
Check row 111: both terms contain a NOT, so both are 0 and X = 0, as the table says.
Answer: X = (NOT A AND B AND C) OR (A AND NOT B AND C)
Your turn
Look again at the two rows in the example: C is 1 in both, and A and B are different. Write a shorter expression with the same truth table.
X = C AND (A XOR B). Its output is 1 only when C = 1 and A differs from B: rows 011 and 101, the same as before.
Examiner trap
A sum-of-products answer is accepted even if it is not the simplest. A shorter expression is only right if it gives the same output for all 8 rows: check it with a truth table.
Stage 2 · Exam
Exam-style questions
Unlocks once the four checks above are done. Worth more XP, written to AS Paper 1 and Paper 2 standard.
Finish the four checks above to unlock the exam questions
Exam style+20 XP
A circuit has an AND gate with inputs A and B and a NOT gate with input C. Their outputs are the inputs of a NOR gate. Which expression represents the circuit?
Exam style+20 XP
X = (A NAND B) XOR (B OR C). What is X when A = 1, B = 1, C = 0?
Exam style+20 XP
How many gates are needed to draw X = (A AND B AND C) using only the gates allowed in 9618?
Exam style+20 XP
A truth table has X = 1 only for rows 001 and 110 (A B C). Which expression is correct?
Skill unlocked
Logic circuits, truth tables and expressions, mastered.
This skill is now recorded on your profile. Keep the chain going.