Learning Objectives
By the end of this lesson, you should be able to:
- Identify and use the standard symbols for NOT, AND, OR, NAND, NOR and XOR gates.
- Define and understand the functions of the logic gates.
- Use logic gates to create given logic circuits from a problem statement, logic expression or truth table.
- Complete a truth table from a problem statement, logic expression or logic circuit.
- Write a logic expression from a problem statement, logic circuit or truth table.
- Use the binary output and input combinations systematically, including circuits with up to three inputs and one output.
- The six gates are NOT, AND, OR, NAND, NOR and XOR (Exclusive OR).
- NOT is a single-input gate; the other gates in the examples use two inputs.
- For n inputs, the number of possible binary combinations is 2n.
- Three inputs give 8 combinations and four inputs give 16 combinations.
- The IGCSE logic circuits shown are limited to a maximum of three inputs and one output.
Key Terms
- Boolean logic— logical decision-making using TRUE/FALSE, often represented by 1/0.
- Logic gate— a visual way of representing a Boolean expression.
- Logic circuit— a combination of logic gates arranged to perform a particular function.
- Logic diagram— a visual representation of the combination of logic gates within a circuit.
- Truth table— a table containing all possible inputs and the associated outputs.
- Logic expression— a way of expressing a logic gate or logic circuit as an equation.
- Intermediate value— a value produced by one stage of a logic circuit and used by a later stage.
- Binary— information represented using two states, 0 and 1.
ICE Breaking: Recap Previous Chapter
The lesson begins with a recap of parity checks before introducing Boolean Logic.
- An even-parity system checks whether the total number of 1s is even.
- The recap uses received bytes and a parity table to identify a wrongly transmitted bit.
- The worked answer identifies byte 7, column 6 as the incorrect bit.
- The binary value 10111110 is 190 in decimal.
- A parity check may fail to identify an error when bits are interchanged, an even number of bits are transposed, or multiple errors occur in the same byte/column arrangement.
Resources included in the notes
- Introduction to Logic Gates and Logic Circuit video:YouTube link.
- Logic circuits, truth tables and logic expressions:video linkandalternative video link.
- Basic logic gate examples:Wisc-Online.
- The notes also refer to Hodder Education and Craig ’n’ Dave resources.
Activity 1: Parity recap
State the decimal value of 10111110 and give one situation in which parity may fail to identify an error.
- 10111110 has a decimal value of 190.
- Two interchanged bits can leave parity unchanged.
Activity 2: Connect the topics
What common skill does the parity recap share with truth tables?
- Both use tables systematically.
- Both require careful checking of binary states or combinations.
Check Your Understanding: Recap
1. What does an even parity system check?
- It checks whether the total number of 1s is even.
- The parity bit is included.
- An unexpected parity result indicates an error.
- It is used as a transmission-error check.
2. What decimal value does 10111110 represent?
- The value is 190.
- The number is interpreted in binary.
- The 1-bits represent powers of 2.
- The total is 190.
3. What bit was identified as incorrect in the recap?
- It is in byte 7.
- It is in column 6.
- The row and column identify the bit.
- This comes from the parity-table check.
4. Give one situation in which parity may fail to detect an error.
- Two bits may be interchanged.
- One 1 can become 0 while another 0 becomes 1.
- The number of 1s can remain unchanged.
- Parity may then still appear correct.
5. Why is the recap useful before Boolean Logic?
- It reinforces binary values.
- It uses systematic tables.
- It encourages careful checking.
- Truth tables also use binary 0 and 1.
- It prepares students to trace gate outputs.
1. Identify and Use the Standard Symbols for Logic Gates
Electronic circuits in computers, memory and controlling devices are made from logic gates. Gates take binary inputs and produce a binary output. When gates are combined to carry out a particular function, such as controlling a robot, they form a logic circuit.
AND
TRUE only if both inputs are TRUE.
OR
TRUE if either input is TRUE.
NOT
reverses the input.
NAND
TRUE if either or both inputs are FALSE.
NOR
TRUE if both inputs are FALSE.
XOR
TRUE if either input is TRUE but NOT both.
Real-life examples used in the notes
- AND: a person sensor and an alarm switch are both ON before a burglar alarm activates.
- OR: a front doorbell switch or a back doorbell switch can activate a doorbell.
- NOT: a temperature detector can provide the opposite state.
- XOR: a stairway-light example acts when the two states are not the same.
| Gate | 00 | 01 | 10 | 11 |
|---|---|---|---|---|
| AND | 0 | 0 | 0 | 1 |
| OR | 0 | 1 | 1 | 1 |
| NAND | 1 | 1 | 1 | 0 |
| NOR | 1 | 0 | 0 | 0 |
| XOR | 0 | 1 | 1 | 0 |
NOT:0 → 1 and 1 → 0.
Interactive Visualisation: Gate Simulator
Change the gate or binary inputs and see the output.
Activity 1: Gate identification
Classroom / homework
Which gate gives 1 only when both inputs are 1? Which gate gives 1 only when both inputs are 0?
- AND gives 1 only for 1,1.
- NOR gives 1 only for 0,0.
Activity 2: XOR or OR?
Classroom / homework
For inputs 1 and 1, state the output of OR and XOR and explain the difference.
- OR outputs 1.
- XOR outputs 0.
- OR is true when at least one input is 1.
- XOR is true only when exactly one input is 1.
Check Your Understanding: Logic Gates
1. What is Boolean logic?
- It is used in computer science and electronics to make logical decisions.
- Boolean values are TRUE or FALSE.
- They are often represented by 1 or 0.
- Inputs and outputs can be represented by letters.
2. What does an AND gate do?
- It has two inputs in the examples.
- Its output is 1 only if both inputs are 1.
- If either input is 0, the output is 0.
- The 1,1 row is the only row with output 1.
3. What does an XOR gate do?
- It means Exclusive OR.
- It gives 1 when the inputs are different.
- It gives 0 when both inputs are 0.
- It also gives 0 when both inputs are 1.
4. How is NAND related to AND?
- NAND means NOT AND.
- It is the opposite result of AND.
- It gives 1 for 0,0; 0,1 and 1,0.
- It gives 0 for 1,1.
5. How is NOR related to OR?
- NOR means NOT OR.
- It is the opposite result of OR.
- It gives 1 only for 0,0.
- It gives 0 when at least one input is 1.
2. Logic Circuits
A logic circuit performs logical operations on binary information. Logic gates are the core components. A logic diagram visually represents combinations of gates. Brackets clarify the order of operations.
Example: Q = NOT(A OR B)
- A and B are the inputs.
- P is the output of the OR gate.
- P becomes the input to the NOT gate.
- Q is the final output.
Real-life worked example: sprinkler system
The sprinkler switches on if it is not daytime (A) and the temperature is greater than 40 (B).
The notes warn that exam questions may ask you to draw a logic circuit from a logic statement or Boolean expression, or write the logical expression represented by a diagram. Circuits are limited to a maximum of three inputs and one output.
Activity 1: Draw a circuit
Classroom / homework
Draw a circuit for an output that is 1 only when A is NOT active and B is active.
- Send A through a NOT gate.
- Use NOT A and B as the inputs to an AND gate.
- The AND output is the final output.
Activity 2: Read a circuit
Classroom / homework
An OR gate feeds a NOT gate. Inputs are A and B. Write the expression.
Check Your Understanding: Logic Circuits
1. What is a logic circuit?
- It performs logical operations on binary information.
- It is made from logic gates.
- The arrangement of gates and input signals determines the function.
- It produces a final output.
2. What is a logic diagram?
- It is a visual representation of a combination of logic gates.
- Inputs and outputs can be labelled.
- Intermediate signals can be shown.
- It helps a reader see how the circuit works.
3. Why is P called an intermediate value in Q = NOT(A OR B)?
- P is produced by the OR gate.
- P is not the final circuit output.
- P becomes the input to the NOT gate.
- Q is the final output.
4. Why are brackets useful?
- They clarify the order of operations.
- They make a multi-gate expression easier to follow.
- They help match the expression to the circuit.
- They reduce the chance of misreading the expression.
5. What are the circuit limits stated in the notes?
- The examples use a maximum of three inputs.
- There is one output.
- Inputs should be identified clearly.
- The limits are part of the IGCSE guidance in the notes.
- Students should work systematically from left to right.
3. Truth Tables
Truth tables are used to trace the output from a logic gate or logic circuit. All possible combinations of 1s and 0s must be included.
- One input → 21= 2 combinations.
- Two inputs → 22= 4 combinations.
- Three inputs → 23= 8 combinations.
- Four inputs → 24= 16 combinations.
| Gate | 00 | 01 | 10 | 11 |
|---|---|---|---|---|
| AND | 0 | 0 | 0 | 1 |
| OR | 0 | 1 | 1 | 1 |
| NAND | 1 | 1 | 1 | 0 |
| NOR | 1 | 0 | 0 | 0 |
| XOR | 0 | 1 | 1 | 0 |
Step-by-step method for 3 inputs
- Count the inputs and calculate 2n.
- Start with 000 and count up in 3-bit binary to 111.
- Add a new column for the result of the brackets first.
- Add another column for NOT operations.
- Use the intermediate values to calculate the final output.
Worked example: P = (A AND B) AND NOT C
| A | B | C | A AND B | NOT C | P |
|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 1 | 0 |
| 0 | 0 | 1 | 0 | 0 | 0 |
| 0 | 1 | 0 | 0 | 1 | 0 |
| 0 | 1 | 1 | 0 | 0 | 0 |
| 1 | 0 | 0 | 0 | 1 | 0 |
| 1 | 0 | 1 | 0 | 0 | 0 |
| 1 | 1 | 0 | 1 | 1 | 1 |
| 1 | 1 | 1 | 1 | 0 | 0 |
Interactive Visualisation: Generate a Gate Truth Table
Choose a gate; the browser generates its truth table.
Activity 1: Count the rows
Classroom / homework
How many rows are required for three inputs?
- There are three inputs.
- Use 23.
- 2 × 2 × 2 = 8.
- So 8 combinations are required.
Activity 2: Complete XOR
Classroom / homework
Complete the four output values for XOR: 00, 01, 10, 11.
Check Your Understanding: Truth Tables
1. Why must all input combinations be listed?
- A truth table represents all possible inputs.
- Every possible 0/1 combination must be considered.
- Leaving out a row can omit a possible output.
- A complete table lets the circuit be checked systematically.
2. How many combinations are there for four inputs?
- Use 2n.
- Here n is 4.
- 24= 16.
- Therefore 16 rows are needed.
3. What is the XOR output for 1,1?
- The output is 0.
- XOR is true only when exactly one input is 1.
- Here both inputs are 1.
- Therefore the inputs are not exclusive.
4. Why use intermediate columns?
- They show results from earlier gates.
- They make complex expressions easier to calculate.
- They make error checking easier.
- They can be omitted from a final table when the student is confident.
5. How do you start a 3-input truth table?
- Identify A, B and C.
- Calculate 23= 8 rows.
- List the inputs from 000 to 111.
- Then calculate the circuit output for each row.
- Add intermediate columns when helpful.
4. Logic Expressions
A logic expression expresses a logic gate or logic circuit as an equation. The output appears on the left of the equals sign and the inputs and logic gates appear on the right.
| Gate | Expression | Meaning |
|---|---|---|
| NOT | Z = NOT A | Reverses A. |
| AND | Z = A AND B | Both inputs must be 1. |
| OR | Z = A OR B | Either input can be 1. |
| NAND | Z = A NAND B | NOT(A AND B). |
| NOR | Z = A NOR B | NOT(A OR B). |
| XOR | Z = A XOR B | Exactly one input is 1. |
In the teacher notes, a dot (·) represents AND and a plus (+) represents OR.
Examples from the notes
- Q = NOT(A OR B)
- Q = (NOT A) AND B
- P = ((NOT A) OR B) NAND C
- X = NOT(A NAND B) OR (B NOR C)
- The source also gives the more complex worked statement X = (((A AND B) OR (C AND NOT B)) XOR NOT C).
Activity 1: Convert words to an expression
Classroom / homework
Write an expression for “A is active AND B is NOT active”.
Activity 2: Convert a circuit to an expression
Classroom / homework
A NAND operation is applied to A and B, a NOR operation to B and C, and the two results are joined by OR. Write the expression.
Check Your Understanding: Logic Expressions
1. Where is the output placed in a logic expression?
- It is on the left of the equals sign.
- The equals sign separates the output from the operations.
- Inputs and gate operations appear on the right.
- For example, Z = A AND B.
2. What does A·B mean?
- The dot represents AND.
- A and B are the inputs.
- Both are required for a true result.
- A·B is the same operation as A AND B.
3. Write the expression for NOR with inputs A and B.
- The gate is NOR.
- NOR means NOT OR.
- The expression is Z = A NOR B.
- It can also be written Z = NOT(A OR B).
4. Why are brackets useful in complex expressions?
- They show the order of operations.
- They make the expression easier to follow.
- They help match the expression to a circuit.
- They reduce ambiguity.
5. How can a circuit containing multiple gates be expressed?
- Use one logic expression for the whole circuit.
- Show each gate operation in the expression.
- Use intermediate results where useful.
- Keep the final output on the left.
- Use brackets to make the order clear.
5. Use Logic Gates to Create Circuits, Complete Truth Tables and Write Logic Expressions
The notes show three directions of conversion: problem statement → circuit/truth table, logic expression → circuit/truth table, and truth table → expression/circuit.
Worked Example 1 — three-stage circuit
Q = B NOR C
R = P OR Q
X = R XOR C
The source breaks the circuit into Part 1, Part 2 and Part 3. It first finds P and Q, then R, then X. The final truth table records A, B, C and X; intermediate columns can also be included while working.
| A | B | C | P | Q | R | X |
|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 1 | 1 | 1 |
| 0 | 0 | 1 | 0 | 0 | 0 | 1 |
| 0 | 1 | 0 | 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 | 0 | 0 | 1 |
| 1 | 0 | 0 | 0 | 1 | 1 | 1 |
| 1 | 0 | 1 | 0 | 0 | 0 | 1 |
| 1 | 1 | 0 | 1 | 0 | 1 | 1 |
| 1 | 1 | 1 | 1 | 0 | 1 | 0 |
Worked Example 2 — safety system
The source describes a safety system in which A, B and C represent ON/OFF conditions. The alarm is ON for:
The two AND branches are then combined with an OR gate.
Worked Example 3 — wind turbine
The safety system monitors turbine speed S, bearing temperature T and wind velocity W. X = 1 shuts down the turbine when any of three combinations occurs:
- Turbine speed ≤ 1000 rpm AND bearing temperature > 80°C.
- Turbine speed > 1000 rpm AND wind velocity > 120 kph.
- Bearing temperature ≤ 80°C AND wind velocity > 120 kph.
The source translates these using AND, OR and NOT and then joins the three intermediate circuits with OR gates:
Stage 1 converts the real-world statements into logic statements. Stage 2 creates the intermediate circuits and connects them with OR gates.
From a truth table to a circuit
- Find the rows where the output = 1.
- Build a logic branch for each of those rows.
- Determine which inputs need NOT gates because the row contains 0.
- AND the required conditions together within each branch.
- Use OR gates to combine the branches.
- Construct the final logic expression and circuit.
| A | B | C | X |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 0 |
| 0 | 1 | 0 | 0 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 0 | 1 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 0 |
| 1 | 1 | 1 | 1 |
Activity 1: Identify the 1-rows
Classroom / homework
Using the truth table above, identify the two rows where X = 1.
- 100
- 111
Activity 2: Build the branches
Classroom / homework
Write the two AND branches needed for the 1-rows.
- A AND NOT B AND NOT C
- A AND B AND C
- Then OR the two branch results.
Check Your Understanding: Converting Between Representations
1. What is the safest way to calculate a complex circuit?
- List all input combinations first.
- Calculate the circuit stage by stage.
- Record intermediate results in separate columns.
- Use the final stage to obtain the output.
2. How does a problem statement help you choose gates?
- Look for words such as AND, OR and NOT.
- AND identifies conditions that occur together.
- OR identifies alternatives.
- NOT identifies an opposite condition.
3. What happens when several intermediate circuits are joined by OR?
- Each branch represents one acceptable condition.
- OR combines the branch results.
- If any branch is 1, the combined result can be 1.
- This matches a problem where any listed condition can trigger the output.
4. What is the first step when creating a circuit from a truth table?
- Find the rows where the output is 1.
- Each of those rows becomes a branch.
- Inputs in the row are used as conditions.
- The branches are combined later.
5. What is the purpose of an intermediate truth-table column?
- It records the result of part of the circuit.
- It makes a complex calculation easier to follow.
- It supports checking each gate separately.
- It helps prevent mistakes.
- It can be removed from the final table when appropriate.
6. Logic Circuits in the Real World and Practical Simulation
The notes connect logic circuits to real electronic design. Electronics companies must consider cost of components, fabrication and time when designing and building circuits.
Method 1 — off-the-shelf building blocks
One approach described is to use off-the-shelf building blocks when reviewing and building circuit designs.
Method 2 — simplify the circuit
The other approach is to simplify the logic circuit as far as possible. This may be necessary when space is at a premium, such as on circuit boards used in satellites for space exploration.
Practical Activity from the notes
The source introduces Logisim for simulating the basic NOT, AND and OR gates.
Logisim simulation videoActivity 1: Satellite design
Classroom / homework
Why is simplification useful for a circuit board in a satellite?
- Space can be at a premium.
- Simplifying the circuit reduces the amount of circuit complexity that must fit on the board.
Activity 2: Simulation check
Classroom / homework
Use the Logisim activity to test one NOT gate, one AND gate and one OR gate against their truth tables.
- Build or select the gate.
- Apply the truth-table inputs.
- Observe the output.
- Compare it with the expected truth-table result.
Check Your Understanding: Real-World Circuits
1. Name three real-world design factors from the notes.
- Cost of components.
- Fabrication.
- Time.
- These factors affect circuit design decisions.
2. What two design approaches are described?
- Use off-the-shelf building blocks.
- Simplify the logic circuit.
- The second approach reduces the circuit as far as possible.
- The approaches are ways to review circuit design.
3. Why are satellites used as an example of limited space?
- Satellite circuit boards can have very limited room.
- Circuit size therefore matters.
- Simplification may be necessary.
- The source specifically gives satellite boards as an example.
4. Which gates are included in the Logisim practical activity?
- NOT is included.
- AND is included.
- OR is included.
- The activity is about simulating basic gates.
5. Why compare a simulation with a truth table?
- The truth table gives the expected output.
- The simulation gives an observed output.
- Comparing them checks the gate behaviour.
- A difference can indicate an error in the circuit or inputs.
- It reinforces the relationship between a gate and its truth table.
Key Takeaways
- Boolean logic uses TRUE/FALSE, often represented by 1/0.
- Know the symbols and functions of NOT, AND, OR, NAND, NOR and XOR.
- XOR is 1 only when exactly one input is 1.
- A logic circuit combines gates to perform a particular function.
- A truth table contains every possible input combination.
- Use 2nfor n inputs.
- Intermediate columns make complex truth tables easier to calculate.
- Logic expressions put the output on the left of the equals sign.
- From a truth table to a circuit: find output-1 rows, build branches, AND the conditions, then OR the branches.
- Real-world design considers component cost, fabrication, time and limited space.
Question Bank — Entire Lesson
1. Explain the function of an AND gate. [4 marks]
- An AND gate has two inputs in the examples.
- Its output is 1 only when both inputs are 1.
- For 0,0; 0,1; and 1,0 the output is 0.
- The 1,1 row gives output 1.
2. Compare OR and XOR. [5 marks]
- OR is true when either input or both inputs are 1.
- XOR is true when exactly one input is 1.
- For 0,0 both give 0.
- For 0,1 and 1,0 both give 1.
- For 1,1 OR gives 1 but XOR gives 0.
3. Explain how to create a truth table for a circuit with three inputs. [5 marks]
- Count the inputs, giving n = 3.
- Calculate 23= 8 rows.
- List the input combinations from 000 to 111.
- Calculate intermediate gate results when useful.
- Use the final gate result to complete the output column.
4. Write the logic expression for a NOT gate followed by an AND gate with B. [4 marks]
- The first input is A.
- Apply NOT to A.
- Use B as the other input of the AND gate.
- The expression is Q = (NOT A) AND B.
5. Describe how to create a logic circuit from a truth table. [5 marks]
- Find the rows where the output is 1.
- Build one branch for each such row.
- Use NOT gates for input values that are 0.
- Use AND gates inside each branch.
- Use OR gates to combine the branches.
6. Explain the wind-turbine conversion process. [6 marks]
- Identify the three monitored conditions S, T and W.
- Translate each real-world condition into a logic statement.
- Use NOT when a condition is the opposite of an input state.
- Use AND for the paired conditions in each safety combination.
- Use OR to combine the three intermediate results.
- Complete the truth table from the resulting expression or circuit.
7. State the two main approaches to reviewing real-world circuit design in the notes and explain why one matters for satellites. [4 marks]
- One approach is to use off-the-shelf building blocks.
- The other is to simplify the logic circuit as far as possible.
- Simplification is useful when physical space is limited.
- The notes give satellite circuit boards as an example.
8. Write a Boolean expression for the two-branch safety example in the notes. [4 marks]
- The first branch is A AND NOT B.
- The second branch is B AND NOT C.
- The branches are alternatives, so use OR.
- X = (A AND NOT B) OR (B AND NOT C).
9. Explain why intermediate truth-table columns can be helpful. [4 marks]
- They show the result of earlier gates.
- They make multi-stage calculations easier to follow.
- They help check each stage for errors.
- They can be removed from a final table when the student is confident.
10. What should you remember about XOR in an exam? [5 marks]
- XOR means Exclusive OR.
- It is 1 when the two inputs are different.
- It is 0 for 0,0.
- It is 0 for 1,1.
- Do not confuse XOR with OR, because OR is 1 for 1,1.