Professional Documents
Culture Documents
ECE 238L - 1
Computer Logic Design
Authors:
Richard S. Sandige
Michael L. Sandige
Website:
http://www.mhhe.com/sandige
1
8/25/15
2
8/25/15
Boolean
Functions/Expressions
and Boolean Algebra
Boolean Functions/Expressions
Boolean functions are used to specify logic or digital
circuits (yes-no, true-false, 0-1, salt-pepper, High-
Low, …). Specify a “state”.
Different ways to express Boolean Functions.
1. Boolean Algebra is a mathematical form used to represent
Boolean functions.
2. Gates are a graphical form to represent Boolean functions.
3. VHDL (Very High Speed Integrated Circuit Hardware Description
Language) is a textual form to represent Boolean functions.
3
8/25/15
Boolean Algebra
Basic mathematics needed for the study of the logic design of
Digital Systems. Has many other applications including Set
Theory and Mathematical Logic. Two-valued Boolean Algebra is
also referred to as Switching Algebra, all variables assume only
two values.
Also known as Binary Logic: deals with variables that take on two
discrete values, and with operations that assume logical
meaning.
Boolean Algebra
The symbols “0” and “1” in Boolean Algebra do not have a
numeric value; instead they represent two different states in a
logical circuit and are the two values of a switching variable.
4
8/25/15
Boolean Algebra
Boolean Algebra
5
8/25/15
Boolean Algebra
Algebra is defined on a set of elements, a
set of operators, and a number of
postulates (laws) (unproven axioms).
Basic Operations
The basic operations of Boolean Algebra are AND, OR,
and complement (also known as the Inverse or NOT
operations)
EX: X’ = 1 if X = 0 and X’ = 0 if X = 1
−
Note : X = X'
6
8/25/15
Basic Operations
The basic operations of Boolean Algebra are AND, OR, and
complement (also known as the Inverse or NOT operations)
EX: AND operation XY=Z, XY=Z Z=1 iff X=1 and Y=1
When two or more variables are ANDed together, the value of the
result will be 1 iff all the variables have the value 1. If any of the
variables have the value 0, the result of the AND operation will
be 0.
EX: OR operation X+Y=Z, XvY=Z Z=0 iff X=0 and Y=0
When two or more variables are ORed together, the value of the
result will be 1 iff any of the variables have the value 1. The
result of the OR operation will be a 0 iff all of the variables have
the value 0.
INVERTER (NOT)
The electronic circuit which forms the
inverse of X is referred to as an inverter
X' = 1 if X = 0
X' = 0 if X = 1
7
8/25/15
AND (INTERSECTION)
Truth Table
AND Gate
Note that C = 1 if
and only if A and B
are both 1.
Input Output
OR (UNION)
Truth Table
OR Gate
Note that C = 1 if and
only if A or B (or both)
are 1.
Input Output
8
8/25/15
Switching Algebra
Switches
If switch X is open, then we will define the value
of X to be 0; if switch X is closed, then we will
define the value of X to be 1.
Seventh way of
playing with Boolean
Functions!!!!
Switching Algebra
T = AB
9
8/25/15
Switching Algebra
T = A+B
10
8/25/15
11
8/25/15
Independent Dependent
variable variable
Independent
variables
Dependent
variable
Two Boolean functions that meet the criteria for
the black box are F=XY and F=X+Y
12
8/25/15
13
8/25/15
14
8/25/15
Boolean Algebra
Postulates and
Theorems
Boolean Algebra
15
8/25/15
Boolean Algebra
Algebra is defined on a set of elements, a
set of operators, and a number of
postulates (laws) (unproven axioms).
16
8/25/15
Adjacency
Theorem
17
8/25/15
18
8/25/15
Boolean Algebra or
Switching Algebra
If two switches are both labeled with the variable A, this means that both
switches are open when A = 0 and both are closed when A = 1, thus the
following circuits are equivalent:
19
8/25/15
Switching Algebra
Switching Algebra
20
8/25/15
Switching Algebra
Switching Algebra
21
8/25/15
Switching Algebra
Boolean Functions,
Truth Tables,
and Logic Circuits
22
8/25/15
X≠Y
Boolean Expressions/Functions
and Truth Tables
Boolean expressions are formed by application of the basic
operations to one or more variables or constants.
Parentheses are added as needed to specify the order in
which the operations are performed.
23
8/25/15
Expressions/Boolean Functions
Each appearance of a variable or its complement in
an expression will be referred to as a literal.
24
8/25/15
Boolean Functions
• Algebraic expression (many for same function)
• Problem: possible to have two or more
expressions that specify the same function
• Solution: simplification of expressions
• Algebraic manipulations
• Truth Table (only one for a function)
• With n number of variables then we have n
columns and 2n number of rows
• Can be transformed
• Boolean functions çè Logic gates
Powers of 2n
Base
Power
Result
Denomina2on
2
1
2
2
4
3
8
4
16
5
32
6
64
7
128
8
256
9
512
10
1024
KILO
11
2048
12
4096
13
8192
14
16384
15
32768
16
65536
17
131072
18
262144
19
524288
20
1048576
MEGA
30
1073741824
GIGA
1073741824
1.09951E+12
40
1.09951E+12
TERA
25
8/25/15
F = AB’ + C: 3 variables,
3 literals
26
8/25/15
2 2 = 2 2 = 16€
n 2
27
8/25/15
Truth Table
We can use a Truth Table to specify the output values of a
circuit of logic gates in terms of the values of the input
variables. Input/Output relationship.
Two expressions are equal if they have the same value for
every possible combination of the variables.
28
8/25/15
Truth Table: X Y Z F
n=3; number of columns 0 0 0 0
2n=23=8; number of rows 0 0 1 0
Same as X’YZ’ 0 1 0 1
0 1 1 0
(minterm if F = 1 1 0 0 0
1 0 1 0
maxterm if F = 0) 1 1 0 0
1 1 1 0
Input Output
ECE 238L – ECE Dept, Fall 2015
57
Input Output
29
8/25/15
30
8/25/15
31
8/25/15
0 m0 – A’ M0 – A
1 m1 – A M1 – A'
0 0 m0 - A'B' M0 - A+B
0 1 m1 - A'B M1 - A+B'
1 0 m2 - AB' M2 - A'+B
1 1 m3 - AB M3 - A'+B'
32
8/25/15
0 0 1 m0 - A'B' M0 - A+B
XNOR
0 1 0 m1 - A'B M1 - A+B'
1 0 0 m2 - AB' M2 - A'+B
1 1 1 m3 - AB M3 - A'+B'
33
8/25/15
0 0 1 m0 - A'B' M0 - A+B
XNOR
0 1 0 m1 - A'B M1 - A+B'
1 0 0 m2 - AB' M2 - A'+B
1 1 1 m3 - AB M3 - A'+B'
0 0 1 m0 - A'B' M0 - A+B
XNOR
0 1 0 m1 - A'B M1 - A+B'
1 0 0 m2 - AB' M2 - A'+B
1 1 1 m3 - AB M3 - A'+B'
34
8/25/15
0 0 0 m0 - A'B'C' M0 - A+B+C
0 0 1 m1 - A'B'C M1 - A+B+C'
0 1 0 m2 - A'BC' M2 - A+B'+C
0 1 1 m3 - A'BC M3 - A+B'+C'
1 0 0 m4 - AB'C' M4 - A'+B+C
1 0 1 m5 - AB'C M5 - A'+B+C'
1 1 0 m6 - ABC' M6 - A'+B'+C
1 1 1 m7 - ABC M7 - A'+B'+C'
35
8/25/15
36
8/25/15
Boolean Functions:
Minterms and
Maxterms
Boolean Functions
A Boolean Function may be expressed algebraically
from a Truth Table by:
• 1) Sum of Minterms:
• forming a minterm for each combination of the variables that
produce a “1” in the function, and taking the OR of all minterms
• 2) Product of Maxterms:
• forming a maxterm for each combination of all the maxterms
variables which produce a “0” in the function, and takes the AND of
all maxterms
37
8/25/15
38
8/25/15
f (A, B, C) = Ʃ m(3, 4, 5, 6, 7)
39
8/25/15
40
8/25/15
Conversion of Forms
Summarizes the procedures for conversion between
minterm and maxterm expansions of F and F'
41
8/25/15
Example
42
8/25/15
VHDL Basics
43
8/25/15
Library
• library IEEE;
• use IEEE.STD_LOGIC_1164.ALL;
• use IEEE.STD_LOGIC_ARITH.ALL;
Entity
• Assume the design as a black box
• Definition of the type of data for the inputs
and outputs
• Definition of Entity
Architecture
• Declaration of Signals, Variables and
Components
• Functionality of the Black box
44
8/25/15
45
8/25/15
46
8/25/15
47
8/25/15
48
8/25/15
49
8/25/15
50
8/25/15
51
8/25/15
52
8/25/15
53
8/25/15
54
8/25/15
55
8/25/15
56
8/25/15
X=Y
57
8/25/15
58
8/25/15
59
8/25/15
60
8/25/15
61
8/25/15
2 2 = 2 2 = 16€
n 2
62
8/25/15
Rule: Change AND to OR; change OR to AND; add bubbles to all inputs
and outputs, use double negation theorem
63
8/25/15
64
8/25/15
Logic Symbols
65
8/25/15
Sample Problems
66
8/25/15
Problem 1.18
Problem 1.50
67
8/25/15
Problem 1.54
Problem 1.73
68
8/25/15
Problem 1.74
Problem 1.75
69
8/25/15
Problem 1.84
Problem 1.85
70
8/25/15
Problem 1.86
Problem 1.87
71
8/25/15
Q&A
72