DC 02
DC 02
DC 02
0/
Boolean Algebra
George Boole (1815-1864) English mathematician and philosopher.
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 a relationship between AND and OR (• and +).
http://akademi.itu.edu.tr/en/buzluca/ 2.3
http://www.buzluca.info 2011 - 2024 Feza BUZLUCA
Digital Circuits
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
http://www.buzluca.info 2011 - 2024 Feza BUZLUCA
Digital Circuits
Note that to denote negation (NOT), we can also use the notation A.
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 - 2024 Feza BUZLUCA
Digital Circuits
http://akademi.itu.edu.tr/en/buzluca/ 2.7
http://www.buzluca.info 2011 - 2024 Feza BUZLUCA
Digital Circuits
Conventions:
• Write the literals in the terms in alphabetical order: ̅ (not ̅ )
• Write the expression starting with the term that has the fewest (or the most)
literals, and then proceeding in ascending (or descending) order of literals per
term, such as: ̅ ̅ or ̅ ̅
http://akademi.itu.edu.tr/en/buzluca/ 2.8
http://www.buzluca.info 2011 - 2024 Feza BUZLUCA
Digital Circuits
X= x1 x2 x3 E(X)
0 0 0 0 Set of all input Combinations for which
combinations (X) E(X) generates ‘1’
0 0 1 1 (combinations E(X) covers)
0 1 0 0
0 1 1 1
1 0 0 0 Combinations 000 001
1 0 1 1 for which E(X) 010 011
1 1 0 1 generates ‘0’ 100 101
1 1 1 1 111 110
http://akademi.itu.edu.tr/en/buzluca/ 2.9
http://www.buzluca.info 2011 - 2024 Feza BUZLUCA
Digital Circuits
E a, b, c, d · 0 bc ad ab · 0 0√
http://akademi.itu.edu.tr/en/buzluca/ 2.10
http://www.buzluca.info 2011 - 2024 Feza BUZLUCA
Digital Circuits
• The partial order relation "≤" may not exist between all vectors.
Example:
X1 = 0011 , X2 = 1001
There is no order relation between X1 and X2.
Neither X1 ≤ X2 nor X2 ≤ X1 is true.
http://akademi.itu.edu.tr/en/buzluca/ 2.11
http://www.buzluca.info 2011 - 2024 Feza BUZLUCA
Digital Circuits
• Remember: The theorems given for binary values on slide 2.3 are also valid for
expressions due to the closure property.
Consequently, the absorption theorem given for binary values (a + a⋅b = a and
a⋅(a+b) = a) is also valid for expressions because of the closure property.
• However, the partial order relation ≤ makes it easier to grasp the absorption
properties of expressions.
• Since absorption is an important theorem used to simplify expressions, we will
again illustrate this theorem using the order relation ≤.
• We will consider two cases.
o Case A: Special case: E(X) ≤ F(X) (as in the example on slide 2.12)
o Case B: General case: The order relation ≤ does not exist between E(X) and F(X)
http://akademi.itu.edu.tr/en/buzluca/ 2.13
http://www.buzluca.info 2011 - 2024 Feza BUZLUCA
Digital Circuits
1. E(X) + F(X) = · · · · · ·
= · · · = F(X)
2. E(X) • F(X) = · · · · · · ·
= · · · = E(X)
http://akademi.itu.edu.tr/en/buzluca/ 2.14
http://www.buzluca.info 2011 - 2024 Feza BUZLUCA
Digital Circuits
·$ $ dual $ ·$
Proof: ·$ $ 1 $ $
These properties are used to minimize (simplify) logic expressions.
http://akademi.itu.edu.tr/en/buzluca/ 2.15
http://www.buzluca.info 2011 - 2024 Feza BUZLUCA
Digital Circuits
Consensus Term:
• Given a pair of product terms that include a biform variable, the consensus
term (SOP) is formed by multiplying (ANDing) the two original terms together,
leaving out the selected biform variable and its complement.
• The consensus term of with respect to variable x1 is E1E2 .
Example: Consensus of (with respect to a) is %&' .
The Consensus Theorem: The consensus term is redundant and can be eliminated.
( ()
http://akademi.itu.edu.tr/en/buzluca/ 2.17
http://www.buzluca.info 2011 - 2024 Feza BUZLUCA
Digital Circuits
( ()
http://akademi.itu.edu.tr/en/buzluca/ 2.18
http://www.buzluca.info 2011 - 2024 Feza BUZLUCA
Digital Circuits License: https://creativecommons.org/licenses/by-nc-nd/4.0/
, -, , . - . - . - . - . - .
Consensus (with respect to C)
- . - . - . - . - . - is added
- . - . - . - . - . - Absorption
- . - . - . -
Consensus (with respect to B)
- . - . -. - . - is added
- . - . -. - . - Absorption
-. - . -
Consensus (with respect to B) is added
-. - . - -. Absorption
-. - -.
Consensus (with respect to A) is added
-. - -. . Absorption
- .
http://akademi.itu.edu.tr/en/buzluca/ 2.19
http://www.buzluca.info 2011 - 2024 Feza BUZLUCA
Digital Circuits
x
f z
y
Truth table for 16 possible basic logic functions (F0–F15) 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.21
http://www.buzluca.info 2011 - 2024 Feza BUZLUCA
Digital Circuits
http://akademi.itu.edu.tr/en/buzluca/ 2.22
http://www.buzluca.info 2011 - 2024 Feza BUZLUCA
Digital Circuits
• Let us assume that the output of L1 does not generate all possible
combinations of values for A, B, and C.
• In particular, we will assume that there are no combinations of values for
w, x, y, and z, which cause A, B, and C to assume values of 001 and 110.
• In other words, L1 never generates the output combinations 001 and 110.
• Hence, when we design L2, it is not necessary to specify values of F for
ABC = 001 or 110 because these combinations of values can never occur as
inputs to L2.
http://akademi.itu.edu.tr/en/buzluca/ 2.23
http://www.buzluca.info 2011 - 2024 Feza BUZLUCA
Digital Circuits
• The X’s in the table indicate that we do not care whether the value of 0 or 1
is assigned to F for the combinations ABC = 001 or 110.
• In this example, we do not care what the value of F is because these input
combinations never occur anyway.
• The function F is then incompletely specified.
• The terms - . and - . are referred to as ‘’don’t care’’ terms because we
do not care whether they are present in the function or not.
http://akademi.itu.edu.tr/en/buzluca/ 2.24
http://www.buzluca.info 2011 - 2024 Feza BUZLUCA
Digital Circuits License: https://creativecommons.org/licenses/by-nc-nd/4.0/
• In Section 4, we will see the selection of unspecified (don't care) values and the
simplification of incompletely specified functions in detail.
• Incompletely specified functions can arise in the following cases:
• Certain combinations of inputs cannot occur (as in the above example).
• All input combinations may occur, but the function output is used in such a
way that we do not care whether it is 0 or 1 for certain input combinations.
http://akademi.itu.edu.tr/en/buzluca/ 2.25
http://www.buzluca.info 2011 - 2024 Feza BUZLUCA
Digital Circuits
http://akademi.itu.edu.tr/en/buzluca/ 2.27
http://www.buzluca.info 2011 - 2024 Feza BUZLUCA
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.29
http://www.buzluca.info 2011 - 2024 Feza BUZLUCA
Digital Circuits
http://akademi.itu.edu.tr/en/buzluca/ 2.30
http://www.buzluca.info 2011 - 2024 Feza BUZLUCA
Digital Circuits License: https://creativecommons.org/licenses/by-nc-nd/4.0/
Digital Circuits
Canonical Forms:
• There are two types of canonical forms:
o 1st canonical form: SOP (ΣΠ) form. Example: / % & + / % &
The sum of products, each of which corresponds to a "1"-generating
combination.
o 2nd canonical form: POS (ΠΣ) form. Example: / % & / % &)
The product of sums, each of which corresponds to a "0"-generating
combination.
• Expressions for each logic function can be written in either of these forms.
• Expressions in one form can be converted to the other form.
• Canonical forms are also called standard forms.
http://akademi.itu.edu.tr/en/buzluca/ 2.32
http://www.buzluca.info 2011 - 2024 Feza BUZLUCA
Digital Circuits
http://akademi.itu.edu.tr/en/buzluca/ 2.33
http://www.buzluca.info 2011 - 2024 Feza BUZLUCA
Digital Circuits
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.34
http://www.buzluca.info 2011 - 2024 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 3:
3 , ,
A B C 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.35
http://www.buzluca.info 2011 - 2024 Feza BUZLUCA
Digital Circuits
Minimization:
, -, , . - . - . - . - . - .
- - - - . - .
- - . - .
. - .
- . .
- .
• A Boolean function may have many possible logic expressions. They produce the
same result given the same inputs.
• Since the minterms 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.36
http://www.buzluca.info 2011 - 2024 Feza BUZLUCA
Digital Circuits License: https://creativecommons.org/licenses/by-nc-nd/4.0/
Indexing minterms:
We assign each minterm an index (number) based on the binary encoding of the
variables.
This decimal number represents the row number (Row numbers start at 0).
For example, we assign the index 5 to the minterm - . (101) and designate it m5.
http://akademi.itu.edu.tr/en/buzluca/ 2.37
http://www.buzluca.info 2011 - 2024 Feza BUZLUCA
Digital Circuits
http://akademi.itu.edu.tr/en/buzluca/ 2.38
http://www.buzluca.info 2011 - 2024 Feza BUZLUCA
Digital Circuits
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 has the same truth table as the function on slide 2.34.
The expressions in the 1st and 2nd canonical forms both correspond to the same
truth table.
http://akademi.itu.edu.tr/en/buzluca/ 2.39
http://www.buzluca.info 2011 - 2024 Feza BUZLUCA
Digital Circuits
Example:
Obtain the 2nd canonical form of the complement of a function F from the
previous example.
2nd canonical form of F:
, -, , . = (- .) (- .) (- .) (- .) (- .)
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.40
http://www.buzluca.info 2011 - 2024 Feza BUZLUCA
Digital Circuits
• A Boolean function may have many possible logic expressions. They produce the
same result given the same inputs.
• Since the maxterms 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.41
http://www.buzluca.info 2011 - 2024 Feza BUZLUCA
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 0 1 2̅ (101) and designate it M5.
http://akademi.itu.edu.tr/en/buzluca/ 2.42
http://www.buzluca.info 2011 - 2024 Feza BUZLUCA
Digital Circuits License: https://creativecommons.org/licenses/by-nc-nd/4.0/
Digital Circuits
• Applying the De Morgan's theorem to the complement of the function in the 2nd
canonical form generates the expression in the 1st canonical form.
Example:
Complement of the function in POS form (2.40):
F A B C A B C A B C A B C A B C
Applying De Morgan
F A B C A B C A B C A B C A B C
F ABC ABC ABC ABC ABC 1st canonical form (2.34).
http://akademi.itu.edu.tr/en/buzluca/ 2.44
http://www.buzluca.info 2011 - 2024 Feza BUZLUCA
Digital Circuits
Graphical Representation
• The input variables (combinations) of a logic 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 hypercube
Boolean Cubes: 01 11
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.45
http://www.buzluca.info 2011 - 2024 Feza BUZLUCA
Digital Circuits
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.46
http://www.buzluca.info 2011 - 2024 Feza BUZLUCA
Digital Circuits
Karnaugh Maps
Maurice Karnaugh (1924-2022), 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)
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
4 1 0 0 0 0 1 3 2
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.48
http://www.buzluca.info 2011 - 2024 Feza BUZLUCA
Digital Circuits License: https://creativecommons.org/licenses/by-nc-nd/4.0/
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.49
http://www.buzluca.info 2011 - 2024 Feza BUZLUCA