Professional Documents
Culture Documents
Boolean Algebra and Logic Gates: Be Chemical Ii/I, Eeeg 204
Boolean Algebra and Logic Gates: Be Chemical Ii/I, Eeeg 204
Gates
06/04/2021 1
Logical Operations
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 (~) before the variable.
06/04/2021 2
Notation Examples
Examples:
• Y A B is read “Y is equal to A AND B.”
AND OR NOT
0·0=0 0+0=0
01
0·1=0 0+1=1
1·0=0 1+0=1 10
1·1=1 1+1=1
06/04/2021 4
Truth Tables
Tabular listing of the values of a function for al.l
possible combinations of values on its arguments
Example: Truth tables for the basic logic operations:
AND OR NOT
X Y Z = X·Y X Y Z = X+Y X ZX
0 0 0 0 0 0 0 1
0 1 0 0 1 1 1 0
1 0 0 1 0 1
1 1 1 1 1 1
06/04/2021 5
Truth Tables – Cont’d
Used to evaluate any logic function
Consider F(X, Y, Z) = X Y + Y Z
X Y Z XY Y YZ F=XY+YZ
0 0 0 0 1 0 0
0 0 1 0 1 1 1
0 1 0 0 0 0 0
0 1 1 0 0 0 0
1 0 0 0 1 0 0
1 0 1 0 1 1 1
1 1 0 1 0 0 1
1 1 1 1 0 0 1
06/04/2021 6
Logic Function Implementation
Switches in parallel => OR
Using Switches
• Inputs:
logic 1 is switch closed
logic 0 is switch open
Switches in series => AND
• Outputs:
logic 1 is light on
logic 0 is light off.
• NOT input: Normally-closed switch => NOT
C
logic 1 is switch open
logic 0 is switch closed
06/04/2021 7
Logic Function Implementation – cont’d
Light is on (L = 1) for
L(A, B, C, D) = A (B C + D) = A B C + A
D
and off (L = 0), otherwise.
Useful model for relay and CMOS gate circuits, the
foundation of current digital logic circuits
06/04/2021 8
Logic Gates
In the earliest computers, switches were opened and
closed by magnetic fields produced by energizing
coils in relays. The switches in turn opened and
closed the current paths.
06/04/2021 9
Logic Gate Symbols and Behavior
Logic gates have special symbols:
X X
Z=
Y Z= Z= X+ Y
X
X·Y Y X
NOT gate
or
OR gate
And waveform behavior in time as follows:
AND gate inverter
X 0 0 1 1
Y 0 1 0 1
(AND) X·Y 0 0 0 1
(OR) X+ Y 0 1 1 1
06/04/2021 (NOT) X 1 1 0 0 10
Logic Diagrams and Expressions
Truth Table Logic Equation
XYZ
F X YZ
000
001
0
1
F X Y Z
010 0 Logic Diagram
011 0 X
100 1
101 1 Y F
110 1 Z
111 1
1
Input 0
tG tG tG = 0.3 ns
1
Output
0
0 0.5 1 1.5 Time (ns)
06/04/2021 12
Some Properties of Boolean Algebra
Boolean Algebra is defined in general by a set B that can have
more than two values
A two-valued Boolean algebra is also know as Switching
Algebra. The Boolean set B is restricted to 0 and 1.
Switching circuits can be represented by this algebra.
The dual of an algebraic expression is obtained by
interchanging + and · and interchanging 0’s and 1’s.
Sometimes, the dot symbol (AND operator) is not written
when the meaning is clear
06/04/2021 13
Dual of a Boolean Expression
Example: F = (A + C)· B + 0
dual F=(A · C + B) · 1 = A · C + B
Example: G = X · Y. + (W + Z)
dual G = (X+Y) · (W · Z) = (X+Y) ·
(W+Z)
Example: H = A · B + A · C + B · C
06/04/2021 14
Boolean Operator Precedence
The order of evaluation is:
1. Parentheses
2. NOT
3. AND
4. OR
Consequence: Parentheses appear around
OR expressions
Example: F = A(B + C)(C + D)
06/04/2021 15
Boolean Algebraic Proof – Example 1
A+A·B=A (Absorption Theorem)
Proof Steps Justification
A+A·
B Identity element: A · 1 = A
=A· 1 +A Distributive
·B 1+B=1
=A· ( 1 + Identity element
B)
=A· 1
=A
06/04/2021 16
Boolean Algebraic Proof – Example 2
AB + AC + BC = AB + AC (Consensus Theorem)
Proof Steps Justification
AB + AC + BC
= AB + AC + 1 · BC Identity element
= AB + AC + (A + A) · BC Complement
= AB + AC + ABC + ABC Distributive
= AB + ABC + AC + ACB Commutative
= AB · 1 + ABC + AC · 1 + Identity element
ACB Distributive
= AB (1+C) + AC (1 + B) 1+X = 1
= AB . 1 + AC . 1 Identity element
06/04/2021 17
= AB + AC
Useful Theorems
Minimization Minimization
XY+XY=Y (dual) (X+Y)(X+Y)
=Y
Absorption
X+XY=X Absorption
(dual) X · (X + Y)
=X
Simplification
X+XY=X Simplification
+Y (dual) X · (X + Y) =
X·Y
DeMorgan’s
06/04/2021 18
Truth Table to Verify DeMorgan’s
X+Y=X·Y X·Y=X+
Y
X Y X·Y X+Y X Y X+Y X · Y X·Y X+Y
0 0 0 0 1 1 1 1 1 1
0 1 0 1 1 0 0 0 1 1
1 0 0 1 0 1 0 0 1 1
1 1 1 1 0 0 0 0 0 0
X1 · X2 · … · Xn = X1 + X2 + … + Xn
06/04/2021 19
Standard Sum-of-Products (SOP)
A sum of minterms form for n variables can be
written down directly from a truth table.
• Implementation of this form is a two-level
network of gates such that:
• The first level consists of n-input AND
gates
• The second level is a single OR gate
This form often can be simplified so that the
corresponding circuit is simpler.
06/04/2021 20
Standard Sum-of-Products (SOP)
A Simplification Example:
F(A, B, C) (1,4,5,6,7)
Writing the minterm expression:
F = A B C + A B C + A B C + ABC + ABC
Simplifying:
F = A B C + A (B C + B C + B C + B C)
F = A B C + A (B (C + C) + B (C + C)) F
= A B C + A (B + B)
F =ABC+ A
F=BC+A
Simplified F
contains 3 literals
06/04/2021 21
AND/OR Two-Level Implementation
The two implementations for F are shown below
A
F
B
C
It is quite
apparent which
is simpler!
06/04/2021 22