This key facts covers Writing Expressions from Truth Tables within Boolean Expressions for GCSE Computer Science. Revise Boolean Expressions in 3.4 Computer Systems for GCSE Computer Science with 17 exam-style questions and 22 flashcards. This topic appears regularly enough that it should still be part of a steady revision cycle. It is section 7 of 12 in this topic. Use this key facts to connect the idea to the wider topic before moving on to questions and flashcards.
Writing Expressions from Truth Tables
You can derive a Boolean expression directly from a truth table using the Sum of Products (SOP) method:
Step 1: Find all rows where the output = 1
Step 2: For EACH of those rows, write an AND expression:
- If an input is 1, write it as-is (A)
- If an input is 0, write it with NOT (NOT(A))
Step 3: OR all these AND expressions together
Given: Output is 1 when:
- Row 1: A=0, B=1 → Output=1
- Row 2: A=1, B=1 → Output=1
Step 1: Identify rows with output 1 ✓
Step 2: Write AND expressions for each row:
- Row 1 (A=0, B=1): NOT(A) AND B
- Row 2 (A=1, B=1): A AND B
Step 3: OR them together:
(NOT(A) AND B) OR (A AND B)
Simplified: This actually simplifies to just B (because B is 1 in both cases, regardless of A)
Practice questions for Boolean Expressions
Which Boolean operator produces an output of 1 only when BOTH inputs are 1?
State De Morgan's first law and give an example to illustrate it.