EEM16 Lecture 2 UCLA
-
Upload
dustin-rudiger -
Category
Documents
-
view
218 -
download
0
Transcript of EEM16 Lecture 2 UCLA
-
8/14/2019 EEM16 Lecture 2 UCLA
1/35
EEM16/CSM51A:Logic Design of Digital Systems
Lecture #2Boolean Algebra and Combinational
System Design
Prof. Danijela Cabric
Fall 2013
-
8/14/2019 EEM16 Lecture 2 UCLA
2/35
(c) 2005-2012 W. J. Dally
Agenda
ReviewThe world is digital
Analog at the edges, hardware for demanding problems, 100x per decadeDigital signals
Encode discrete states in a continuous signal Reject noise
Representations Binary, set, continuous, compound
Boolean Algebra (0,1, , ) discussion section Axioms, properties, duality
Logic equations express binary functionsCombinational logic
Output is a function only of current input
-
8/14/2019 EEM16 Lecture 2 UCLA
3/35
(c) 2005-2012 W. J. Dally
Agenda
How to implement combinational logic by hand
Given a description of a logic function
Generate a gate-level circuit that realizes that function
Everyone needs to do this once
To understand how its doneDemystifies what the synthesis tools do
Better understanding of what synthesis tools can and cant do
In practice you will rarely have to do this by hand
General practice is:
Design using VerilogSimulate with test cases
Generate gates with synthesis program
-
8/14/2019 EEM16 Lecture 2 UCLA
4/35
What is involved in creating a digital system?
4
Implementation
Specification
Synthesis(Design)
Analysis
-
8/14/2019 EEM16 Lecture 2 UCLA
5/35
High-level and Binary-level Specifications
High-level: system is described by a function on finite sets, z = F(x)Binary-level: all variables are binary, i.e. {0, 1} zb = F b(x b )
where zb and x b are vectors of binary variables and, F b( ) is a binary function
Mapping between the two via coding and decoding functionsCoding: maps each distinct value of x to a different combination of bits of x bDecoding: maps each distinct value of z to a different combination of bits of z b
5
-
8/14/2019 EEM16 Lecture 2 UCLA
6/35
Example: A mod3 system
6
-
8/14/2019 EEM16 Lecture 2 UCLA
7/35
Example (contd.)
7
-
8/14/2019 EEM16 Lecture 2 UCLA
8/35
High Level Specification
8
-
8/14/2019 EEM16 Lecture 2 UCLA
9/35
Specification at Binary Level
9
-
8/14/2019 EEM16 Lecture 2 UCLA
10/35
Switching Functions
10
-
8/14/2019 EEM16 Lecture 2 UCLA
11/35
(c) 2005-2012, W. J. Dally
Several ways to describe a combinational logic function
Example Majority Circuit1. English Language Description
Outputs 1 if more inputs are 1 than are 0
2. Logic equation q = (a b) (a c) (b c)
3. Truth table
abc q000 0001 0010 0011 1100 0101 1110 1111 1
-
8/14/2019 EEM16 Lecture 2 UCLA
12/35
(c) 2005-2012, W. J. Dally
Boolean Algebra
Boolean Algebra: algebra over 2 elements: {0,1} 3 operators: AND ( ), OR ( ), NOT ( )
AND Operation: a b = 1 iff a=1 and b=1
OR Operation: a b = 1 if a=1 or b=1
NOT Operation: a = 1 iff a=0
a b a&b a|b0 0 0 00 1 0 11 0 0 11 1 1 1
a ~a0 1
-
8/14/2019 EEM16 Lecture 2 UCLA
13/35
(c) 2005-2012, W. J. Dally
Note on Notation
For AND logic function:
use or & or .
For OR logic function: use or | or +
-
8/14/2019 EEM16 Lecture 2 UCLA
14/35
(c) 2005-2012, W. J. Dally
Axioms of Boolean Algebra
Axioms: a set of mathematical statements that we assert to be true.
Identity:
0 x = 0
1 x = 1Idempotence:
1 x = x
0 x = x
Negation: 0 = 1 1 = 0
-
8/14/2019 EEM16 Lecture 2 UCLA
15/35
Expression Evaluation
15
-
8/14/2019 EEM16 Lecture 2 UCLA
16/35
(c) 2005-2012, W. J. Dally
Useful Boolean Properties(all can be derived from the axioms)
Communica t ive x y = y x x y = y x
Associa t ive x (y z) = (x y) z x (y z) = (x y) z
Distr ibu t ivex (y z) = (x y) (x z) x (y z) = (x y) (x z)
Idempotence x x = x x x = x
A b s o r p t io n x (x y) = x x (x y) = x
Co m b in in g (x y) (x y) = x (x y) (x y) = x
DeMorgan
s (x y) = x y (x y) = x y
-
8/14/2019 EEM16 Lecture 2 UCLA
17/35
(c) 2005-2012, W. J. Dally
DeMorgan
s Law
(x y) = x y (x y) = x y
Proof by perfect induction
x y (x y) x y
0 0 1 1
0 1 1 1
1 0 1 1
1 1 0 0
-
8/14/2019 EEM16 Lecture 2 UCLA
18/35
-
8/14/2019 EEM16 Lecture 2 UCLA
19/35
Graphical Representations as Gate Symbols
19
-
8/14/2019 EEM16 Lecture 2 UCLA
20/35
(c) 2005-2012, W. J. Dally
DeMorgan Graphically
-
8/14/2019 EEM16 Lecture 2 UCLA
21/35
Graphical Representations as Gate Symbols(contd.)
21
-
8/14/2019 EEM16 Lecture 2 UCLA
22/35
(c) 2005-2012, W. J. Dally
Applying Boolean Properties
f(a,b,c) = (a c) (a b c) ( a b c) (a b c)
f(a,b,c) = (a c) (a b c) ( a b c) (a b c)
(a b c) (a b c)
f(a,b,c) = (a c) ( a b c) (a b c) (a b c) (a b c)
f(a,b,c) = (a c) (b c) (a b)
Apply Absorption Property
Apply Combining Property
-
8/14/2019 EEM16 Lecture 2 UCLA
23/35
-
8/14/2019 EEM16 Lecture 2 UCLA
24/35
-
8/14/2019 EEM16 Lecture 2 UCLA
25/35
Tabular Representation of Switching Functions:Truth Tables
25
-
8/14/2019 EEM16 Lecture 2 UCLA
26/35
Incomplete Switching Functions
26
-
8/14/2019 EEM16 Lecture 2 UCLA
27/35
-
8/14/2019 EEM16 Lecture 2 UCLA
28/35
-
8/14/2019 EEM16 Lecture 2 UCLA
29/35
Minterm
29
For a Boolean function of n variables x1, , xn,a product term in which each of the nvariables appears once (either complemented,or uncomplemented) is called a minterm
There are 2n minterms of n variables
Example:
-
8/14/2019 EEM16 Lecture 2 UCLA
30/35
30
Indexing Minterms
Minterm m j indexed by integer j= i=0,,n-1 x i 2 i
30
-
8/14/2019 EEM16 Lecture 2 UCLA
31/35
31
Minterm Functions
31
-
8/14/2019 EEM16 Lecture 2 UCLA
32/35
32
Example: E(x2, x1, x0) = m1+m2+m6 = m(1,2,6)
-
8/14/2019 EEM16 Lecture 2 UCLA
33/35
(c) 2005-2012 W. J. Dally
Truth Table
F(d,c,b,a) is true if input d,c,b,a is prime
No dcba q0 0000 01 0001 12 0010 13 0011 14 0100 0
5 0101 16 0110 07 0111 18 1000 09 1001 0
10 1010 0
11 1011 112 1100 013 1101 114 1110 015 1111 0
-
8/14/2019 EEM16 Lecture 2 UCLA
34/35
(c) 2005-2012 W. J. Dally
F(d,c,b,a) is true if input d,c,b,a is prime
No dcba q
0 0000 01 0001 12 0010 13 0011 14 0100 05 0101 1
6 0110 07 0111 18 1000 09 1001 0
10 1010 011 1011 1
12 1100 013 1101 114 1110 015 1111 0
dcba
mf )13,11,7,5,3,2,1(
Equation
Example: Table Sum of Products
-
8/14/2019 EEM16 Lecture 2 UCLA
35/35
Example: Table Sum of Products(Minterms)
35