Week 3 Handouts
Week 3 Handouts
Digital Circuits
Chapter 2 - Part 1 1
1
Binary Variables
Recall that the two binary values have
different names:
• True/False
• On/Off
• Yes/No
• 1/0
We use 1 and 0 to denote the two values.
Variable identifier examples:
• A, B, y, z, or X1 for now
• RESET, START_IT, or ADD1 later
Chapter 2 - Part 1 3
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.
Chapter 2 - Part 1 4
2
Notation Examples
Examples:
• Y = A . B is read “Y is equal to A AND B.”
• z = x + y is read “z is equal to x OR y.”
• X = A is read “X is equal to NOT A.”
Note: The statement:
1 + 1 = 2 (read “one plus one equals two”)
is not the same as
1 + 1 = 1 (read “1 or 1 equals 1”).
Chapter 2 - Part 1 5
Operator Definitions
Operations are defined on the values "0" and
"1" for each operator:
AND OR NOT
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
Chapter 2 - Part 1 6
3
Truth Tables
Truth table - a tabular listing of the values of a
function for all 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 Z=X
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
Chapter 2 - Part 1 7
Boolean Algebra
Defined over the set B={0,1}
Two input operations : AND, OR (, +)
One input operation: NOT ( )
Axioms
Let a, b, c B
4
Boolean Operator Precedence
The order of evaluation in a Boolean
expression is:
1. Parentheses
2. NOT
3. AND
4. OR
Consequence: Parentheses appear
around OR expressions
Example: F = A(B + C)(C + D)
Chapter 2 - Part 1 9
5
Example 1: Boolean Algebraic Proof
A + A·B = A (Absorption Theorem)
Proof Steps Axiom or Theorem
A + A·B
= A·1+A·B X=X·1
= A · ( 1 + B) X · Y + X · Z = X ·(Y + Z)(Distributive Law)
=A·1 1+X=1
=A X·1=X
Chapter 2 - Part 1 11
Chapter 2 - Part 1 12
6
Example 3: Boolean Algebraic Proofs
( X + Y )Z + X Y = Y ( X + Z )
Proof Steps Axiom or Theorem
(X + Y )Z + X Y
= XYZ+XY (X+Y)=XY
= (XZ+X)Y (X+Y)Z=XZ+YZ
= (X+X) (Z+X)Y XY+Z=(X+Z)(Y+Z)
= (Z+X)Y X+X =1
Chapter 2 - Part 1 13
7
Expression Simplification
Simplify to contain the smallest number of
literals:
A B + A CD + A BD + A C D + A BCD
= AB + ABCD + A C D + A C D + A B D
= AB + AB(CD) + A C (D + D) + A B D
= AB + A C + A B D
= B(A + AD) +AC
= B(A + A)(A + D) +AC
= B (A + D) + AC
5 literals Chapter 2 - Part 1 15
Complementing Functions
Use DeMorgan's Theorem to complement
a function:
1. Interchange AND and OR operators
2. Complement each constant value and
literal
Example: Complement F = xy z + x y z
F = (x + y + z)(x + y + z)
Example: Complement G = (a + bc)d + e
G=
Chapter 2 - Part 1 16
8
Overview – Canonical
Forms
What are Canonical Forms?
Minterms and Maxterms
Index Representation of Minterms and
Maxterms
Sum-of-Products (SOP) Representations
Product-of-Sums (POS) Representations
Representation of Complements of
Functions
Conversions between Representations
Chapter 2 - Part 1 17
Canonical Forms
It is useful to specify Boolean functions
in a form that:
• Allows comparison for equality.
• Has a correspondence to the truth tables
Canonical Forms in common usage:
• Sum of Products (SOP)
• Product of Sums (POS)
Chapter 2 - Part 1 18
9
Minterms
XY
XY
XY
XY
Chapter 2 - Part 1 19
Maxterms
X +Y
X +Y
X +Y
X +Y
Chapter 2 - Part 1 20
10
Maxterms and Minterms
Examples: Two variable minterms and
maxterms.
Index Minterm Maxterm
0 xy x+y
1 xy x+y
2 xy x+y
3 xy x+y
The index above is important for describing
which variables in the terms are true and
which are complemented.
Chapter 2 - Part 1 21
Standard Order
Minterms and maxterms are designated with a subscript
The subscript is a number, corresponding to a binary
pattern
The bits in the pattern represent the complemented or
normal state of each variable listed in a standard order.
All variables will be present in a minterm or maxterm and
will be listed in the same order (usually alphabetically)
Example: For variables a, b, c:
• Maxterms: (a + b + c), (a + b + c)
• Terms: (b + a + c), a c b, and (c + b + a) are NOT in
standard order.
• Minterms: a b c, a b c, a b c
• Terms: (a + c), b c, and (a + b) do not contain all
variables
Chapter 2 - Part 1 22
11
Purpose of the Index
The index for the minterm or maxterm,
expressed as a binary number, is used to
determine whether the variable is shown in
the true form or complemented form.
For Minterms:
• “1” means the variable is “Not Complemented”
and
• “0” means the variable is “Complemented”.
For Maxterms:
• “0” means the variable is “Not Complemented”
and
• “1” means the variable is “Complemented”.
Chapter 2 - Part 1 23
Chapter 2 - Part 1
24
12
Index Examples – Four Variables
Index Binary Minterm Maxterm
i Pattern mi Mi
0 0000 a b c d a b c d
1 0001 a b c d ?
3 0011 ? a+ b +c+d
5 0101 a b c d a + b + c + d
7 0111 ? a+ b +c+d
10 1010 a b c d a + b + c + d
13 1101 a b c d ?
15 1111 a b c d a + b + c + d
Chapter 2 - Part 1 25
13
Minterm Function Example
Find the truth table of F1(x,y,z) = m1+m4 + m7
F1(x,y,z) = x y z + x y z + x y z
x y z index m1 + m4 + m7 = F1
000 0 0 + 0 + 0 =0
001 1 1 + 0 + 0 =1
010 2 0 + 0 + 0 =0
011 3 0 + 0 + 0 =0
100 4 0 + 1 + 0 =1
101 5 0 + 0 + 0 =0
110 6 0 + 0 + 0 =0
111 7 0 + 0 + 1 =1
Chapter 2 - Part 1 27
Chapter 2 - Part 1 28
14
Maxterm Function Example
Implement F1 in maxterms:
F1(x,y,z) = M0 · M2 · M3 · M5 · M6
F1(x,y,z) = (x + y + z) ·(x + y + z)·(x + y + z)
·(x + y + z)·(x + y + z)
xyz i M0 M2 M3 M5 M6 = F1
000 0 0 1 1 1 1 =0
001 1 1 1 1 1 1 =1
010 2 1 0 1 1 1 =0
011 3 1 1 0 1 1 =0
100 4 1 1 1 1 1 =1
101 5 1 1 1 0 1 =0
110 6 1 1 1 1 0 =0
111 7 1 1 1 1 1 =1
Chapter 2 - Part 1 29
Chapter 2 - Part 1 30
15
Canonical Sum of Products
Any Boolean function can be expressed as a
Sum of Minterms.
• For the function table, the minterms used are the
terms corresponding to the 1's
• For expressions, expand all terms first to explicitly
list all minterms. Do this by “ANDing” any term
missing a variable v with a term ( v + v ).
Example: Implement f(x,y)= x + x y as a
sum of minterms.
First expand terms: f(x,y) = x ( y + y ) + x y
Then distribute terms: f(x,y) = xy + x y + x y
Express as sum of minterms: f(x,y) = m3 + m2 + m0
Chapter 2 - Part 1 31
16
Shorthand SOP Form
From the previous example, we started with:
F(A,B,C) = A + B C
We ended up with:
F(A,B,C) = m1+m4+m5+m6+m7
This can be denoted in the formal shorthand:
F( A , B, C) m(1,4,5,6,7 )
Note that we explicitly show the standard
variables in order and drop the “m”
designators.
Chapter 2 - Part 1 33
17
Another POS Example
Find Product of Sums representation of f :
f(A,B,C)=AC+BC+AB
f=(AC+BC+A) (AC+BC+B)
f=((AC+B)(AC+ C)+A)((AC+B)(AC+ C)+B)
f=((A+B)(C+B)(A+C)(C+ C)+A)((A+B)(C+B)(A+C)(C+ C)+B)
f=((A+B)(C+B)(A+C)+A) ((A+B)(C+B)(A+C)+B)
f=(A+B+A)(C+B+A)(A+C+A)(A+B+B)(C+B+B)(A+C+B)
f=(A+B +C)(A+B+C)
f = M5 · M2
Chapter 2 - Part 1 35
Function Complements
The complement of a function expressed as a
SOP is constructed by selecting the minterms
missing in the SOP canonical forms.
Alternatively, the complement of a function
expressed by a SOP form is simply the POS with
the same indices.
Example: Given
F ( x , y , z ) = Σm (1, 3,5,7 )
F( x, y, z) = Σm(0,2,4,6)
F( x, y, z) = Π M(1,3,5,7)
Chapter 2 - Part 1 36
18
Implementation of Boolean Functions
Chapter 2 - Part 1 37
Light is on (L = 1) for
L(A, B, C, D) = A(BC’ + D) = ABC+AD
and off (L = 0), otherwise.
Chapter 2 - Part 1 38
19
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.
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.
Chapter 2 - Part 1 39
Chapter 2 - Part 1 40
20
Gate Delay
In actual physical gates, if one or more input
changes that causes the output to change, the
output change does not occur
instantaneously.
The delay between an input change(s) and the
resulting output change is the gate delay
denoted by tG:
1
Input
0
tG tG tG = 0.3 ns
1
Output
0
0 0.5 1 1.5 Time (ns)
Chapter 2 - Part 1 41
21
AND/OR Two-level Implementation
of SOP Expression
The two implementations for F are shown below – it is
quite apparent which is simpler!
A
F
B
C
Chapter 2 - Part 1 43
Chapter 2 - Part 1 44
22