Boolean algebra
Remarkable identities
Exercise: Complete the truth tables for:
- E ∧ 0 = 0
E | Q |
---|---|
0 | 0 |
1 | 0 |
- E ∧ 1 = E
E | Q |
---|---|
0 | 0 |
1 | 1 |
- E ∧ E = E
E | Q |
---|---|
0 | 0 |
1 | 1 |
- E ∧ ¬E = 0
E | Q |
---|---|
0 | 0 |
1 | 0 |
- E ∨ 0 = E
E | Q |
---|---|
0 | 0 |
1 | 1 |
- E ∨ 1 = 1
E | Q |
---|---|
0 | 1 |
1 | 1 |
- E ∨ E = E
E | Q |
---|---|
0 | 0 |
1 | 1 |
- E ∨ ¬E = 1
E | Q |
---|---|
0 | 1 |
1 | 1 |
- ¬¬E = E
E | ¬E | ¬¬E |
---|---|---|
0 | 1 | 0 |
1 | 0 | 1 |
Commutation, association, and priority rules
In algebraic expressions, there is an order of precedence for the operations. BIDMAS is a mnemonic used to help remember this order - Brackets, Indices, Division/Multiplication, Addition/Subtraction. There is also an order of precedence for Boolean operations used in Boolean algebra - Brackets, Not, Xor, And, Or (not as catchy).
Exercise: Using just the commutativity and associativity laws, simplify the below expressions
- A ∧ A → A
- B ∨ B → B
- (A ∨ B) ∧ (A ∨ B) → A ∨ B
- A ∨ A -> A
- (A ∧ B) ∨ (A ∧ B) → A ∧ B
- X ∨ Y ∨ X → X ∨ Y
- B ∨ 1 → 1
- A ∨ B ∨ A ∨ C ∨ 1 → 1
- A ∨ B ∧ 0 → A
- A ∨ 0 → A
Distribution
A ∧ (B ∨ C) = A ∧ B ∨ A ∧ C
Exercise: Expand the brackets in the expressions. Do not simplify the resulting expressions
- C ∧ (D ∨ B) → C ∧ D ∨ C ∧ B
- C ∧ D ∧ (B ∨ A ∧ E) → C ∧ D ∧ B ∨ C ∧ D ∧ A ∧ E
- A ∧ (C ∨ B ∨ D) -> A ∧ C ∨ A ∧ B ∨ A ∧ D
- D ∧ (F ∨ E ∧ (A ∨ B)) → D ∧ F ∨ D ∧ E ∧ A ∨ D ∧ E ∧ B
Exercise: Factorise the expressions
- C ∧ D ∨ C ∧ A → C ∧ (D ∨ A)
- C ∧ D ∧ B ∨ B ∧ A ∧ E → B ∧ (C ∧ D ∨ A ∧ E)
- A ∧ C ∨ C ∧ E ∨ B ∧ C → C ∧ (A ∨ B ∨ E)
- E ∧ F ∨ E ∧ ¬F → E ∧ (F ∨ ¬F) → E
Absorption
- A ∨ (B ∧ A) = A
- A ∧ (B ∨ A) = A
Exercise: Simplify the expressions below
- C ∨ C ∧ D → C
- D ∨ C ∧ D ∧ B → D
- (C ∨ A) ∧ A → A
- D ∧ 1 ∨ D ∧ F → D
- E ∧ F ∨ (E ∧ F ∨ D) → E ∧ F ∨ D
- A ∧ B ∧ (0 ∨ ¬A) ∨ 1 → 1
- ¬D ∧ (¬E ∨ ¬D) → ¬D
De Morgan's law
When using the negation of an expression, replace booleans and operators using this correspondence table:
Original | Negation |
---|---|
A | ¬A |
∧ | ∨ |
∨ | ∧ |
Exercise: Use De Moran's laws, and any other rules that will help, to simplify the expressions below
- ¬(¬A ∧ ¬B) → A ∨ B
- ¬(¬B ∨ ¬C) ∧ A → A ∧ B ∧ C
- ¬(¬A ∨ ¬B) → A ∧ B
- ¬(¬A ∧ ¬E) ∨ (A ∧ F) → A ∨ E
Final exercises
Simplify each Boolean expression using the basic rules, De Morgan's Laws
- B ∨ (A ∧ ¬A) → B
- A ∧ B ∨ A ∧ ¬B → A
- ¬(1 ∧ B) → ¬B
- ¬(¬A ∧ ¬B) ∨ A ∨ ¬B → 1
- (¬A ∨ B) ∧ (A ∧ ¬B) → 0
- ¬A ∨ ¬(B ∨ A) → ¬A
- D ∨ F ∧ D ∨ F ∧ G → D ∨ F ∧ G
- ¬B ∧ ¬(¬A ∨ ¬B) → 0
- ¬(¬A ∧ B) ∨ A ∧ (A ∨ ¬B) → A ∨ ¬B
- A ∧ B ∧ ¬C ∨ A ∧ ¬C → A ∧ ¬C
- X ∧ (¬X ∨ Y) → X ∧ Y
- D ∨ E ∧ C ∨ ¬B ∧ D ∨ E → D ∨ E
- A ∧ A ∨ A ∧ 1 ∨ B ∧ ¬B → A
- (A ∧ A ∨ B) ∨ 0 → A ∨ B
- ¬(¬D ∧ ¬E) ∧ ¬(¬D ∨ ¬E) → D ∧ E
- ¬(D ∧ ¬E) ∧ D ∨ ¬E → E ∧ D ∨ ¬E
- (A ∨ A ∧ B) ∨ B → A ∨ B
- ¬(A ∨ B ∨ ¬A) → 0
- A ∨ ¬(B ∨ ¬A) → A
- A ∧ B ∧ B ∧ C ∨ A ∧ 0 ∧ B ∨ A ∧ C ∧ B ∧ D → A ∧ B ∧ C