Boolean Logic (Copy)
IGCSE / O Level Computer Science Cheat Sheet
Topic: 10 – Boolean Logic
🔣 Logic Gates & Symbols
| Gate | Symbol | Function |
|---|---|---|
| NOT | ¬A | Inverts input (0 → 1, 1 → 0) |
| AND | A · B | 1 only if both A and B are 1 |
| OR | A + B | 1 if either A or B is 1 |
| NAND | ¬(A · B) | 0 only if both A and B are 1 |
| NOR | ¬(A + B) | 1 only if both A and B are 0 |
| XOR | A ⊕ B | 1 if A and B are different |
🧪 Truth Tables (2 Inputs)
| A | B | NOT A | A · B | A + B | A ⊕ B | NAND | NOR |
|---|---|---|---|---|---|---|---|
| 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 |
| 0 | 1 | 1 | 0 | 1 | 1 | 1 | 0 |
| 1 | 0 | 0 | 0 | 1 | 1 | 1 | 0 |
| 1 | 1 | 0 | 1 | 1 | 0 | 0 | 0 |
🔁 Truth Table with 3 Inputs
8 possible combinations (2³):
| A | B | C | Output |
|---|---|---|---|
| 0 | 0 | 0 | ? |
| 0 | 0 | 1 | ? |
| 0 | 1 | 0 | ? |
| 0 | 1 | 1 | ? |
| 1 | 0 | 0 | ? |
| 1 | 0 | 1 | ? |
| 1 | 1 | 0 | ? |
| 1 | 1 | 1 | ? |
Use this format to complete from an expression, problem statement, or circuit.
🧮 Logic Expressions
- From Problem Statement:
- “Output 1 if A is 1 AND B is 0” →
A · ¬B
- “Output 1 if A is 1 AND B is 0” →
- From Circuit:
- Trace gates and write step-by-step
- From Truth Table:
- Use rows with Output = 1 to construct expression (SOP form)
🔧 Drawing Logic Circuits
- Combine gates to reflect a logic expression
- Example:
¬(A + B)→ OR gate → NOT gate
🛠️ Tips
- NOT: Only gate with 1 input
- All others: 2 inputs only in IGCSE syllabus
- Max: 3 inputs per circuit
- Expressions must be written with logic operators (
·,+,¬) – not words like “AND”
🧠 Remember
| Expression | Equivalent Description |
|---|---|
¬A |
Output is opposite of A |
A · B |
Only 1 if both inputs are 1 |
A + B |
1 if either input is 1 |
¬(A · B) |
NAND – opposite of AND |
¬(A + B) |
NOR – opposite of OR |
A ⊕ B |
XOR – 1 if A and B are different |
