Digital Logic Circuits - Lecture3
Digital Logic Circuits - Lecture3
Digital Logic
i Ci
Circuits
it
Canonical
C i l representations:
t ti minterm
i t and
d maxterm
t
Standard Forms
Quin-Maclusky minimization
2
Postulates and Theorems of Boolean Algebra
Duality principle states that every algebraic expression deducible from the
postulates of Boolean algebra remains valid if the operators and identity elements
are interchanged. If the dual of an algebraic expression is desired, we simply
i t h
interchange OR andd AND operators
t and d replace
l 1’ by
1’s b 0’s
0’ andd 0’s
0’ by
b 1’s.
1’
3
Associative and Distributive Property
Associative
A i i property off addition
ddi i isi given
i by
b
A+(B+C) = (A+B)+C
4
Cont.
Basic laws (theorems) of Boolean algebra can be proved easily by adopting
the truth table method or by using algebraic manipulation.
iii) A+ A
A’B
B = (A+A
(A+A’)(A+B)
)(A+B) (Boolean addition is distributive)
= 1. (A+B) = A+B
iv) A.
A (A
(A’+B)
+B) = A.
A AA’+
+ A.B
A B = AB
5
Consensus Theorem
• AB+A'C+BC = AB + A'C
• (A+B)(A'+C)(B+C) =(A+B)(A’+C)
Proof:
i) AB+A'C+BC = AB+A'C+BC.1
= AB + A'C + BC(A+A‘)
= AB + A'C + ABC + A‘BC
= AB (1+C) + A’C ( 1+B)
= AB + A'C
6
DeMorgan’s Theorem
Two theorems that are an important part of Boolean algebra were proposed
by DeMorgan.
The first theorem states that the complement of a product is equal to the
sum of the complements.
(ABC N)’ = A’ + B’ + C’ + … + N’
(ABC…N)’
The second theorem states that , the complement of a sum is equal to the
product of the complements.
7
Shannon’s Expansion
• For example
f(x) = xf(1)
xf(1)+x’f(0)
x f(0)
f(x, y) = xf(1,y)+x’f(0,y)
8
Cont.
9
Cont.
• Shannon’s expansion and consensus theorem are used for logic optimization
10
Needs of most simplified expression
The simplest
Th i l t form
f off an expression
i isi the
th one that
th t has
h the
th minimum
i i number
b
of terms with the least number of literals (variables) in each term. Literal is a
single variable within a term that may be complemented or uncomplemented
form.
By simplifying an expression to the one that uses the minimum number of
terms, we ensure that the function will be implemented with the minimum
number of gates.
By simplifying an expression to the one that uses the least number of literals
f each
for h terms, we ensure that
h the
h function
f i willill be
b implemented
i l d with
i h gates that
h
have the minimum number of inputs.
Simplification
Si lifi ti off logic
l i expression
i using
i B l
Boolean algebra
l b is i nott suitable
it bl
because:
it lacks specific rules to predict the most suitable next step in the simplification process
it is difficult to determine whether the simplest
p form has been achieved.
11
Two-Valued Boolean Algebra
• Two-Valued Boolean Algebra- Boolean algebra with only two elements {0, 1}
• Th operator
The t tables
t bl for
f the
th Boolean
B l operators
t + andd * are shown
h below
b l
12
Operator Precedence
13
Logic Function Implementation
• Using Switches
– For inputs:
Switches in parallel => OR
• logic 1 is switch closed
• logic 0 is switch open
– For outputs:
• logic 1 is light on
• logic 0 is light off.
– NOT uses a switch such
that: Switches in series => AND
• logic 1 is switch open
• logic 0 is switch closed
Normally-closed switch => NOT
C
14
Logic Function Implementation (Continued)
• Example: Logic Using Switches
B C
A
Light is on (L = 1) for
L(A, B, C, D) = A ((B C') + D) = A B C' + A D
15
Logic Gates
• Later, vacuum tubes that open and close current paths electronically
replaced relays.
• Today, transistors are used as electronic switches that open and close
current paths.
16
Truth Tables for the 16 Functions of Two Binary Variables
17
Boolean Expressions for the 16 Functions of Two
Variables
18
Digital Logic Gates
19
Cont.
20
Definition of Different Logic Gates
OR Gate: An OR gate has two or more inputs but only one output and the
output of an OR gate attains the state 1 if one or more of the inputs are in the
state 1.
AND Gate: An AND gate has two or more inputs but only one output and the
output of an AND gate attains the state 1 if and only if all the inputs are in the
state 1.
NOT Gate: A NOT gate has one input and one output. The output of a NOT
gate assume the state 1 if and only if, the input does not assume the state 1.
XNOR Gate: The EXCLUSIVE-NOR gate is also called the XNOR gate or
equivalence gate.
gate The output of two inputs XNOR gate will be in logic level 1
when both inputs are in same logic level.
Y=A B
22
Logic Gates with more than two inputs
3-Input OR Gate
23
Boolean Functions
Boolean algebra is an algebra that deals with binary variables and logic
operations. A Boolean function described by an algebraic expression
consists of binary variables, the constants 0 and 1, and the logic operation
symbols. For a given value of the binary variables, the function can be
equal to either 1 or 0.
24
Truth table
Truth table: a tabular listing of the values of a function for all possible
combinations of values on its arguments.
If two functions have identical truth tables, the functions are equivalent
(and vice-versa).
However, the size of a truth table grows exponentially with the number of
variables involved, hence unwieldy. This motivates the use of Boolean
Algebra.
25
Cont.
x y z y’z x+y’z
0 0 0 0 0 Boolean function
0 0 1 1 1
F1 = x + y´z
0 1 0 0 0
0 1 1 0 0
1 0 0 0 1
1 0 1 1 1
1 1 0 0 1
1 1 1 0 1
26
Gate Level Implementation
In logical circuit diagrams, the variables of the function are taken as the inputs
of the circuit and the binary variable F1 is taken as the output of the circuit.
circuit
The schematic expresses the relationship between the output of the circuit and its
inputs.
p
We can construct any combinational circuit with AND, OR, and NOT gates
27
Gate Level Implementation of a Logic Expression
Logic Function A X
B
X = A + BC B
C BC
28
Minterms and Maxterms
The product term which contains each of the n variables as factor in either
complemented or uncomplemented form is called a minterm, with each
variable being primed if the corresponding bit of the binary number is 0 and
unprimed if a 1.
29
Minterms and Maxterms for Three Binary Variables
30
Function of Three Variables
31
Complement of a Boolean Function
Complement of a Boolean function can be obtained from the truth table
by forming a minterms for each combination that produces a 0 in the
function and then ORing those terms.
terms The complement of f1 is
( f1’)’ = ( )’
33
Cont.
An alternative procedure for deriving the minterms of a Boolean function is
to obtain the truth table of the function directly from the algebraic
expression and then read the minterms from the truth table.
From the truth table, we can then read the five minterms of the function
to be 1, 4, 5, 6, and 7.
34
Boolean function in its product of maxterms form
35
Cont.
2. Check for variables that are missing in each OR terms which is not a
maxterm. Add aa‘ to the OR term for each variable ‘a‘ that is missing.
36
Conversion between Canonical Forms
The last conversion follows from the definition of minterms and maxterms, i.e
37
Cont.
In general, to convert from one canonical
38
Standard Forms
The two canonical forms of Boolean algebra are basic forms that one
obtains from reading a given function from the truth table. These forms are
very seldom the ones with the least number of literals, because each
minterm or maxterm must contain, by definition, all the variables, either
complemented or uncomplemented.
39
Cont.
The logic diagram of a sum‐of‐products expression consists of a group of
AND gates followed by a single OR gate. Each product term requires an
AND gate, except for a term with a single literal.
The logic sum is formed with an OR gate whose inputs are the outputs of
the AND gates and the single literal. It is assumed that the input variables
are directly available in their complements, so inverters are not included in
the diagram. This circuit configuration is referred to as a two‐level
implementation.
This expression has three sum terms, with one, two, and three literals. The
product is an AND operation. The gate structure of the product‐of‐sums
expression
p consists of a g
groupp of OR g
gates for the sum terms ((except
p for a
single literal), followed by an AND gate
41
Cont.
A Boolean function may be expressed in a nonstandard form. For example,
the function F3 is neither in sum‐of‐products nor in product‐of‐sums form.
The implementation of this expression requires two AND gates and two OR
gates. There
Th are three
h l l off gating
levels i ini this
hi circuit.
i i It I can be
b changed
h d to a
standard form by using the distributive law.
42
Universal Gates
• NAND or NOR gates are known as a “universal” gate because ANY digital circuit can
be implemented with NAND or NOR gates alone.
43
Design of XOR and XNOR Gate using NAND Gates
44
Cont.
X Z = X
X+Y
X
Z= X+Y=X+Y
Y
NOR Gate “Inverter”
X Y
Z=X+Y=XY=XY
Y
“Inverters” NOR Gate
45
Design of XOR and XNOR Gate using NOR Gates
AB+
=A B
46