A logic expression is a combination of Boolean variables and operators (AND, OR, NOT) that produces a TRUE or FALSE output. Logic expressions can be evaluated using truth tables, and can be represented as logic circuit diagrams.
Boolean algebra uses standard notation:
| Operator | Symbol | Cambridge notation |
|---|---|---|
| AND | · or ∧ | A AND B |
| OR | + or ∨ | A OR B |
| NOT | ¬ or Ā (overline) | NOT A |
With A=1, B=0, C=1: A AND B = 1 AND 0 = 0; NOT C = NOT 1 = 0; Q = 0 OR 0 = 0
With A=1, B=1, C=1: A AND B = 1; NOT C = 0; Q = 1 OR 0 = 1
| A | B | A OR B | NOT A | X = (A OR B) AND (NOT A) |
|---|---|---|---|---|
| 0 | 0 | 0 | 1 | 0 |
| 0 | 1 | 1 | 1 | 1 |
| 1 | 0 | 1 | 0 | 0 |
| 1 | 1 | 1 | 0 | 0 |
A logic circuit diagram shows gates connected together with wires. The output of one gate can feed into another gate's input.
To evaluate a circuit for given inputs:
A ──┐
AND → P ──┐
B ──┘ OR → X
C ────────────┘
To evaluate: First find P = A AND B, then find X = P OR C.
| A | B | C | P = A AND B | X = P OR C |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 0 | 1 |
| 0 | 1 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 | 1 |
| 1 | 0 | 0 | 0 | 0 |
| 1 | 0 | 1 | 0 | 1 |
| 1 | 1 | 0 | 1 | 1 |
| 1 | 1 | 1 | 1 | 1 |
When no brackets are given, the order is: NOT first, then AND, then OR. Brackets override this order (evaluate innermost brackets first).
NOT A AND B OR C → ((NOT A) AND B) OR C A OR B AND C → A OR (B AND C)
4 questions · 12 marks
| Term | Definition |
|---|
10 minutes · mixed marks