Boolean Algebra: Axioms (Laws)
Boolean Algebra: Axioms (Laws)
Boolean Algebra: Axioms (Laws)
Digital Circuits
License: https://creativecommons.org/licenses/by-nc-nd/4.0/
An order relation between elements of set B = {0,1}: 0 < 1 Example : Combinations for which
Set of all input E2(X) generates ‘1’
Read as "0 precedes 1" or "0 is smaller than 1". x1 x2 x3 E1(X) E2(X) combinations (X) (covers)
0 0 0 0 = 0
According to this, an order relation between X vectors can be defined as follows: 0 0 1 1 = 1
Combinations
If all elements of X1 precede (are smaller than) elements in the same order of 0 1 0 0 < 1
E2 for which
vector X2, then X1 ≤ X2 . 0 1 1 1 = 1 000
E1(X)
1 0 0 0 = 0 010 generates ‘1’
100 E1
1 0 1 1 = 1 110 001 (covers)
Example: 1 1 0 0 < 1 011 101
X1=1001 , X2 = 1101 1 1 1 1 = 1 111
X1 ≤ X2. For each input combination where If E1(X) ≤ E2(X)
E1(X) generates "1", E2(X) also
The order relation may not exist between all vectors. E1(X) implies E2(X), E1(X)E2(X),
generates "1". (This is a special case.)
E2(X) covers E1(X).
Example: X1=0011 , X2 = 1001 If E1(X) ≤ E2(X) then
The order relation is not valid between X1 and X2. 1. E1(X) + E2(X) = E2(X)
2. E1(X) • E2(X) = E1(X)
http://akademi.itu.edu.tr/en/buzluca/ 2.9 http://akademi.itu.edu.tr/en/buzluca/ 2.10
http://www.buzluca.info 2011-2019 Feza BUZLUCA http://www.buzluca.info 2011-2019 Feza BUZLUCA
The order relation (≤) may not be valid between all expressions. Example:
E(a,b,c,d) = abc′ , F(a,b,c,d) = bd An order relation between E and F does not
IF E and F are two logical expressions, the E⋅F = abc′d E+F = abc′ + bd exist.
following inequalities are always true:
F
E E⋅F ≤ E ≤ E+F abcd
0000
E
0
F
0
E⋅F
0
E+F
0
E⋅F < E and E⋅F < F.
Therefore
E⋅F ≤ F ≤ E+F 0001 0 0 0 0
E⋅F + E = E
0010 0 0 0 0
0011 0 0 0 0 abc′d + abc′ = abc′
0100 0 0 0 0 and
Absorption Properties of expressions: 0101 0 1 0 1
0110 0 0 0 0 E⋅F + F = F
· dual 0111 0 1 0 1 abc′d + bd = bd
1000 0 0 0 0
1001 0 0 0 0 E < E+F and F < E+F.
Proof: E(E+F) = EE+EF = E+EF = E(1+F) = E 1010 0 0 0 0
Therefore
1011 0 0 0 0
1100 1 0 0 1 E⋅(E + F) = E
· dual · 1101 1 1 1 1 abc′ (abc′ + bd) = abc′
1110 0 0 0 0
and
Proof: · 1 1111 0 1 0 1
F⋅(E + F) = F
These properties are used to minimize (simplify) logical expressions. bd (abc′ + bd) = bd
http://akademi.itu.edu.tr/en/buzluca/ 2.11 http://akademi.itu.edu.tr/en/buzluca/ 2.12
http://www.buzluca.info 2011-2019 Feza BUZLUCA http://www.buzluca.info 2011-2019 Feza BUZLUCA
Digital Circuits License: https://creativecommons.org/licenses/by-nc-nd/4.0/ Digital Circuits
The Consensus Theorem (SOP Form) The Consensus theorem (POS Form)
Assume that E1 and E2 are two expressions that do not include the literal x1 : According to the duality principle, the consensus theorem is also valid for
E1(x2, .... xn) and E2(x2, .... xm) expressions written in product of sums (POS) form.
We can create a new expression by multiplying one term by x1 and the other one by Assume that E1 and E2 are two expressions that do not include the literal x1:
the complement of x1 ( ). E1(x2, .... xn) and E2(x2, .... xm)
We can create a new expression by adding x1 to one term and the complement of x1
Here, x1 is called a biform variable because it occurs both positively (as itself: ) to the other one.
and negatively (as complement: ) in the expression.
The number of basic logical functions for n binary variables: 2. General functions: Multiple inputs, multiple outputs
( 2n)
There are 2 possible basic logical functions for n binary variables (inputs).
For example, Y = f(X): Bn → Bm , X=(x1, .... xn), Y=(y1, .... ym),
there are 16 possible basic logical functions for 2 binary variables (inputs).
x
f z
y
Example: The truth table for Y = f(X)
The truth table for 16 possible basic logical functions for 2 binary variables:
x1 x2 x3 y1 y2
Inputs Functions Y = f(X) x1 y1
000 1 1
X Y F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 F13 F14 F15 X∈B3 x2
x3
f y2 001 1 0
0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 Y∈B2
010 0 0
0 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1
011 0 0
1 0 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1
100 1 1
1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
101 0 1
0 1 110 0 1
X Y Y' X'
X XOR Y X=Y X NAND Y 111 1 0
X AND Y
X OR Y X NOR Y
(X AND Y)'
(X OR Y)'
http://akademi.itu.edu.tr/en/buzluca/ 2.17 http://akademi.itu.edu.tr/en/buzluca/ 2.18
http://www.buzluca.info 2011-2019 Feza BUZLUCA http://www.buzluca.info 2011-2019 Feza BUZLUCA
Digital Circuits License: https://creativecommons.org/licenses/by-nc-nd/4.0/ Digital Circuits
Example: Indexed representation of a completely specified basic logical function: Example: Representation of a completely specified general logical function :
Truth Table: Numbered (Indexed) Representation: We apply the numbered representation to all outputs.
Row Input Output y = f(x1,x2) = ∪1(0,2) ∪ denotes "union" or "set of".
Num x1 x2 y Truth Table: Numbered (Indexed) Representation:
∪1 denotes "set of 1-generating
0 0 0 1
points".
1 0 1 0 Num x1 x2 y1 y2
2 1 0 1 0 0 0 1 1 y1 = f(x1,x2) = ∪1(0,2)
3 1 1 0 The order of the variables (x1,x2) is important.
1 0 1 0 1 y2 = f(x1,x2) = ∪1(0,1)
It must be the same as in the truth table.
2 1 0 1 0
Otherwise the numbers of the combinations will change.
The same function; only 3 1 1 0 0
the order of the variables
(x2,x1) is changed.
Row Input Output y = f(x2,x1) = ∪1(0,1) Representation of the same function with “0”-genereting combinations:
Num x2 x1 y
0 0 0 1
1 0 1 1 y1 = f(x1,x2) = ∪0(1,3)
2 1 0 0 We can represent the same function with “0”-genereting y2 = f(x1,x2) = ∪0(2,3)
3 1 1 0 combinations. y = f(x ,x ) = ∪ (1,3)
1 2 0
A 00 01 11 10 A 11
12 13 15 14
Inputs
Algebraic Representation (Expressions) and Canonical Forms 1st Canonical Form: Sum of Products
The word description of a real-world logic design problem can be translated into a
truth table. • The 1st canonical form is the sum of special products called minterm.
Example: Assume that input variable A represents the phrase ‘’the car door is • In the 1st canonical form, each product in the sum corresponds to a row in the
open’’, B represents ‘’the key is inserted’’, truth table with the output "1".
then the truth table can specify the action Z to be taken, where Z=1 means that • Minterm: For a Boolean function of n variables, a product of n literals in which
the alarm sounds. each variable appears exactly once (in either true or complemented form, but
Num. A B Z
Truth tables of real-world digital problems are more not both) is called a minterm.
0 0 0 0 complicated. For example, a function with 3 variables (a, b, c) has 8 minterms:
1 0 1 0 To handle a logic design problem and implement the solution a'b'c', a'b'c, a'bc', a'bc, ab'c', ab'c, abc', abc
2 1 0 0 using logic gates, we need to obtain an algebraic expression • Each minterm that appears in the 1st canonical form covers only one row of
3 1 1 1 for the output function. Z = f (A,B)
the truth table with the output "1".
Logical expressions of the Boolean functions can be obtained in canonical forms For example; the minterm a'b'c' can generate "1" only for the input value
from their truth tables. abc=000.
There are two types of canonical forms: For all other input combinations the minterm a'b'c' generates "0".
• 1st canonical form: SOP (ΣΠ) form. Example: abc + ab'c • The 1st canonical form of a function is the sum of minterms.
Sum of products, each of which corresponds to a "1"-generating combination.
• 2nd canonical form: POS (ΠΣ) form. Example: (a+b+c') (a+b'+c')
Product of sums, each of which corresponds to a "0"-generating combination.
http://akademi.itu.edu.tr/en/buzluca/ 2.29 http://akademi.itu.edu.tr/en/buzluca/ 2.30
http://www.buzluca.info 2011-2019 Feza BUZLUCA http://www.buzluca.info 2011-2019 Feza BUZLUCA
Digital Circuits License: https://creativecommons.org/licenses/by-nc-nd/4.0/ Digital Circuits
Canonical forms are usually not the simplest (optimal) algebraic expression of the We assign each minterm an index (number) based on the binary encoding of the
function. variables.
They can usually be simplified. This is a decimal number that represents the row number (Row numbers start at 0).
For example, we assign the index 5 to the minterm ab'c (101) and designate it m5.
Minimization:
F(A, B, C) = A'B'C + A'BC + AB'C + ABC + ABC' Inputs:
A B C Minterms
= (A'B' + A'B + AB' + AB)C + ABC' 0 0 0 A'B'C' = m0
= ((A' + A)(B' + B))C + ABC' 0 0 1 A'B'C = m1
= C + ABC' 0 1 0 A'BC' = m2
= ABC' + C 0 1 1 A'BC = m3
= AB + C 1 0 0 AB'C' = m4
• A Boolean function may have many possible logical expressions. They produce 1 0 1 AB'C = m5 Example:
the same result given the same inputs. 1 1 0 ABC' = m6
Expression of function F in (2.31) in 1st canonical form:
1 1 1 ABC = m7
• Since the minterms present in the 1st canonical form are in one-to-one F(A, B, C) = Σm(1,3,5,6,7)
correspondence with the 1’s of the truth table, the 1st canonical (standard)
form expression for a function is unique. Minterms for three variables = m1 + m3 + m5 + m6 + m7
= A'B'C + A'BC + AB'C + ABC' + ABC
• A function can have only one expression in the 1st canonical form.
F = ΣA, B, C (1,3,5,6,7) (Sum of minterms)
Finding maxterms:
2nd Canonical Form: Product of Sums
Truth Table → Expression in POS form
• The 2nd canonical form is the product of special sum terms called maxterm. • To find the maxterms, we locate all rows in the truth table where the output is
• In the 2nd canonical form, each of the sum terms (or factors) in the product "0".
corresponds to a row in the truth table with the output "0". • To obtain the individual maxterms, we substitute variables (for example, A, B,
• Maxterm: For a Boolean function of n variables, a sum of n literals in which or C) for zeros (of the inputs) and complements of variables (A', B', or C') for
each variable appears exactly once (in either true or complemented form, ones in the truth table.
but not both) is called a maxterm. Example:
• For example, a function with 3 variables (a, b, c) has 8 maxterms: "False" (0) generating combinations: 000 010 100
Product of maxterms: F(A,B,C) = (A + B + C) (A + B' + C) (A' + B + C)
a+b+c, a+b+c', a+b'+c, a+b'+c', a'+b+c, a'+b+c', a'+b'+c, a'+b'+c'
• Each maxterm has a value of "0" for exactly one combination of values for A B C F
the input variables. 0 0 0 0
0 0 1 1
For example; the maxterm a+b+c can generate "0" only for the input value 0 1 0 0
abc=000. 0 1 1 1
1 0 0 0
For all other input combinations the maxterm a+b+c generates "1". 1 0 1 1
1 1 0 1
• The 2nd canonical form of a function is the product of maxterms. 1 1 1 1
Note that this function F is the same as the function in slide 2.31.
Both expressions in 1st and 2nd canonical forms correspond to the same truth
table.
http://akademi.itu.edu.tr/en/buzluca/ 2.35 http://akademi.itu.edu.tr/en/buzluca/ 2.36
http://www.buzluca.info 2011-2019 Feza BUZLUCA http://www.buzluca.info 2011-2019 Feza BUZLUCA
Digital Circuits License: https://creativecommons.org/licenses/by-nc-nd/4.0/ Digital Circuits
The 2nd canonical form of the complement of a function: Simplification of the expressions in the 2nd canonical form:
We can similarly obtain the 2nd canonical form of the complement of a function Canonical forms are usually not the simplest (optimal) algebraic expression of the
by considering the "true" (1) rows: function.
They can usually be simplified.
Example:
Obtain the 2nd canonical form of the complement of a function F from the Minimization:
previous example. F(A, B, C) = (A+B+C) (A+B’+C) (A’+B+C)
2nd canonical form of F: = ((A+C)+(B⋅B')) (A'+B+C)
= (A+C) (A'+B+C)
= (A+C) (A'+B+C) (B+C) (consensus)
F'(A,B,C) = (A + B + C') (A + B' + C') (A' + B + C') (A' + B' + C) (A' + B' + C') = (A + C) (B + C)
A B C F
0 0 0 0 • A Boolean function may have many possible logical expressions. They produce
0 0 1 1
0 1 0 0 the same result given the same inputs.
0 1 1 1 • Since the maxterms present in the 2nd canonical form are in one-to-one
1 0 0 0
1 0 1 1 correspondence with the 0’s of the truth table, the 2nd canonical (standard)
1 1 0 1 form expression for a function is unique.
1 1 1 1
• A function can have only one expression in the 2nd canonical form.
Digital Circuits