Week 4 Boolean Algebra
Week 4 Boolean Algebra
Week 4 Boolean Algebra
Boolean algebra:
• Postulates
• Theorems
Boolean function:
• Definition
• How to represent a Boolean function
Canonical formulas:
• Minterms
• Maxterms
Axioms
Axiom 1
𝟏=𝟎 𝟎=𝟏
Axiom(s) 2
𝟎. 𝟎 = 𝟎 𝟏+𝟏=𝟏
𝟏. 𝟏 = 𝟏 𝟎+𝟎=𝟎
𝟎. 𝟏 = 𝟏. 𝟎 = 𝟎 𝟎+𝟏=𝟏+𝟎=𝟏
Axioms can usually not be proven but in our case some considerations of logic
make them obvious.
Theorems (1)
Theorem 1: Neutrals
𝐀+𝟎=𝐀 𝐀. 𝟏 = 𝐀
𝐀+𝟏=𝟏 𝐀. 𝟎 = 𝟎
Theorem 2
𝐀+𝐀=𝟏
Logic justification: We must have (A is true or A is false), as A is either true or
false, the result is always true so 1
𝐀. 𝐀 = 𝟎
Logic justification: We must have (A is true and A is false), as A can not be both at
the same time, the results is false, or 0.
Theorems (2)
Theorem 3: Idempotent
𝐀. 𝐀 = 𝐀 𝐀+𝐀=𝐀
Logic justification: Suppose A is true, so (A or A) is true and the result is true. If A is
false, (A or A) is false and the result is false.
Theorem 4: Involution
𝐀 =𝐀
Logic justification: If A is true, NOT(NOT(A)) is true!! as NOT(A) is false.
Theorem 5: Commutation
𝐀+𝐁=𝐁+𝐀 𝐀. 𝐁 = 𝐁. 𝐀
Comment: As in “number” algebra, the “+” (OR) and “.” (AND) operations are
commutative
2016 EE1501 – Digital Logic 7
2. Boolean Algebra
Theorems (3)
Theorem 6: Associativity
𝐀+ 𝐁+𝐂 = 𝐀+𝑩 +𝐂
𝐀 𝐁𝐂 = 𝐀𝐁 𝐂
Comment: As in “number” algebra, the order has no importance.
ATTENTION: This rule is only valid if all the operations are the same!
Theorem 7: Covering
𝐀 + 𝐀𝐁 = 𝐀
𝐀. 𝐀 + 𝐁 = 𝐀
𝐀 + 𝐀𝐁 = 𝐀 + 𝐁
Theorems (4)
Theorem 8: Distributivity
𝐀 + 𝐁 . 𝐀 + 𝐂 = 𝐀 + 𝐁𝐂
Comment: This rule is very convenient to simplify Boolean expression.
ATTENTION: This rule is only valid if the same variable appears in both brackets
(for example, in the formula above, it is variable A)
𝐀𝐁 + 𝐀𝐂 = 𝐀 𝐁 + 𝐂
Theorem 9: Combining
𝐀+𝐁 . 𝐀+𝐁 =𝐀
𝐀𝐁 + 𝐀𝐁 = 𝐀
Theorems (5)
𝐀 + 𝐁 = 𝐀. 𝐁 𝐀. 𝐁 = 𝐀 + 𝐁
Logic justification : AB is equal to 1 when both A and B are true. If either A or/and B
is false, AB is equal to 0. So NOT(AB) is equal to 1 when A or/and B is false. This last
condition corresponds to NOT(A) is true or NOT(B) is true.
Generalisation:
𝐀𝟏 + 𝐀𝟐 + 𝐀𝟑 + ⋯ + 𝐀𝐧 = 𝐀𝟏 . 𝐀𝟐 . 𝐀𝟑 . ⋯ . 𝐀𝐧
𝐀𝟏 . 𝐀𝟐 . 𝐀𝟑 . ⋯ . 𝐀𝐧 = 𝐀𝟏 + 𝐀𝟐 + 𝐀𝟑 + ⋯ + 𝐀𝐧
This theorem is very important and useful. As a consequence it should be studied
very carefully
2016 EE1501 – Digital Logic 10
2. Boolean Algebra
𝐚 𝐁 + 𝐁𝐂
𝐛 𝐁 + 𝐁𝐂
𝐜 𝐀+𝐁 . 𝐀+𝐂 . 𝐁+𝐂
𝐝 𝐀𝐁 + 𝐀𝐂 + 𝐁𝐂
Solutions:
𝐚 𝟏
𝐛 𝟎
𝐜 𝐀+𝐁 . 𝐀+𝐂
𝐝 𝐀𝐁 + 𝐀𝐂
We can also look at the relation between binary logic and binary
arithmetic.
Similarity:
• Addition;
• Multiplication;
Difference:
• An arithmetic variable may consist of many digits; a logic variable is always
either a 1 or a 0
• Binary addition and binary OR are not equivalent:
In binary arithmetic: 1+1=(1)0 (addition);
In binary logic: 1+1=1 (OR)
Algebraic expression
F(A, B) A B
Truth table
A B C
0 0 1
0 1 0
1 0 1
1 1 1
B F(A,B)
Examples
Example:
(a) Represent the following functions in a truth table:
𝐅𝟏 = 𝐀𝐁𝐂
𝐅𝟐 = 𝐀 + 𝐁𝐂
𝐅𝟑 = 𝐀𝐁𝐂 + 𝐀𝐁𝐂 + 𝐀𝐁
𝐅𝟒 = 𝐀𝐁 + 𝐀𝐂
A B C Minterms A B C Maxterms
0 0 0 𝐦𝟎 = 𝐀. 𝐁. 𝐂 0 0 0 𝐌𝟎 = 𝐀 + 𝐁 + 𝐂
0 0 1 𝐦𝟏 = 𝐀. 𝐁. 𝐂 0 0 1 𝐌𝟏 = 𝐀 + 𝐁 + 𝐂
0 1 0 𝐦𝟐 = 𝐀. 𝐁. 𝐂 0 1 0 𝐌𝟐 = 𝐀 + 𝐁 + 𝐂
0 1 1 𝐦𝟑 = 𝐀. 𝐁. 𝐂 0 1 1 𝐌𝟑 = 𝐀 + 𝐁 + 𝐂
1 0 0 𝐦𝟒 = 𝐀. 𝐁. 𝐂 1 0 0 𝐌𝟒 = 𝐀 + 𝐁 + 𝐂
1 0 1 𝐦𝟓 = 𝐀. 𝐁. 𝐂 1 0 1 𝐌𝟓 = 𝐀 + 𝐁 + 𝐂
1 1 0 𝐦𝟔 = 𝐀. 𝐁. 𝐂 1 1 0 𝐌𝟔 = 𝐀 + 𝐁 + 𝐂
1 1 1 𝐦𝟕 = 𝐀. 𝐁. 𝐂 1 1 1 𝐌𝟕 = 𝐀 + 𝐁 + 𝐂
From the truth table of the function, identify each row where the
function has a value of one.
From the conversion table (previous slide), add (or OR) the
minterm associated to each row. This is the minterm canonical
formula.
From the truth table of the function, identify each row where the
function has a value of zero.
Simple example: let’s consider the truth table of the XOR gate (see
chapter 3).
• Two rows where F equals 0: row 1 and 4. The function can be expressed as
the product of two maxterms: M1 and M4 or A + B, A + B.
The function is:
𝐅= 𝐀+𝐁 . 𝐀+𝐁 = 𝐌 𝟎, 𝟒
Express the Boolean functions from the given truth table by (a)
a sum of minterms (b) product of maxterms
A B C F1 F2
0 0 0 0 0
0 0 1 1 0
0 1 0 0 1
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1
From the table, it is clear that the following relation holds true:
mi M i
Examples
Solution: 𝐅 = 𝐦 𝟏, 𝟒, 𝟓, 𝟔, 𝟕
Solution: 𝐅 = 𝐌 𝟎, 𝟐, 𝟒, 𝟓