Академический Документы
Профессиональный Документы
Культура Документы
S
E • Last Session …..
S – Fundamental of Digital Electronics
S
I
O
N • This Session ……..
2
– Binary Storage
– Boolean Algebra
– Karnaugh maps
DIGITAL ELECTRONICS & MICROPROCESSORS
S
E
S
S
• Last Lecture – Doubts
I – Bubble Memory
O
N
2
DIGITAL ELECTRONICS & MICROPROCESSORS
S
E Magnetic bubble memory is a type of computer memory that
S uses a thin film of a magnetic material to hold small
S magnetized areas, known as bubbles, which each store a bit.
I
O
N Certain materials (ie. gadolinium gallium garnet) are magnetizable
easily in only one direction. A film of these materials can be
2 created so that it's magnetizable in an up-down direction. The
magnetic fields tend to stick together, so you get a pattern that is
kind of like air bubbles in water squished between glass, half with
the north pole facing up, half with the south, floating inside the
film. When a vertical magnetic field is imposed on this, the areas
in opposite alignment to this field shrink to circles, or 'bubbles'.
DIGITAL ELECTRONICS & MICROPROCESSORS
S
E
S
S
• Last Lecture – Assignment 1.1
I – Gray Code
O
N
2
DIGITAL ELECTRONICS & MICROPROCESSORS
S
E
S
S
I
O
N
2
DIGITAL ELECTRONICS & MICROPROCESSORS
S
Transfer of information
E
S
S
I
O
N
2
DIGITAL ELECTRONICS & MICROPROCESSORS
S
E Computer Implementation
S
S • Gates or logical gates
I – Integrated circuits constructed from transistor
O switches and other electronic components
N
– VLSI: very large-scale integration
2
DIGITAL ELECTRONICS & MICROPROCESSORS
S
E Boolean Operators
S
S • AND A B C
I
– Result TRUE if and only if both input 0 0 0
O
N operands are true 0 1 0
– C=AB 1 0 0
2 1 1 1
• INCLUSIVE-OR
– Result TRUE if any input operands are A B C
true 0 0 0
– C=A+B 0 1 1
1 0 1
1 1 1
DIGITAL ELECTRONICS & MICROPROCESSORS
S
E Boolean Operators
S
S • NOT
I
– Result TRUE if single input value is FALSE
O
N – C=A
2
A C
0 1
1 0
DIGITAL ELECTRONICS & MICROPROCESSORS
S
E Boolean Algebra Implementation
S
S • Single type of gate appropriately combined
I • 2 possibilities
O – NAND gate: AND operation followed by a NOT operation
N – NOR gate: INCLUSIVE-OR followed by a NOT operation
S
E Boolean algebra
S
S
I George Boole (1815-1864)
O
N Boolean values
2 Boolean operations
Boolean functions
DIGITAL ELECTRONICS & MICROPROCESSORS
S
E What is an algebra?
S
S
• Term from Hisab al-jabr w'al-
I
O muqabala by al-Khwarizmi (~780-
N 850, Baghdad)
• Consists of
2 – a set of values
(e.g., the integers)
– a set of functions
• multiplication
• addition
DIGITAL ELECTRONICS & MICROPROCESSORS
S
Boolean Algebra
E
S
Mathematics of logical expression is the tool to reduce the
S
complicated expressions.
I
O Introduced by George Boole in 1854 and known today as Boolean
N Algebra.
The rules of Boolean Algebra is simple and straightforward, can
2 be applied to any logical expression.
Digital circuits need to be as simple as possible.
Complex logical expressions should be reduced to simpler
expressions, however, produce same results under all conditions.
Simpler expressions can be implemented with simpler circuits,
which are cost effective.
DIGITAL ELECTRONICS & MICROPROCESSORS
S POSTULATES
E
The most common postulates used to formulate various algebraic structures are:
S
S Closure : A Set S is closed with respect to a binary operator if , for every pair of
I elements of S ,the binary operator specifies a rule for obtaining a unique element of S.
O Associative Law : A binary operator “*" on a set S is said to be associative whenever
N (A * B) * C = A * (B * C) for all A,B,C belongs to S
Identity Element: A set S is said to have an identity element with respect to a binary
operation * on S if there exists an element eε S with the property
e*x = x*e = x for every xε S
S
E POSTULATES & OPERATOR ?
S
S
Binary Operator + defines addition
I Additive identity - ZERO (0)
O
N The additive inverse defines subtraction.
2
Binary Operator • defines multiplication
Multiplicative identity - ONE (1)
The multiplicative inverse of a = 1/a defines division
The only distributive law applicable is that of • over + :
a.(b+c) = (a.b)+(a.c)
DIGITAL ELECTRONICS & MICROPROCESSORS
S
POSTULATES – Boolean Algebra
E
S Boolean Algebra is an algebraic structure defined on a set of
S
elements is together with two binary operations, the product (or
I
O
meet) and the sum (or join) provided the following Huntington
N postulates are satisfied
2
3. a. Closure with respect to the operator +
b. Closure with respect to the operator x
S
E POSTULATES – Boolean Algebra
S
S
I 1. a. . is distributive over + : x(y + z) = xy + xz
O b. + is distributive over . : x + (yz) = (x + y)(x + z)
N
• For every element x € B, there exists an element x' € B
2 (complement of x) such that:
a. x + x' = 1
b. x . x' = 0
6. There exists at least two elements x, y B such that x = y.
DIGITAL ELECTRONICS & MICROPROCESSORS
S
E
S Brain Storming ……
S
I
O
N ♣Difference Arthemetic expression & Boolean expression ?
These rules are exactly the same as the AND, OR, &
NOT operations, respectively.
DIGITAL ELECTRONICS & MICROPROCESSORS
S
E Boolean Theorems
S
S
I • A+A = A • (AB)+(AB') = A
O
N • AA = A • (A+B)(A+B') = A
• A+A' = 1 • (AB)+(AB'C) = (AB)+(AC)
2 • AA’ = 0 • (A+B)(A+B'+C) = (A+B)(A+C)
• A+1 = 1 • (AB)+(A'C)+(BC) = (AB)+(A'C)
• A·0=0 • (A+B)(A'+C)(B+C) = (A+B)(A'+C).
• A+(AB) = A • A+(A'B) = A+B
• A(A+B) = A • A(A'+B) = AB
DIGITAL ELECTRONICS & MICROPROCESSORS
S Name OR AND
Associativity (Theorem 4) (x + y) + z = x + (y + z) (x y) z = x (y z)
Absorption (Theorem 6) x + xy = x x (x + y) = x
S
E
S
S
I
O
N
2
DIGITAL ELECTRONICS & MICROPROCESSORS
X X
Y X×Y X+Y
Y
S
E DUALITY
S
An important principle in the boolean algebra system is that of duality.
S
I Any valid expression you can create using the postulates and theorems
O of boolean algebra remains valid if you interchange the operators and
N constants appearing in the expression.
Specifically, if you exchange the and + operators and swap the 0 and 1
2 values in an expression, you will wind up with an expression that obeys
all the rules of boolean algebra.
This does not mean the dual expression computes the same values, it
only means that both expressions are legal in the boolean algebra
system.
DIGITAL ELECTRONICS & MICROPROCESSORS
S
E
S ASSIGNMENT 2.1 ?????????
S
I
O
N Now show that the Huntington postulates
2 are valid for the set B = { 0, 1 } and the
two binary operators defined above.
With Proof …..
DIGITAL ELECTRONICS & MICROPROCESSORS
S
E
S Session Continues With ……….
S
I
O
N Basic Definition
S
E
S Term A term is a collection of variables, e.g. ABCD.
S
I Constant A constant is a value or quantity which has a fixed
O meaning. In conventional algebra the constants include all
N integers and fractions. In Boolean algebra there are only two
possible constants, one and zero. These two constants are used
2 to describe true and false, up and down, go and not go etc.
Variable A variable is a quantity which changes by
taking on the value of any constant in the algebraic
system. At any one time the variable has a particular
value of constant. There are only two values of constants
in the system- therefore a variable can only be zero or
one. Variables are denoted by letters.
DIGITAL ELECTRONICS & MICROPROCESSORS
S
Literal A literal is a variable or its complement
E
S Minterm Also known as the standard product or canonic product
S term. This is a term where each variable is used once and once
I only.
O
N
Maxterm Also known as the standard sum or canonic sum term.
2 This is a term where each variable is used once and once only.
S
Standard product of sums form Also known as the maxterm
E
S canonic form or canonic product function. A function in the form
S of the " product " (AND) of maxterms,
I e.g:
O
N
2 Truth table The name "truth table" comes from a similar table
used in symbolic logic, in which the truth or falsity of a statement
is listed for all possible proposition conditions. The truth table
consists of two parts; one part comparising all combinations of
values of the variables in a statement (or algebraic expression),
the other part containing the values of the statement for each
combination.
DIGITAL ELECTRONICS & MICROPROCESSORS
S
The truth table is useful in that it can be used to verify
E
S Boolean identities.
S
I
O
N
2
DIGITAL ELECTRONICS & MICROPROCESSORS
S
E
S
S
I Adjacent cells Consider the following map. The function
O plotted is
N
S BOOLEAN FUNCTIONS
E
S A binary variable can take the value of 0 and 1.A boolean
S function is an expression formed with binary variables, the two
I binary operators OR and AND, the unary operator NOT,
O parentheses, equal sign.For a given value of the variables, the
N
function can be either 0 or 1.
2
Example:F1 = xyz‘
F1 = 1
S
E A Boolean function may also be represented in a truth
S table.to represent a function in a truth table, we need 2n
S combinations of 1's and 0's of the n binary variables.
I
O F2 = x + y'z F2 = 1 if x = 1 or if y = 0, while z = 1
N x y z F1 F2 F3 F4
F3 = x'y'z + x'yz + xy‘ 0 0 0 0 0 0 0
0 0 1 0 1 1 1
2 F4 = xy' + x'z 0 1 0 0 0 0 0
0 1 1 0 0 1 1
1 0 0 0 1 1 1
1 0 1 0 1 1 1
1 1 0 1 1 0 0
1 1 1 0 1 0 0
S
E Minterm & Maxterm
S
S
I
x y z Minterm Designation Maxterm Designation
O
N 0 0 0 x' y' z' m0 x+y+z M0
S
E A BOOLEAN function may be expressed algebraically from a
S given truth table by forming a MINTERM for each combination of
S the variables which produces a 1 in the function, than taking the
I OR of all those terms.
O
N Functions of three variables :
x y z function f1 function f2
2
0 0 0 0 0
0 0 1 1 0
0 1 0 0 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1
DIGITAL ELECTRONICS & MICROPROCESSORS
S Complement
E
S Read from the truth table by forming a MINTERM for each
S
combination that produces a 0 in the function and then ORing
I
those terms.
O
N
Read from the truth table by forming a MINTERM for each
2 combination that produces a 0 in the function and then ORing
those terms.
f1' = x'y'z' + x'yz' + x'yz + xy'z +xyz' If we take the
complement of f1' we obtain the function f1.
S
NOTE
E
S Any boolean function can be expressed as a sum of minterms.
S ( SUM - ORing of terms )
I
Any boolean function can be expressed as a product of
O
N
MAXTERMS ( product - AND ing of terms)
Procedure for obtaining the product of MAXTERMs from the
2 truth table is:
* Form a maxterm for each combination of the
variables which produces a 0 in the function.
* Form the AND of all those maxterms.
BOOLEAN functions expressed as a SUM of MINTERMS or
PRODUCT of MAXTERMS are said to be in CANONICAL
FORM.
DIGITAL ELECTRONICS & MICROPROCESSORS
S
CONVERSION BETWEEN CANONICAL FORMS
E
S Consider the function F ( A, B, C ) = ( 1, 4, 5, 6, 7 )
S F '( A,B, C ) = ( 0, 2, 3 )
I
O If we take the complement of F ' by the De Morgan's theorem, we
N obtain F in a different form:
m'j = Mj
S Karnaugh Maps
E
S • A Karnaugh Map is a form of truth table suitable for
S “automatic” minimization using algebraic rule T10, or the
I Distributive Law
O
N
• A Karnaugh Map (K-Map) is just a truth table drawn so that
truth table “rows” (minterms) that differ by 1 variable are
2 physically adjacent!
• This makes it easy to visually eliminate the variable that are
different and combine the minterms
• In fact K-Maps are also drawn so that higher-order terms
that differ by one variable are also adjacent
– So you could collapse pairs of higher-order terms too
– E.g. xy + x’y = y
DIGITAL ELECTRONICS & MICROPROCESSORS
S Karnaugh Maps
E
S • Pictoral form of a truth table
S
I • Provides simple procedure for simplifying boolean functions
O
N • Uses human ability to recognize complex patterns
2 • Not assured of finding the minimal representation
S
Since functions can be represented by a sum of product form
E
S of minterms, any function can be shown in the map buy
S placing each a 1 in each square which represents a minterm
I in the function.
O
N EXAMPLE: Draw the map for f = X + Y
XY f = X + Y minterm
0 0 0 m0
0 1 1 m1
1 0 1 m2
1 1 1 m3
DIGITAL ELECTRONICS & MICROPROCESSORS
S
E
S 2. Draw the map and place a 1 in each square for required
S minterms. Y
I Y
O X 1
N
1
0
2
X 1 1 1
f = X + Y = m1 + m2 + m3 = X´ Y + X Y´ + X Y
DIGITAL ELECTRONICS & MICROPROCESSORS
Y Y
2
X
m0 m1
X m2 m3
DIGITAL ELECTRONICS & MICROPROCESSORS
Y Y
2
X
1 0
X 1 0
DIGITAL ELECTRONICS & MICROPROCESSORS
1 0
X 1 0
Y Y
2
X
m0 m1
X m2 m3
DIGITAL ELECTRONICS & MICROPROCESSORS
Y Y
2
X
m0 m1
X m2 m3
DIGITAL ELECTRONICS & MICROPROCESSORS
S
E Three Variable Map
S
S m0 m1 m3 m2
I m4 m5 m7 m6
O
Y
N
YZ
2 X 00 01 11 10
0 X´ Y´ Z´ X´ Y´ Z X´ Y Z X´ YZ´
X 1 X Y´ Z´ XY´Z XYZ X Y Z´
Z
DIGITAL ELECTRONICS & MICROPROCESSORS
0 X´Y´Z´ X´ Y´ Z X´ Y Z X´ Y Z´
Z
DIGITAL ELECTRONICS & MICROPROCESSORS
S
E Example: Simplify
S f = X´Y´ Z´ + X Y Z + X´Y´ Z + X´ Y Z
S
I Y
O
N YZ
X 00 01 11 10
2
1 1 1
0
1
X 1
Z
f = X´Y´ + Y Z
DIGITAL ELECTRONICS & MICROPROCESSORS
S
E Even if the function is not in its simplest form, we can still
S use the map to simplify it further.
S
I Example: Simplify f = X´ Y´ + Y´ Z + X´ Z + X Y Z
O
Y
N
YZ
2 X 00 01 11 10
0 1 1 1
X 1 1 1
Z
f = Z + X´ Y´ (by further grouping of minterms)
DIGITAL ELECTRONICS & MICROPROCESSORS
2 YZ Y
X
m0 m1 m3 m2
m4 m5 m7 m6
X
Z
DIGITAL ELECTRONICS & MICROPROCESSORS
2 YZ Y
X
1 0 1 1
1 0 1 0
X
Z
DIGITAL ELECTRONICS & MICROPROCESSORS
S Truth Table
E
S f (X,Y,Z) = ∑ (0, 2, 3, 4, 7)
S
I Simplified sum of products: f = Y´Z´ + YZ + X´Y
O The truth table for f:
N
X Y Z f
2 0 0 0 1
0 0 1 0
0 1 0 1
0 1 1 1
1 0 0 1
1 0 1 0
1 1 0 0
1 1 1 1
DIGITAL ELECTRONICS & MICROPROCESSORS
S
E
S f (X,Y,Z) = ∑ (0, 2, 3, 4, 7)
S = Y´Z´ + YZ + X´Y
I
O Y
N
Z
2
Y f
Z
X
Y
DIGITAL ELECTRONICS & MICROPROCESSORS
2 YZ Y
X
m0 m1 m3 m2
m4 m5 m7 m6
X
Z
DIGITAL ELECTRONICS & MICROPROCESSORS
2 YZ Y
X
m0 m1 m3 m2
m4 m5 m7 m6
X
Z
DIGITAL ELECTRONICS & MICROPROCESSORS
S
E
Four Variable Map
S
S Y
I YZ
O WX 00 01 11 10
N m0 m1 m3 m2 00
2 m4 m5 m7 m6
01
m12 m13 m15 m14 X
m8 m9 m11 m10 11 w x y´z
W
W x´y
10
´z
Z
DIGITAL ELECTRONICS & MICROPROCESSORS
S
E
Four Variable Map
S
S N = 4 variables
I
2N = 24 = 16 square (minterms)
O
N
Row and column are numbered using a reflected-code
2 sequence. The minterm number can be obtained by
concatenation of the row and column number .
S Y
E
S YZ
00 01 11 10
S
I 00 wx´y´z´ 1 1 w´x´y z´
O
N 01
X
2 11
W wx´y´z
10 ´
1 1 wx´y´z
Notice that top and bottom edges and right and left edges are
“adjacent.”
DIGITAL ELECTRONICS & MICROPROCESSORS
01
X
11
W
10
Z
DIGITAL ELECTRONICS & MICROPROCESSORS
S
E Simplify: f (W, X, Y, Z) = W X´ Z + W X Z + W´ Y Z
S Y
S
I YZ
O WX 00 01 11 10
N
00
2 01
X
11
W
10
f=WZ+YZ
Z
f = Z ( W + Y)
DIGITAL ELECTRONICS & MICROPROCESSORS
f = Y´ + WZ´ + XZ´ Z
S Simplify: f = W´ X´ Y´ + X´Y Z´ + W´ X Y Z´ + W X´ Y´
E
S Y
S
YZ
I
WX 00 01 11 10
O
N 00
2 01
X
11
10
Z
f = X´ Z´ + X´ Y´ + W´ Y Z´
DIGITAL ELECTRONICS & MICROPROCESSORS
S
Example: 4-variable Karnaugh Map
E
S
S • Each value of the cell corresponds to value in the truth
I table: ABCD
O 0000 0
0001 1
N 0010 2
0011 3
2 0100
0101
4
5
0110 6
0111 7
1000 8
1001 9
1010 10
1011 11
1100 12
1101 13
1110 14
1111 15
DIGITAL ELECTRONICS & MICROPROCESSORS
2 0100 1
0101 1
0110 0
0111 1
1000 1
1001 0
1010 0
1011 0
1100 1
1101 1
1110 0
1111 1
DIGITAL ELECTRONICS & MICROPROCESSORS
•1
E E
DIGITAL ELECTRONICS & MICROPROCESSORS
Six Variable Map
S
EF AB=00 E AB=01 E
E
S CD
S
I
O D
N
C
2
F F
AB=10 AB=11
DIGITAL ELECTRONICS & MICROPROCESSORS
S
E
S ASSIGNMENT 2.2 ?????????
S
I Simplify the boolean function :
O
N 1. F(A,B,C,D,E)=∑(0,1,4,5,16,17,21,25,29)
2 3. F= A’B’CE’+A’B’C’D’+B’D’E’+B’CD’+CDE’+BDE’
4. What is Prime Implicant & Essential Prime Implicant ?
DIGITAL ELECTRONICS & MICROPROCESSORS
S
E
S Next Session Contains …….
S
I
O Don’t Care Conditions
N
Nand & Nor Implementation
2 Exclusive or Function