Ch2. Boolean Algbra
Ch2. Boolean Algbra
Introduction
• Developed by English Mathematician George
Boole in between 1815 - 1864.
• It is described as an algebra of logic or an
algebra of two values i.e True or False.
• The term logic means a statement having
binary decisions i.e True/Yes or False/No.
Application of Boolean algebra
1. AND
2. OR
3. NOT (negation/complement)
AND operator
• It performs logical AND operation (like multiplication)
and denoted by (.) dot.
X Y X.Y
0 0 0
0 1 0
1 0 0
1 1 1
OR operator
• It performs logical OR operation (like addition) and
denoted by (+) plus.
X Y X+Y
0 0 0
0 1 1
1 0 1
1 1 1
NOT operator
• It performs logical negation and denoted by (-)
bar. It operates on single variable.
X X (means complement of x)
0 1
1 0
Truth Table
• Truth table is a table that contains all possible values
of logical variables/statements in a Boolean
expression.
literal identifier
y
• A, B, y, z, or X1
examples: A
B
Logic
Circui
etc…. G
t
Input Output
literal literal9
Logical Operations on Binary
literals
The three basic logical operations are:
• AND
• OR
• NOT
AND is denoted by a dot (·)
OR is denoted by a plus (+)
NOT is denoted by an overbar ( ¯ ), a
single quote mark (') after, or ( or #)
before the literal, e.g. A, ‘A, A,
or #A
10
Definitions of the Basic Logic Operation
Operations are defined on the values "0"
and "1" for each operator:
AND (.) OR (+) NOT (
)
0·0=0 0+0=0
0·1=0 0+1=1 0=1
1·0=0 1+0=1
1·1=1 1+1=1 1=0
Comparison Multiplication Addition and No
with the and AND give OR give corresponding
corresponding identical results different Math operator
Math Operator Results for for NOT
1+1 11
Truth Tables
Truth table - A tabular listing of the values of a
logic function for all possible combinations of
the values of its argument literals
Example: Truth tables for the basic
logic operations:
AND OR NOT
X Y Z = X·Y X Y Z = X+Y X Z
0 0 0 0 0 0 X
0 1 0 0 1 1 0 1
1 0 0 1 0 1 1 0
1 1 1 1 1 1 12
Truth Table
13
Truth Table
14
Truth Table
15
Logic Gates
16
Logic Gates…
17
Logic Gates – OR Gate
An OR gate performs an ORing operation
on two or more than two logic variables.
18
Logic Gates – OR Gate
19
Logic Gates – OR Gate
20
Logic Gates – AND Gate
An AND gate is a logic circuit having two or
more inputs and one output.
21
Logic Gates – AND Gate
22
Logic Gates – AND Gate
23
Practical Implementation of AND and OR
Functions
1. Using Switches
Input/Output Definitions
• Input:
logic 1 is switch closed
logic 0 is switch open
• Output:
logic 1 is lamp on
logic 0 is lamp off.
24
Logic Gates – NOT Gate
A NOT gate is a one-input, one-output
logic circuit whose output is always the
complement of the input.
25
Logic Gates – NOT Gate
.
26
Logic Gate Symbols and Behavior
X X
Z=
5 X· 5 1 X 5
Y Y Z = X+ Z=
AND Y
OR Y NOT gate X
gate gate or
(a) Graphic inverter
symbols
X 0 1 1
0
Timing Y 1 0 1
diagrams 0
(derived from (AND X ·Y 0 0 1
truth tables) ) 0
1 1 1 1
(OR) X + Y
0
(NOT) 1 0 0
X
4
Logic Gates – NAND Gate
NAND stands for NOT AND.
An
AND gate followed by a NOT circuit
makes it a NAND gate.
The
output of a NAND gate is a logic ‘0’
when all its inputs are a logic ‘1’.
Y = A.B
28
Logic Gates – NAND Gate
29
Logic Gates – NOR Gate
NOR stands for NOT OR.
Y = (A+B). 30
Logic Gates – NOR Gate
31
Logic Gates – EXCLUSIVE-OR Gate
32
Logic Gates – EXCLUSIVE-OR Gate
33
Logic Gates – Exclusive-NOR Gate
EXCLUSIVE-NOR (commonly written as
EX- NOR) means NOT of EX-OR, i.e.
the logic gate that we get by
complementing the output of an EX-OR
gate.
35
Summary of Digital Logic
Gates
38
Logic Gates – Universal Gates
39
Logic Gates – Universal Gates
40
Logic Gates – Universal Gates
41
De Morgan’s Theorems
43
De Morgan’s Theorems
2. Theorem 2:
A+B = A.B
NOR = Bubbled AND
44
De Morgan’s Theorems
45
Boolean
Algebra
Variable, complement, and literal
are terms used in Boolean algebra.
A variable is a symbol used to
represent a logical quantity. Any
single variable can have a 1 or a 0
value.
The complement is the inverse
of a variable and is indicated by
a bar over variable (over bar).
46
Boolean Algebra
47
Boolean Algebra -
Laws
1. Commutative Law: The
commutative law of addition for
two variables is written as
A+B = B+A.
This law states that the order in
which the variables are ORed
makes no difference.
In Boolean algebra as applied to
logic circuits, addition and the OR
operation are the same.
48
Boolean Algebra -
Laws
49
Boolean Algebra -
Laws
1. Commutative Law: The
commutative law of multiplication
for two variables is
A.B = B.A
This law states that the order in
which the variables are ANDed
makes no difference.
50
Boolean Algebra -
Laws
2. Associative Law: The associative
law of addition is written as
follows for three variables: A + (B
+ C) = (A + B) + C.
This law states that when ORing
more than two variables, the result
is the same regardless of the
grouping of the variables.
51
Boolean Algebra -
Laws
2. Associative Law: The associative
law of multiplication is written as
follows for three variables: A.
(B.C) = (A.B).C.
This law states that it makes
no difference in what order the
variables are grouped when
ANDing more than two variables.
52
Boolean Algebra -
Laws
3. Distributive Law: The distributive
law is written for three variables
as follows: A(B + C) = A.B +
A.C
This law states that ORing two or more
variables and then ANDing the result
with a single variable is equivalent
to ANDing the single variable with each
of the two or more variables and
then ORing the products.
53
Boolean Algebra -
Laws
3. Distributive Law: The
distributive law also expresses
the process of factoring in which
the common variable A is
factored out of the product
terms, for example, AB + AC =
A(B + C).
54
Boolean Algebra -
Laws
Rules of Boolean
Algebra: .
55
Boolean Algebra -
Laws
Rules of Boolean
Algebra: .
56
Boolean Algebra -
Laws
Rules of Boolean
Algebra: .
57
Boolean Algebra -
Laws
Rules of Boolean
Algebra: .
58
Boolean Algebra -
Laws
Rules of Boolean
Algebra: .
59
Boolean Algebra -
Laws
Rules of Boolean
Algebra: .
60
Boolean Algebra -
Laws
Rules of Boolean
Algebra: .
61
Boolean Algebra -
Laws
Rules of Boolean
Algebra: .
62
Boolean Algebra -
Laws
Rules of Boolean
Algebra: .
63
Boolean Algebra -
Laws
Rules of Boolean
Algebra: .
64
Boolean Algebra -
Laws
Rules of Boolean
Algebra: .
65
Boolean Algebra -
Laws
Rules of Boolean Algebra: The
proof is shown in Table below,
which shows the truth table and
the resulting logic circuit
simplification.
66
Boolean Algebra -
Laws
Rules of Boolean
Algebra:.
67
Boolean Algebra -
Laws
A+AB = A+B
A(B+B)+AB
=> AB+AB +AB
=> AB+AB +AB+AB
Þ A(B+B) + B(A+A)
Þ A.1+B.1
Þ A+B
68
Boolean Algebra -
Laws
A+AB = A+B
A + A’ B = A. l + A’ B
= A (l + B) + A’B
=A + AB + A’B
=A + B (A + A’)
=A+B
69
Boolean Algebra -
Laws
Rules of Boolean
Algebra:.
70
Boolean Algebra -
Laws
Rules of Boolean
Algebra:.
71
Boolean Algebra -
Laws
Rules of Boolean
Algebra:.
72
Boolean Algebra -
Simplification
Boolean Expression for the a
logic circuit: .
74
Boolean Algebra -
Simplification
Boolean Expression for the a
logic circuit: To derive the Boolean
expression for a given logic
circuit, begin at the leftmost
inputs and work toward the final
output, writing the expression for
each gate.
For the given circuit, the
Boolean expression is determined
as follows:
75
Boolean Algebra -
Simplification
Boolean Expression for the a
logic circuit:
The expression for the left-most AND
gate with inputs C and D is CD.
The output of the left-most AND gate
76
Boolean Algebra -
Simplification
Boolean Expression for the a
logic circuit:
The output of the OR gate is one
of the inputs to the right-most AND
gate and A is the other input.
Therefore, the expression for this AND
gate is A(B + CD), which is the final
output expression for the entire circuit.
77
Boolean Algebra -
Simplification
Constructing Truth table for a logic Circuit:-.
Once the Boolean expression for a given
logic circuit has been determined, a truth
table that shows the output for all possible
values of the input variables can be
developed.
78
Boolean Algebra -
Simplification
Constructing Truth table for a logic Circuit:-.
The first step is to list the sixteen input
variable combinations of 1s and 0s in
a binary sequence as shown in below
table.
Next, place a 1 in the output column for
each combination of input variables
that was determined in the evaluation.
Finally, place a 0 in the output column for
all other combinations of input variables.
79
Boolean Algebra -
Simplification
Constructing Truth table for a logic
Circuit:-.
80
Basic Theorem of Boolean Algebra
T1:
(a) 0 + A = A
(b) 0. A = 0
T2:
(a) 1 + A = 1
(b) 1. A = A
Basic Theorem of Boolean Algebra
T3 : Commutative Law
(a)A + B = B + A
(b)A. B = B. A
T4 : Associate Law
(a) (A + B) + C = A + (B + C)
(b) (A B) .C = A. (B.C)
T5 : Distributive Law
(a) A (B + C) = A B + A C
(b) A + (B C) = (A + B) (A + C)
(c) A+A’B = A+B
Basic Theorem of Boolean Algebra
T6 :
(a) A + A = A
(b) A. A = A
T7 :
(c) A + A B = A
(d) A. (A + B) = A
Basic Theorem of Boolean Algebra
T8 :
(a) X+X’=1
(b) X.X’=0
T9 : n
(a) x’’ = x
T10 : De
Morgan's
Theorem
(a)
(X+Y)’=X’.Y’
(b)
(X.Y)’=X’+Y’
Boolean Algebra
0·0=0
0 + 0 =0
0’ = 1
Duality
1·1= 1
1 + 1 =1
1’ = 0
0+1=1+0=1
0 · 1 = 1 ·0 = 0
16
Single Variable Theorems
x · 0 = 0
x + 1 = 1
x · 1 = x
x + 0 = x
x · x = x
x + x = x
x + !x = 1
x · !x = 0
x · x · x · … x = x
!!x = x
Introduction 17
Two Variable Theorems
x · y = y · x
x + y = y + x
Both are
commutative
Introduction 18
De Morgan's Theorem
X 1 X 2 ... X n X1
X 2 ... X n
X 1 X 2 ...
X 1 X 2 ...
Xn
Xn
Remember: X Y X
Y
X Y X
Y
2
Possible Logic Operations
OR
NAND
NOR
AND
90