Title: Deals with variables that have two discrete values: 0 or 1
1BINARY LOGIC
--Deals with variables that have two discrete
values 0 or 1 --BINARY LOGIC is used to
describe the manipulation and processing of the
binary information ( Boolean Algebra) -- 3
Basic logical operations used to manipulate
Binary Variables And () X Y Z means
Z1 if and only if X1 and Y 1 Or () X
Y Z means Z1 if X1 or if Y1 Not ( or
) X Z (XZ) means Z is what X is not, if
X1, Z0 if X0, Z1
2GEORGE BOOLE 1815 - 1864
George Boole was born in Lincoln, England, the
son of a cobbler. He had to struggle for an
education due to his familys financial
difficulties. He went into teaching, and soon
afterward opened a school. In his preparation
for teaching mathematics, he read the works of
some of the great mathematicians. While reading
papers of LaGrange, he made discoveries in the
calculus of variations. In 1848 he published the
Mathematical Analysis of Logic, the first of his
many contributions to symbolic logic. In 1849 he
was appointed professor of mathematics at
Queens College in Cork, Ireland. In 1854 he
published The Laws of Thought, his most famous
work, in which he introduced what is now
called..
3BOOLEAN ALGEBRA
Boolean Algebra is defined using -set of
elements -set of operators -unproved axioms
postulates SET Collection of objects having a
common property (elements).
4BOOLEAN ALGEBRA
BINARY OPERATOR A rule which assigns a unique
element (in S) to each pair of elements in the
set. POSTULATES Basic assumptions from which it
is possible to deduce rules, theorems, and
properties. AXIOM A rule accepted as valid on
its own merit.
5TWO-VALUED BOOLEAN ALGEBRA S 0,1 AND
Operator ()
X
Y X Y
0 0 0 0 1 0 1
0 0 1 1 1
X
Y X Y
0 0 0 0 1
1 1 0 1 1 1
1
OR Operator ()
6TWO-VALUED ALGEBRA
BOOLE 1854, Logic System SHANNON 1938,
Switching Algebra HUNTINGTON 1904, Postulates
7Postulates and Theorems
of Boolean algebra
Postulate 2 a) x 0 x b) x 1
x Postulate 5 a) x x 1 b) x
x 0 Theorem 1 a) x x x b) x
x x Theorem 2 a) x 1 1 b) x
0 0 Theorem 3, Involution (x) x
Postulate 3, Commutative a) x y y x
b) xy yx Theorem 4, Associative a) x
(y z) (x y) z b) x(yz)
(xy)z Postulate 4, Distributive a) x(y z) xy
xz b) x yz (xy)(xz) Theorem 5,
DeMorgan a) (x y) x y
b) (xy) x y Theorem 6, Absorption a) x
xy x b) x(x y) x
8Theorem 1(b) X X X X X XX 0 0
identity XX XX complement
X(X X) distributive X
1 complement X X X
9Theorem 2 (a) X 1 1 X 1 1 (X
1) 1 identity (X X) ( X 1)
Complement X X 1
Distributive X X 1
identity X 1 1 Compliment Theorem
2 (b) X 0 0 by duality of X 1
1 Theorem 3 (X) X X X (X)
from X X 0 1 0
0 1 1 0 1
1 0
10Theorem 4 X ( Y Z) (X Y) Z XYZ
(Y Z) X (Y Z) (X Y) (X Y) Z 0
0 0 0 0
0 0 0 0 1 1
1 0 1 0
1 0 1 1
1 1 0 1 1 1
1 1
1 1 0 0 0 1
1 1 1 0 1 1
1 1
1 1 1 0 1 1
1 1 1 1 1 1
1 1
1
Similarly for X YZ (X Y) ( X Z)
11Theorem 5 The DeMorgans Law
(X Y) XY (XY) X Y
X Y X Y (X Y) X Y XY 0 0
0 1 1 1 1 0
1 1 0 1 0
0 1 0 1 0 0 1
0 1 1 1 0 0
0 0
12Theorem 6(a) X XY X
X XY X
1 XY
1
identity
X( 1 Y)
Distributive
X( Y 1)
Commutative
X
1
1
identity
X XY X
1
identity
Theorem 6(b) X (X Y) X
by duality of X( X Y) X
13- Operator procedure for evaluating expression
- 1. Parenthesis
- 2. AND
- 3. NOT
- 4. OR
- PARENTHESES
- NOT
- AND
- OR
- Example To evaluate (X Y)
- Compute the expression inside the parenthesis
first, then - take the complement of the result.
14Logic Gates
X Z XY Y X Y Z X Y
Z
AND
Z
OR
NOT X X Z X
15Integrated Circuits - SN7404
16Integrated Circuits - SN7408
17Integrated Circuits - SN7432
18Logic Gates
X Y
f XYZ
Z
fX YZ
Z
X
Y
19Boolean Functions
An expression formed with binary variables, the
two binary operator AND and OR, the NOT
operator, parentheses and an equal sign. f X
Y Z The function is equal to 1 iff X 1 and
Y 1 and Z 1 otherwise the function f
0.
20The truth table for f
X Y Z f X Y Z
0 0 0 0 0 0 1
0 0 1 0 0 0 1
1 0 1 0 0 0 1
0 1 0 1 1 0
1 1 1 1 0
21TRUTH TABLES
N
0
X Y Z f 0 0 0 0
0 1 0 1 0 0 1 1 1 0
0 1 0 1 1 1 0 1 1 1
2N
2N - 1
22Example f X Y Z
X Y Z Y Y Z X YZ
0 0 0 0 0 1 0 1 0 0 1 1 1
0 0 1 0 1 1 1 0 1 1 1
23Example f X Y Z
X Y Z Y Y Z X YZ
0 0 0 1 0 0 0 0 1 1 1 1 0
1 0 0 0 0 0 1 1 0 0 0 1 0
0 1 0 1 1 0 1 1 1 1 1 1
0 0 0 1 1 1 1 0 0 1
24Are Boolean algebraic functions
unique? Consider f1 X Y Z X Y Z
XY
f1
X Y Z
0 0 0 0 0 0 1 1 0
1 0 0 0 1 1 1 1 0
0 1 1 0 1 1 1 1 0
0 1 1 1 0
25And also consider f2 X Y X Z
X Y Z f2
0 0 0 0 0 0 1 1 0
1 0 0 0 1 1
1 1 0 0 1 1 0
1 1 1 1 0 0 1 1
1 0
Algebraic functions are not unique.
26f1 X Y Z X Y Z X Y
X
Y
f
Z
27Algebraic Manipulation
- A literal is a single variable
- Each literal in a Boolean function designates an
input to a logic gate - Each term is implemented with a gate
- Minimization of the numbers of literals and terms
reduces the number of components in a circuit - The number of literals can be reduced by
algebraic manipulation - There are no rules which guarantee a good result.
28Algebraic Manipulation
Example f X X Y X X Y ( X X) ( X
Y) (distributive) 1 ( X Y)
f X Y Example f X (X Y) X (X Y)
X X X Y 0 X Y f
XY Example f XYZ XY Z XY XY Z
XY Z XY X Z (Y Y) X Y
X Z 1 X Y f X Z X Y
29Algebraic Manipulation
Example f X Y X Z Y Z X Y X Z
Y Z (X X) X Y X Z X Y Z X Y Z
X Y ( 1 Z) X Z ( 1 Y)
f X Y X Z
30Complement of a function
f is the complement of f f can be obtained by
interchanging 1s and 0s on the truth table.
X Y Z f f
0 0 0 1 0 0 0
1 0 1 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 0 1
31The complement can be obtained from DeMorgans
law. f X YZ f X (Y Z)
Prove via truth table.
X Y Z
0 0 0 0 0 1 0
1 0 0 1 1 1 0
0 1 0 1 1 1 0
1 1 1
32Theorem 5 DeMorgans Law
(XY . . . Z) X Y Z (XYZ) X Y
Z
X Y X Y (X Y) X Y X Y 0 0
0 1 1 1 1 0
1 1 0 1 0
0 1 0 1 0 0 1
0 1 1 1 0 0
0 0
33Generalized DeMorgans Law
(X Y . . . . Z) X Y . . . Z and
(XY . . . Z) X Y . . . Z
De Morgans Law is applied in two steps 1. Take
the dual of the expression. 2. Compliment each
literal. Example f (X, Y, Z) X Y Z X Y Z
1. Dual of f (X Y Z) (X Y Z) 2.
Complement literal f ( X Y Z) (X Y
Z)
De Morgans Law gives an expression for the
complement of a function.
34Canonical And Standard Forms
- Product term ? ( ---) (---) (---)
- Sum term ? ( - - - ) ( - - - ) (- - -)
- A variable can be in its normal form, such as
X, or it - can be complemented, like X.
- For two variables, X, Y, and the AND operator
there are - four possible combination
- X Y X Y
- XY XY
- Each AND-term is called a minterms or a
standard - product.
- For N variables there are 2N minterms. Minterms
are - numbered from 0 to 2N-1 and designated by a small
m.
35Canonical And Standard Forms
Similarly, for two variables and the OR operator
there are four possible combinations X
Y X Y X Y X Y
Each OR term is called a maxterm or a
standard sum. For N variable there are 2N
maxterms. Maxterms are numbered from 0 to 2N
1 and are designated by a large M.
MINTERM standard product term MAXERM
standard sum term Standard term no variable
appear more than once and every variable
appears in the term.
36Minterms and maxterms for two binary variables.
Minterms Maxterms
x y Term Designation Term
Designation
0 0 xy m0 x y
M0 0 1 xy m1 x y
M1 1 0 xy m2
x y M2 1 1 xy m3
x y M3
37Minterms and maxterms for three binary variables.
Minterms Maxterms
x y z Term Designation
Term Designation
0 0 0 xyz m0 x
y z M0 0 0 1 xyz m1
x y z M1 0 1 0 xy z
m2 x y z M2 0
1 1 xy z m3 x
y z M3 1 0 1 x yz m4
x y z M4 1 0 1
x yz m5 x y z M5 1 1
0 x y z m6 x y
z M6 1 1 1 x y z m7
x y z M7
38Minterms And Maxterms For Three Binary Variables
X Y Z Minterms Maxterms 0 0 0 X
Y Z m0 X Y Z M0 0
0 1 X Y Z m1
X Y Z M1 0 0 0
X Y Z m2 X Y
Z M2 0 1 1 X Y Z
m3 X Y Z M3 1 0
0 X Y Z m4
X Y Z M4 1 0 1
X Y Z m5 X Y Z
M5 1 1 0 X Y Z
m6 X Y Z M6 1 1 1
X Y Z m7
X Y Z M7
39Given this truth table
X Y Z f Minterm Maxterm 0 0
0 0 m0
M0 0 0 1 1
m1 M1 0 1 0
0 m2
M2 0 1 1 0
m3 M3 1 0 0
1 m4 M4 1
0 1 0 m5
M5 1 1 0 0
m6 M6 1 1 1
1 m7
M7
F can be described by the minterms for which f
1. f m1 m4 m7 ? (1, 4, 7) f XYZ
XYZ X Y Z
40Sum of Minterms or Product of Maxterms
F can also described by the maxterms for
which f 0. f M0 M2 M3 M5 M6 ? ( 0, 2, 3, 5
,6) f ( X Y Z) ( X Y Z) (X Y Z) (
XZ Z) ( X Y Z)
Any Boolean function can be expressed as a sum
of minterms or product of maxterms. Boolean
functions expressed as a sum of minterms or
product of maxterms are said to be in canonical
form.
41 Example Express f X Y Z in canonical
form. f X Y Z X (Y Y) YZ X
Y X Y Y Z X Y (Z Z) X Y ( Z
Z) Y Z ( X X) X Y Z X Y Z X
YZ X Y Z X YZXYZ f m1 m4 m5
m6 m7 ? ( 1, 4, 5, 6, 7)
42Project
- Implement the following function
X Y f 0 0 0 0 1
1 1 0 1 1 1 0
43Project
X Y f 0 0 0 0 1
1 1 0 1 1 1 0
44Project
X Y f 0 0 0 0 1
1 1 0 1 1 1 0
45Exclusive OR XOR
X Y f 0 0 0 0 1
1 1 0 1 1 1 0
46Integrated Circuits - SN7486
47LAB 1
- Build a combinational logic circuit