Boolean Algebra Revision Notes
Subject: Computer Science | Level: GCSE | Exam Board: OCR
Master Boolean Algebra for your OCR GCSE Computer Science exam. This guide breaks down logic gates, truth tables, and circuit diagrams into easy-to-understand concepts, packed with examiner tips and interactive content to help you secure top marks in Component 02."
Revision Notes & Key Concepts
Worked Examples
Worked Example
Question: A logic circuit is represented by the statement Q = (A AND B) OR (NOT B AND C). Complete the truth table for this circuit. [6 marks]
Solution: Step 1: Identify the number of inputs (A, B, C), which means there will be 2^3 = 8 rows in the truth table. Step 2: Create columns for the inputs and the final output Q. Crucially, create intermediate columns for the sub-expressions to show your working. Let's use X = (A AND B), Y = (NOT B), and Z = (Y AND C). Step 3: Fill in the input columns using the standard binary counting pattern from 000 to 111. Step 4: Calculate the values for the intermediate columns for each row. - Column X (A AND B) is 1 only when both A and B are 1. - Column Y (NOT B) is the inverse of column B. - Column Z (Y AND C) is 1 only when both Y and C are 1. Step 5: Calculate the final output Q by OR-ing the results from columns X and Z. Q = X OR Z. **Completed Truth Table:** | A | B | C | X (A AND B) | Y (NOT B) | Z (Y AND C) | Q (X OR Z) | |---|---|---|-------------|-----------|-------------|------------| | 0 | 0 | 0 | 0 | 1 | 0 | 0 | | 0 | 0 | 1 | 0 | 1 | 1 | 1 | | 0 | 1 | 0 | 0 | 0 | 0 | 0 | | 0 | 1 | 1 | 0 | 0 | 0 | 0 | | 1 | 0 | 0 | 0 | 1 | 0 | 0 | | 1 | 0 | 1 | 0 | 1 | 1 | 1 | | 1 | 1 | 0 | 1 | 0 | 0 | 1 | | 1 | 1 | 1 | 1 | 0 | 0 | 1 |
Worked Example
Question: Draw the logic circuit diagram that corresponds to the Boolean expression P = NOT (A OR B). [3 marks]
Solution: Step 1: Identify the innermost operation. Here, it is (A OR B). Draw an OR gate with inputs A and B. Step 2: Identify the next operation. The entire result of (A OR B) is inverted by a NOT gate. Draw a NOT gate. Step 3: Connect the output of the OR gate to the input of the NOT gate. The final output of the NOT gate is P. *(A diagram would be drawn here, showing an OR gate with inputs A and B, its output feeding into a NOT gate, with the final output labelled P. This is a NOR gate.)*
Worked Example
Question: A home alarm system sounds (output Q is 1) if the alarm is armed (input A is 1) AND either a door is opened (input B is 1) OR a window is broken (input C is 1). Write the Boolean expression for this system and draw the corresponding logic circuit. [4 marks]
Solution: Step 1: Translate the logic into a Boolean expression. The core logic is `B OR C`. This result is then combined with A in an AND operation. Therefore, the expression is: `Q = A AND (B OR C)`. The brackets are essential to enforce the correct order of operations. Step 2: Draw the circuit from the expression. First, draw an OR gate for the part in brackets, with inputs B and C. Step 3: Draw an AND gate. One of its inputs is A. The other input is the wire coming from the output of the OR gate. Step 4: Label the final output of the AND gate as Q. **Boolean Expression**: `Q = A AND (B OR C)` *(A diagram would be drawn showing B and C feeding into an OR gate, and the output of that OR gate plus input A feeding into an AND gate.)*
Practice Questions
Question: Draw the standard symbol for a 2-input OR gate. [1 mark]
Answer:
Question: Complete the truth table for a 2-input AND gate. [3 marks]
Answer:
Question: Write the Boolean expression for the following logic circuit. [3 marks] *(Diagram shows inputs A and B going to an OR gate, and the output of that OR gate going with input C into an AND gate)*
Answer:
Question: A car has a warning light (Q) that turns on if the driver is not wearing a seatbelt (A=0) AND the engine is on (B=1). Write the Boolean expression and draw the logic circuit. [4 marks]
Answer:
Question: Complete the truth table for the expression P = A XOR B. Note: XOR stands for 'Exclusive OR', where the output is 1 if the inputs are different. [4 marks]
Answer:



