Boolean Algebra: Axioms (Laws)
Boolean Algebra: Axioms (Laws)
Boolean Algebra: Axioms (Laws)
License: https://creativecommons.org/licenses/by-nc-nd/4.0/
Boolean Algebra
George Boole (1815-1864) English mathematician and philosopher.
a • b (AND) a + b (OR) Complement
Defined on the set B = {0,1} b b
0 1 0 1 a a'
Binary operators: AND, OR { • , + } a a (a)
Unary operation: Complement (NOT) {'}
0 0 0 0 0 1 0 1
Another symbol for the NOT operator: a
1 0 1 1 1 1 1 0
Axioms (Laws):
Under assumption a , b ∈ B
1. Closure: a+b∈B a•b∈B
2. Commutative: a+b=b+a a•b=b•a
3. Associative: a + (b + c) = (a + b) + c a • (b • c) = (a • b) • c
4. Identity: a+0=a a•1=a
5. Distributive: a + (b • c) = (a + b) • (a + c) a • (b + c) = (a • b) + (a • c)
6. Inverse: a+a=1 a•a=0
Precedence order of operators from higher to lower precedence:
1. Parenthesis, 2. NOT (Complement) (Negation), 3. AND, 4. OR
http://akademi.itu.edu.tr/en/buzluca/ 2.1
http://www.buzluca.info 2011-2019 Feza BUZLUCA
Digital Circuits
Theorems:
These theorems are derived from the operations and axioms of Boolean algebra.
They can be proven using the axioms.
(a + b) = a • b (a • b) = a + b
5. General form of De Morgan's Theorem:
f (X1, X2, ..., Xn, 0 ,1, + , •) = g(X1, X2 ,..., Xn, 1 , 0, •, +)
• It establishes relations between binary operations (AND, OR): • and +
http://akademi.itu.edu.tr/en/buzluca/ 2.3
http://www.buzluca.info 2011-2019 Feza BUZLUCA
Digital Circuits
a) With Axioms
Example:
Theorem: · ·
Proof:
Distributive · · ·
Inverse (Complement) · · 1
Identity · 1
Example:
Theorem: X+X•Y = X (Absorption)
Proof:
Identity X + X•Y = X•1 + X•Y
Distributive X•1 + X•Y = X • (1 + Y)
Annihilator X • (1 + Y) = X • (1)
Identity X • (1) = X
http://akademi.itu.edu.tr/en/buzluca/ 2.4
2011-2019 Feza BUZLUCA
http://www.buzluca.info
Digital Circuits
Note that to denote the negation (NOT), we can also use the notation A.
De Morgan:
X Y X Y (X + Y) X • Y
(X + Y) = X • Y 0 0 1 1 1 1
0 1 1 0 0 0
1 0 0 1 0 0
1 1 0 0 0 0
X Y X Y (X • Y) X + Y
(X • Y) = X + Y 0 0 1 1 1 1
0 1 1 0 1 1
1 0 0 1 1 1
1 1 0 0 0 0
Although truth tables may contain many rows, computer programs can fill in
and compare these tables very quickly.
http://akademi.itu.edu.tr/en/buzluca/ 2.5
http://www.buzluca.info 2011-2019 Feza BUZLUCA
Digital Circuits
Digital Circuits
X= x1 x2 x3 E(X)
Combinations for
0 0 0 0 Set of all input
which E(X)
0 0 1 1 combinations
generates ‘1’
0 1 0 0 (X)
(covers)
0 1 1 1
1 0 0 0 000 001
1 0 1 1 010 011
1 1 0 1 100 101
1 1 1 1 111 110
http://akademi.itu.edu.tr/en/buzluca/ 2.8
2011-2019 Feza BUZLUCA
http://www.buzluca.info
Digital Circuits
Example:
X1=1001 , X2 = 1101
X1 ≤ X2.
http://akademi.itu.edu.tr/en/buzluca/ 2.9
http://www.buzluca.info 2011-2019 Feza BUZLUCA
Digital Circuits
The order relation (≤) may not be valid between all expressions.
· dual
· dual ·
Proof: · 1
These properties are used to minimize (simplify) logical expressions.
http://akademi.itu.edu.tr/en/buzluca/ 2.11
http://www.buzluca.info 2011-2019 Feza BUZLUCA
Digital Circuits
Example:
E(a,b,c,d) = abc′ , F(a,b,c,d) = bd An order relation between E and F does not
E⋅F = abc′d E+F = abc′ + bd exist.
Here, x1 is called a biform variable because it occurs both positively (as itself: )
and negatively (as complement: ) in the expression.
Examples: ,
• Given a pair of product terms that include a biform variable, the consensus term
(SOP) is formed by multiplying (AND) two original terms together, leaving out the
selected variable and its complement.
• E1E2 is the consensus term of with respect to the variable x.
Example: Consensus of (respect to a) is .
http://akademi.itu.edu.tr/en/buzluca/ 2.13
http://www.buzluca.info 2011-2019 Feza BUZLUCA
Digital Circuits
• Given a pair of sums that include a biform variable, the consensus term (POS)
is formed by adding (OR) two original terms together, leaving out the selected
variable and its complement.
• E1 + E2 is the consensus term of with respect to the variable x.
Example: Consensus of is: .
http://akademi.itu.edu.tr/en/buzluca/ 2.14
2011-2019 Feza BUZLUCA
http://www.buzluca.info
Digital Circuits
http://akademi.itu.edu.tr/en/buzluca/ 2.15
http://www.buzluca.info 2011-2019 Feza BUZLUCA
Digital Circuits
y = f(X): Bn → B
∀X0∈Bn ; ∃! y0 ∈B ; y=f(X)
"There exists a unique..."
x
f z
y
The truth table for 16 possible basic logical functions for 2 binary variables:
Inputs Functions
X Y F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 F13 F14 F15
0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
0 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1
1 0 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1
1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
0 1
X Y Y' X'
X XOR Y X=Y X NAND Y
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://www.buzluca.info 2011-2019 Feza BUZLUCA
Digital Circuits
http://akademi.itu.edu.tr/en/buzluca/ 2.18
2011-2019 Feza BUZLUCA
http://www.buzluca.info
Digital Circuits License: https://creativecommons.org/licenses/by-nc-nd/4.0/
http://akademi.itu.edu.tr/en/buzluca/ 2.19
http://www.buzluca.info 2011-2019 Feza BUZLUCA
Digital Circuits
http://akademi.itu.edu.tr/en/buzluca/ 2.20
2011-2019 Feza BUZLUCA
http://www.buzluca.info
Digital Circuits
Digital Circuits
Num x1 x2 y1 y2
0 0 0 1 1 y1 = f(x1,x2) = ∪1(0,2)
1 0 1 0 1 y2 = f(x1,x2) = ∪1(0,1)
2 1 0 1 0
3 1 1 0 0
y1 = f(x1,x2) = ∪0(1,3)
y2 = f(x1,x2) = ∪0(2,3)
http://akademi.itu.edu.tr/en/buzluca/ 2.22
2011-2019 Feza BUZLUCA
http://www.buzluca.info
Digital Circuits
N x1 x2 y1 y2
y1 = f(x1,x2) = ∪1(0) + ∪0(1,3)
0 0 0 1 1
1 0 1 0 Φ or y1 = f(x1,x2) = ∪1(0) + ∪Φ(2)
2 1 0 Φ 0 or y1 = f(x1,x2) = ∪0(1,3) + ∪Φ(2)
3 1 1 0 Φ
y2 = f(x1,x2) = ∪1(0) + ∪0(2)
or y2 = f(x1,x2) = ∪1(0) + ∪Φ(1,3)
or y2 = f(x1,x2) = ∪0(2) + ∪Φ(1,3)
http://akademi.itu.edu.tr/en/buzluca/ 2.23
http://www.buzluca.info 2011-2019 Feza BUZLUCA
Digital Circuits
Graphical Representation
The input variables (combinations) of a logical function are elements (vectors) of
the set Bn. Example: B3={000, 001, …, 111}
We can represent these variables as vertices of an n-dimensional hypercube.
Vertices that correspond to 1-generating combinations are colored (marked).
The number of inputs of the function determines how many dimensions the
hypercube has.
n-bit input → n-dimensional cube
01 11
Boolean Cubes:
0 1 2- dimensional
Y
1-dimensional f(X,Y)
f(X) X 10
00
X
1111
111 0111
3- dimensional 4- dimensional
f(X,Y,Z) Y Z Y f(W,X,Y,Z)
101 Z
W
000 1000
X 0000 X
http://akademi.itu.edu.tr/en/buzluca/ 2.24
2011-2019 Feza BUZLUCA
http://www.buzluca.info
Digital Circuits License: https://creativecommons.org/licenses/by-nc-nd/4.0/
Example: A B F
01 11
F(A,B) 0 0 1
B
0 1 0
1 0 1 00 10
A
1 1 0
Example: A B C F
F(A,B,C) 0 0 0 0 011 111
0 0 1 0
0 1 0 0
0 1 1 1 110
1 0 0 0 B C 101
1 0 1 1
1 1 0 1 000 A
1 1 1 1
As the number of variables (inputs) increases, drawing a Boolean cube becomes
more difficult.
Therefore, Boolean cubes are not practical for representing Boolean functions
with many inputs.
However, they make it easier to visualize some properties (especially, adjacent
combinations) of the functions and to explain further topics.
http://akademi.itu.edu.tr/en/buzluca/ 2.25
http://www.buzluca.info 2011-2019 Feza BUZLUCA
Digital Circuits
Karnaugh Maps
(Maurice Karnaugh (1924-), American physicist and mathematician)
The Karnaugh map is a tool for representing and simplifying Boolean functions.
The Boolean variables and related output values are transferred (generally from a
truth table) into a table that is in a matrix form.
Example: F(A,B)
http://akademi.itu.edu.tr/en/buzluca/ 2.26
2011-2019 Feza BUZLUCA
http://www.buzluca.info
Digital Circuits
Example: Num A B C F
0 0 0 0 0
1 0 0 1 0 F BC
2 0 1 0 0 A 00 01 11 10
3 0 1 1 1 0 0 0 1 0
0 1 3 2
4 1 0 0 0
5 1 0 1 1 1
40 51 7 1 6 1
6 1 1 0 1
7 1 1 1 1
http://akademi.itu.edu.tr/en/buzluca/ 2.27
http://www.buzluca.info 2011-2019 Feza BUZLUCA
Digital Circuits
F CD C D
AB 00 01 11 10 Gray Code
00
0 1 3 2
01
Gray Code 4 5 7 6
11
12 13 15 14
10
8 9 11 10
F CD
AB 00 01 11 10
Example: 00 1 0 0 1
Draw the Karnaugh map for the following
function. 01 0 1 0 0
F(A,B,C,D) = ∪1 (0,2,5,8,9,10,11,12,13,14,15)
11 1 1 1 1
10 1 1 1 1
We will use Karnaugh maps to simplify Boolean functions in the coming lectures.
http://akademi.itu.edu.tr/en/buzluca/ 2.28
2011-2019 Feza BUZLUCA
http://www.buzluca.info
Digital Circuits
Digital Circuits
• The 1st canonical form is the sum of special products called minterm.
• In the 1st canonical form, each product in the sum corresponds to a row in the
truth table with the output "1".
• Minterm: For a Boolean function of n variables, a product of n literals in which
each variable appears exactly once (in either true or complemented form, but
not both) is called a minterm.
For example, a function with 3 variables (a, b, c) has 8 minterms:
a'b'c', a'b'c, a'bc', a'bc, ab'c', ab'c, abc', abc
• Each minterm that appears in the 1st canonical form covers only one row of
the truth table with the output "1".
For example; the minterm a'b'c' can generate "1" only for the input value
abc=000.
For all other input combinations the minterm a'b'c' generates "0".
• The 1st canonical form of a function is the sum of minterms.
http://akademi.itu.edu.tr/en/buzluca/ 2.30
2011-2019 Feza BUZLUCA
http://www.buzluca.info
Digital Circuits License: https://creativecommons.org/licenses/by-nc-nd/4.0/
Finding minterms:
Truth Table → Expression in SOP form
• To find minterms, we locate all rows in the truth table where the output is "1".
• To obtain the individual minterms, we substitute variables (for example, A, B,
or C) for ones (of the inputs) and complements of variables (A', B', or C') for
zeros in the truth table.
Example:
A B C F
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 1
1 0 0 0
1 0 1 1
1 1 0 1
1 1 1 1
http://akademi.itu.edu.tr/en/buzluca/ 2.31
http://www.buzluca.info 2011-2019 Feza BUZLUCA
Digital Circuits
Example:
Obtain the 1st canonical form of the complement of a function F from the
previous example.
1st canonical form of !:
! ", $, % "$% "$% "$%
A B C F F'
0 0 0 0 1
0 0 1 1 0
0 1 0 0 1
0 1 1 1 0
1 0 0 0 1
1 0 1 1 0
1 1 0 1 0
1 1 1 1 0
http://akademi.itu.edu.tr/en/buzluca/ 2.32
2011-2019 Feza BUZLUCA
http://www.buzluca.info
Digital Circuits
Minimization:
F(A, B, C) = A'B'C + A'BC + AB'C + ABC + ABC'
= (A'B' + A'B + AB' + AB)C + ABC'
= ((A' + A)(B' + B))C + ABC'
= C + ABC'
= ABC' + C
= AB + C
• A Boolean function may have many possible logical expressions. They produce
the same result given the same inputs.
• Since the minterms present in the 1st canonical form are in one-to-one
correspondence with the 1’s of the truth table, the 1st canonical (standard)
form expression for a function is unique.
• A function can have only one expression in the 1st canonical form.
http://akademi.itu.edu.tr/en/buzluca/ 2.33
http://www.buzluca.info 2011-2019 Feza BUZLUCA
Digital Circuits
Indexing minterms:
We assign each minterm an index (number) based on the binary encoding of the
variables.
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.
Inputs:
A B C Minterms
0 0 0 A'B'C' = m0
0 0 1 A'B'C = m1
0 1 0 A'BC' = m2
0 1 1 A'BC = m3
1 0 0 AB'C' = m4
1 0 1 AB'C = m5 Example:
1 1 0 ABC' = m6
Expression of function F in (2.31) in 1st canonical form:
1 1 1 ABC = m7
F(A, B, C) = Σm(1,3,5,6,7)
Minterms for three variables = m1 + m3 + m5 + m6 + m7
= A'B'C + A'BC + AB'C + ABC' + ABC
F= ΣA, B, C (1,3,5,6,7) (Sum of minterms)
http://akademi.itu.edu.tr/en/buzluca/ 2.34
2011-2019 Feza BUZLUCA
http://www.buzluca.info
Digital Circuits
http://akademi.itu.edu.tr/en/buzluca/ 2.35
http://www.buzluca.info 2011-2019 Feza BUZLUCA
Digital Circuits
Finding maxterms:
Truth Table → Expression in POS form
• To find the maxterms, we locate all rows in the truth table where the output is
"0".
• To obtain the individual maxterms, we substitute variables (for example, A, B,
or C) for zeros (of the inputs) and complements of variables (A', B', or C') for
ones in the truth table.
Example:
"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 F
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 1
1 0 0 0
1 0 1 1
1 1 0 1
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.36
2011-2019 Feza BUZLUCA
http://www.buzluca.info
Digital Circuits License: https://creativecommons.org/licenses/by-nc-nd/4.0/
Example:
Obtain the 2nd canonical form of the complement of a function F from the
previous example.
2nd canonical form of F:
F'(A,B,C) = (A + B + C') (A + B' + C') (A' + B + C') (A' + B' + C) (A' + B' + C')
A B C F
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 1
1 0 0 0
1 0 1 1
1 1 0 1
1 1 1 1
http://akademi.itu.edu.tr/en/buzluca/ 2.37
http://www.buzluca.info 2011-2019 Feza BUZLUCA
Digital Circuits
Minimization:
F(A, B, C) = (A+B+C) (A+B’+C) (A’+B+C)
= ((A+C)+(B⋅B')) (A'+B+C)
= (A+C) (A'+B+C)
= (A+C) (A'+B+C) (B+C) (consensus)
= (A + C) (B + C)
• A Boolean function may have many possible logical expressions. They produce
the same result given the same inputs.
• Since the maxterms present in the 2nd canonical form are in one-to-one
correspondence with the 0’s of the truth table, the 2nd canonical (standard)
form expression for a function is unique.
• A function can have only one expression in the 2nd canonical form.
http://akademi.itu.edu.tr/en/buzluca/ 2.38
2011-2019 Feza BUZLUCA
http://www.buzluca.info
Digital Circuits
Indexing maxterms:
We assign each maxterm an index (number) based on the binary encoding of the
variables. This is a decimal number that represents the row number (Row numbers
start at 0).
For example, we assign the index 5 to the maxterm a'+b+c' (101) and designate it M5.
Inputs:
A B C Maxterms
0 0 0 A+B+C M0
0 0 1 A+B+C' M1
0 1 0 A+B'+C M2
0 1 1 A+B'+C' M3
1 0 0 A'+B+C M4
1 0 1 A'+B+C' M5
1 1 0 A'+B'+C M6 Example:
1 1 1 A'+B'+C' M7 2nd canonical form of F:
F(A, B, C) = ΠM(0,2,4)
= M0 • M2 • M4
Maxterms for 3 variables = (A + B + C) (A + B' + C) (A' + B + C)
http://akademi.itu.edu.tr/en/buzluca/ 2.39
http://www.buzluca.info 2011-2019 Feza BUZLUCA
Digital Circuits