Organizational Remarks - PowerPoint PPT Presentation

About This Presentation
Title:

Organizational Remarks

Description:

Title: Implementing Processes, Threads, and Resources Last modified by: deutz Created Date: 12/19/2002 9:49:53 PM Document presentation format: On-screen Show – PowerPoint PPT presentation

Number of Views:56
Avg rating:3.0/5.0
Slides: 63
Provided by: leid96
Category:

less

Transcript and Presenter's Notes

Title: Organizational Remarks


1
Organizational Remarks
  • I dont use the exercises in Mano/Kime this way
    you can use them as review exercises (for many of
    them there are solutions on the web
    www.prenhall.com/mano).

2
Remarks
  • Twos complement
  • For the math minded, otherwise ignore
  • Boolean ring is not a Boolean algebra
  • given a Boolean ring you can equip it with a
    Boolean algebra structure (and conversely)
  • a ? b ab (AND)
  • a ? b ab ab (OR)
  • a 1 a (NOT)

3
Remarks
  • For the math minded, otherwise ignore
  • given a Boolean algebra you can equip it with a
    Boolean ring structure
  • xy x ? y,
  • x y (x ? y) ? (x ? y).
  • (? AND, ?OR, NOT the given operations of the
    Boolean algebra)

4
Logic diagrams, Boolean expressions, and
Truth(1/0) Tables
  • LDs ??BEs ?? TTs

5
Logic diagrams (LDs), Boolean Expressions (BEs),
and Truth Tables (TTs) (or 1/0-tables)
  • The object which is lurking behind the scenes is
    of the course the notion of a Boolean logic
    function (or for short a Boolean function) a
    Boolean function of n variables is a mapping
    from the set 0,1n to the set 0,1. (What do
    you mean by 0,1n ? )
  • Of course, a Boolean function is completely
    determined by a Truth table (1/0-table)

6
LDs, BEs, and TTs
  • LDs ??BEs ?? TTs
  • Each Boolean function has a unique TT
  • In general a Boolean function or a TT can have
    more than one LD (or for that matter BE)
    associated to it.
  • For any two of (LD, BE, TT) can readily go back
    and forth

7
LDs, BEs, and TTs
  • For any two of (LD, BE, TT) can readily go back
    and forth
  • From TT to BE for each 1 in the output introduce
    an appropriate minterm (a product term which
  • contains each of
    the variables or their negation),
    then S is the
  • sum of these minterms

A B Cin
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
S
0
1
1
0
1
0
0
1
ABC
ABC
ABC
ABC
S ABC ABC ABC ABC
8
LDs, BEs, and TTs BE ? TT
  • S ABC ABC ABC ABC
  • How do you get the Truth Table (1/0-table)? Etc.
  • We have done also the transition from TT to LD.
    Given the LD it is not difficult to come up with
    the TT.
  • It is also not difficult to imagine how you would
    go directly from LD to BE and vice versa.
  • Make sure that you are conversant with all
    possible transitions

9
Reduction (Simplification) of Boolean Expressions
  • It is usually possible to simplify the
    canonical SOP (or POS) forms.
  • A smaller Boolean equation generally
    translates to a lower gate count in the target
    circuit.
  • We cover three methods algebraic reduction,
    Karnaugh map reduction, and tabular
    (Quine-McCluskey) reduction.

10
Reduced Majority Function Circuit
  • Compared with the AND-OR circuit for the
    unreduced majority function, the inverter for C
    has been eliminated, one AND gate has been
    eliminated, and one AND gate has only two inputs
    instead of three inputs. Can the function by
    reduced further? How do we go about it?

11
The Algebraic Method
  • Consider the majority function, F. We apply
    the algebraic method to reduce F to its minimal
    two-level form

12
An Aside from Alfred Tarski
  • What did you mean in high school by the following
    statement (ab)(a-b) a2 b2?
  • As such it can be confusing it is not an
    equation but an identity the following is much
    better
  • For all a in R, for all b in R (ab)(a-b) a2
    b2 R stands for the real numbers.
  • And so it goes when we say in Boolean algebra
    context aaa. We mean For all a in B0, 1 aa
    a

13
An Aside from Alfred Tarski
  1. And so it goes when we say in Boolean algebra
    context aaa. We mean For all a in B01, aa
    a
  2. Or another example
  3. abcabcabcabc bcacab (pertains to the
    majority function)
  4. Let B0,1.
  5. For all a in B, for all b in B, for all c in B
    abcabcabcabc bcacab
  6. Or say 3) is shorthand for 5)

14
The Algebraic Method
  • This majority circuit is functionally
    equivalent to the previous majority circuit, but
    this one is in its minimal two-level form

15
Karnaugh Maps Venn Diagram Representation of
Majority Function
  • Each distinct region in the Universe
    represents a minterm.
  • This diagram can be transformed into a
    Karnaugh Map.

16
K-Map for Majority Function
  • Place a 1 in each cell that corresponds to
    that minterm.
  • Cells on the outer edge of the map wrap
    around

17
Adjacency Groupings for Majority Function
Slightly different bookkeeping (no conceptual
change)
B
B C
A
00
01
11
10
0
2
3
1
0
1
4
7
  • F BC AC AB

5
6
1
A
C
18
Minimized AND-OR Majority Circuit
  • F BC AC AB
  • The K-map approach yields the same minimal
    two-level form as the algebraic approach.

19
K-Map Groupings
  • Minimal grouping is on the left, non-minimal
    (but logically equivalent) grouping is on the
    right.
  • To obtain minimal grouping, create smallest
    groups first.

B
A
D
C
20
K-Map Corners are Logically Adjacent
Slightly different bookkeeping (no conceptual
change)
1
21
K-Maps and Dont Cares
  • There can be more than one minimal grouping, as
    a result of dont cares.

22
Five-Variable K-Map
  • Visualize two 4-variable K-maps stacked one on
    top of the other groupings are made in three
    dimensional cubes.

23
Six-Variable K-Map
  • Visualize four 4-variable K-maps stacked one on
    top of the other groupings are made in three
    dimensional cubes.

24
Minimization (mainly 2-level circuits)
  • K-maps (more elaborately)
  • Quine-McCluskey Algorithm

25
Minimization
  • With respect to minimizing logic, there are
    several parameters that can be used
  • For instance the number of gates
  • less cost
  • Less area on a chip
  • Less power requiremen
  • Less heat dissipation
  • More reliability
  • We can also use total number of gate inputs
    (including inverters GN) (since the cost of the
    gate and the associated wiring increases with the
    number of inputs wiring effects speed and
    chip area)
  • Number of literals (see slide 32)

26
Minimization
  • GN Example ABCD ABCD ABCD ABCD
    ABCD ABCD ABCD ABCD 4 for inverters
    (one for each input variable, 84 for AND-gates,
    and 8 for the final OR-gate, a total of 44
    (i.e., GN44) the number of gates is 13 (8 ANDs,
    1 OR, and 4 NOTs)
  • Definition A Boolean SoP form is said to be
    minimal if it contains a minimal number of
    product terms and literals note that the
    definition involves two criteria.
  • A minimum SoP form corresponds to a two level
    logic circuit having the fewest gates and the
    fewest number of gate inputs

27
Minimization
  • Fortunately we can work with one criterion the
    number of gate inputs we seldom encounter
    functions where the implementation with the
    smallest number of gate inputs, for example, is
    not also the implementation with the smallest
    number of gates
  • Secondly we can have more than one minimum
  • f(A,B,C) ABCABCABCABCABCABC
  • Equivalently ACACBCBC
  • And equivalently ABBCBCAB

28
Irredundant Form
  • An irredundant form is a logic expression of
    which no part can be deleted without changing the
    function that corresponds to it (sort of
    a locally mininum )
  • For instance a SoP (Sum-of-Products) expression
    is irredundant if the deletion of any p-term or
    the deletion of any literal in any p-term changes
    the function (corresponding to the original SoP).
  • Conversely A SoP expression is redundant if it
    is possible to delete some literal or some
    product term without changing the corresponding
    function.

29
Example of Irredundant SoP
  • Consider the f(A,B,C) ACABCACABBC
  • Applying consensus thm we see ACABBCAC
    AB so the last term in f -- BC -- can be
    deleted
  • f(A,B,C) ACABCACAB A(CBC)ACABA(
    CB)ACAB ACABACAB
    (1)
  • This is expression is irredundant ( deletion of
    any p-term or the deletion of any literal in any
    p-term changes the function)
  • Is ACABACABminimal SoP expression? NO!!!!
    f(A,B,C) is also equal to ACBCAB
    (2)

Can be deleted
Can be deleted
30
Example of Irredundant SoP (contd)
  • f(A,B,C) ACABACAB (1)
    f(A,B,C)
    is also equal to ACBCAB
    (2)
  • (1) and (2) are irredundant, (2) cannot be
    obtained from (1) (2) is minimal

31
Minimization (connection with book)
  • Description of cost criteria in the book
  • Literal cost (L) all gate inputs from outside
    the circuit
  • Gate input cost (G) all gate inputs from within
    the circuit, except for those to inverters
  • Gate input cost with NOTs (GN) same as G plus
    inputs which need to be complemented

32
Literal Cost
  • Literal a variable or its complement
  • Literal cost the number of literal
    appearances in a Boolean expression
    corresponding to the logic circuit diagram
  • FBDABCACD L 8
  • FBDABCABDABC L ?
  • F(AB)(AD)(BCD)(BCD) L?
  • Which solution is best?

Digital Techniques Fall 2007 André Deutz, Leiden
University
33
Gate Input Cost
  • Gate input costs - the number of inputs to the
    gates in the implementation corresponding exactly
    to the given equation or equations. (G -
    inverters not counted, GN - inverters counted)
  • For SOP and POS equations, it can be found from
    the equation(s) by finding the sum of
  • all literal appearances
  • the number of terms excluding single literal
    terms,(G) and
  • optionally, the number of distinct complemented
    single literals (GN).
  • FBDABCACD G 8. GN11
  • FBDABCABDABC G ?, GN?
  • F(AB)(AD)(BCD)(BCD) G?, GN?
  • Which solution is best?

34
Cost Criteria (example)
  • Example 1
  • F A B C

35
Cost Criteria (example)
  • Example 2
  • F A B C
  • L 6 G 8 GN 11
  • F (A )( C)( B)
  • L 6 G 9 GN 12
  • Same function and sameliteral cost
  • But first circuit has bettergate input count and
    bettergate input count with NOTs
  • Select it!

36
Minimization
  • NB we concentrate on 2-level circuit
    minimization (minimization corresponding to SoPs
    (PoSs))

37
Simplifying a Boolean Function using 2-variable
K-map (examples)
Given functions
Simplified functions
F1(X,Y) Sm(0,1) XY XY
F1(X,Y) X
F2(X,Y) Sm(0,3) XY XY
F2(X,Y) XY XY
F3(X,Y) Sm(0,2,3) XY XY XY
F3(X,Y) X Y
Y
1
0
1
1
0
F4(X,Y) Sm(0,1,2,3) XY XY XY XY
F4(X,Y) 1
1
1
1
38
Simplifying a Boolean Function using 3-variable
K-map (groupings)
minterm


m0
m3
m2
m1
m4
m5
m7
m6
  • Group of 2 adjacent cells gives product term of
    two literals.
  • Group of 4 adjacent cells gives product term of
    one literals.

39
Simplifying a Boolean Function using 3-variable
K-map (examples)
Given functions
Simplified functions
F1(X,Y,Z) Sm(1,2,4,7)
Simplification is not possible
F2(X,Y,Z) XY XY
F2(X,Y,Z) Sm(2,3,4,5)

F3(X,Y,Z) Sm(0,2,4,6)
F3(X,Y,Z) Z
Z
Y
YZ
00
01
11
10
X
1
1
1
1
0
F4(X,Y,Z) Sm(0,1,2,3,4,6,7)
F4(X,Y,Z) X Y
1
1
1
X
Z
40
Simplifying a Boolean Function using 3-variable
K-map (more examples)
Y
YZ
Given functions
Simplified functions
00
01
11
10
X
1
0
F5(X,Y,Z) XZ YZ
F5(X,Y,Z) Sm(3,4,6,7)
1
1
1
1
X
Z
Y
YZ
00
01
11
10
X
F6(X,Y,Z) Z XY
1
1
0
F6(X,Y,Z) Sm(0,2,4,5,6)
1
1
1
1
X

Z
Y
YZ
00
01
11
10
X
F7(X,Y,Z) Z XY
1
1
1
0
F7(X,Y,Z) Sm(1,2,3,5,7)
1
1
1
X
F8(X,Y,Z) XZXZ YZ or F8(X,Y,Z) XZXZ
XY Not unique solution
Z
Y
YZ
00
01
11
10
X
1
1
0

F8(X,Y,Z) Sm(1,3,4,5,6)
1
1
1
1
X

Z
41
Simplifying a Boolean Function using 4-variable
K-map (grouping examples)
  • Group of 2 adjacent cells gives product term of
    3 literals.
  • Group of 4 adjacent cells gives product term of
    2 literals.

XZ
WXZ
WYZ
WY
WY
WXY
XYZ
  • Group of 8 adjacent cells gives product term of 1
    literals.
  • Group of all cells givesconstant one.

1
Z
W
42
Simplifying a Boolean Function using 4-variable
K-map (examples)
Given function
F2(W,X,Y,Z) Sm(0,1,2,4,5,6,8,
9,12,13,14)
Simplified function
F2(W,X,Y,Z) Y WZ XZ
Given function
Given function
F3(W,X,Y,Z) WXY XYZ WXY WXYZ
F1(W,X,Y,Z) Sm(0,1,2,4,5,7,8,9,10,12,13)
Simplified function
Simplified function
F1(W,X,Y,Z) Y XZ WXZ
F3(W,X,Y,Z) XY XZ WYZ
43
Grouping Cells in a K-map Systematically
  • The procedure for combining cells in a K-map may
    be made more systematic if we introduce the
    terms implicants, prime implicants, and
    essential prime implicants.
  • An Implicant (I) of a function F is a product
    term which implies F, i.e., F 1 whenever I 1.
  • All minterms of a function F are implicants of F.
  • All rectangles in a K-map made up of cells
    containing 1s correspond to implicants.
  • An implicant of F is called a Prime Implicant
    (PI) if any product term obtained by deleting a
    literal of PI is NOT an implicant of F.
  • (Equivalently An implicant P of F is prime, if
    there is no implicant I of F such that P implies
    I.)
  • Thus, a prime implicant is not contained in any
    larger implicant.
  • On a K-map of n-variable function, the set of
    prime implicants corresponds to the set of all
    rectangles made up of 2m cells containing 1s (m
    0, 1,2,,n), with each rectangle containing as
    many cells as possible.

44
Example of Prime Implicants (PIs)
  • Consider function F(W,X,Y,Z) whose K-map is shown
    at right.
  • Product terms Z, XY, WXY are prime implicants.
    Why?
  • Consider the term XY and obtain terms by deleting
    any literal
  • We get two terms term X and term Y.
  • Both terms are NOT implicants of F.
  • Thus, the term XY is prime implicant.
  • YZ is not a prime implicant because it is
    contained in Z.
  • WXY is not a prime implicant because it is
    contained in XY.

45
Essential Prime Implicants (EPIs)
  • If a minterm of a function F is included in ONLY
    one prime implicant pi, then pi is an Essential
    Prime Implicant of F.
  • An essential prime implicant MUST appear in all
    possible SOP expressions of function F.
  • To find essential prime implicants
  • Generate all prime implicants of a function
  • Select those prime implicants that contain at
    least one 1 that is not covered by any other
    prime implicant.
  • For the previous example, the PIs are Z, XY, and
    WXY all of these are essential.

Z
XY
Y
YZ
00
01
11
10
WX
1
1
00
1
1
1
01
X
1
1
1
11
W
1
10
1
1
Z
WXY
46
Essential Prime Implicants (examples)
  • Consider function F1(W,X,Y,Z) whose K-map is
    shown below
  • All Prime Implicants areXZ, WXY, WYZ,
    XYZ, WXZ, WXY, WYZ
  • Essential Prime Implicants areXZ
  • Consider function F2(W,X,Y,Z) whose K-map is
    shown below
  • All Prime Implicants areXZ, WZ, WX
  • Essential Prime Implicants areXZ and WZ

47
Systematic Procedure for Simplifying Boolean
Functions
Given The K-map of a Boolean function Obtain
The simplest SOP expression for the function
  1. Find all primary implicants (PIs) of the
    function.
  2. Select all essential PIs.
  3. For remaining minterms not included in the
    essential PIs, select a set of other PIs to cover
    them, with minimal overlap in the set.
  4. The resulting simplified function is the logical
    OR of the product terms selected above.

48
Example
  • F(W,X,Y,Z) ?m(0,1,2,3,4,5,7,14,15).
  • All prime implicants (PI) areWX, WY, WZ,
    XYZ, WXY
  • Select all essential PIs WX, WY, WXY
  • Select other PIs to cover all 1s with minimal
    overlap
  • Possibilities WZ or XYZ
  • We select WZ because it is simpler.
  • F(W,X,Y,Z) WXWYWXY WZ

49
Other Examples (cont.)
  • Consider function F(W,X,Y,Z) ?m(0,1,2,4,5,10,11,1
    3,15) whose K-map is shown at right.
  • All prime implicants are
  • WY, XYZ, WXZ, WYZ, WXY, WXZ, XYZ
  • Essential prime implicants are
  • WY
  • Nonessential prime implicants are
  • WY, XYZ, WXZ, WYZ, WXY, WXZ, XYZ
  • Simplified function (solution not unique)
  • F WYWXZWXYWXZ
  • F WYWXZWXYXYZ
  • F WYWYZXYZXYZ
  • F WYWYZXYZWXZ

WXZ and WXY are NON-overlapping PIs.
WYZ and XYZ are NON-overlapping PIs.
50
Product-Of-Sum (POS) Simplification
  • So far, we have considered simplification of a
    Boolean function expressed in Sum-Of-Products
    (SOP) form using a K-map .
  • Sometimes the Product-Of-Sums form of a function
    is simpler than the SOP form.
  • Can we use K-maps to simplify a Boolean function
    in Product-Of-Sums form?
  • Procedure
  • Use sum-of-products simplification on the zeros
    of function F in the K-map. In this way you will
    get the simplified complement of F (F).
  • Find the complement of F which is F, i.e., (F)
    F
  • Recall that the complement of a Boolean function
    can be obtained by (1) taking the dual and (2)
    complementing each literal.
  • OR, using DeMorgans Theorem.

51
POS Simplification Example
The complement of F (F)
F ?m(0,1,2,3,4,5,7,14,15)
  • Simplify using zeros F WX WY WXYZ
  • Complement F to find F, i.e., F (F)
  • First get the dual of F dual(F) (WX)
    (WY) (WXYZ)
  • Complement each literal in dual(F) to get F as
    POSF (WX) (WY) (WXYZ)

52
Dont-Care Conditions
  • Sometimes a Boolean function is not specified for
    some variable value combinations. Why?
  • There may be a combination of input values which
    will never occur. (See for an example Assignment
    5)
  • If they do occur, the value of the function is of
    no concern.
  • The function value for such combinations is
    called a don't-care and the combination is called
    dont-care condition.
  • The dont-care function values are usually
    denoted with x. Each x may be arbitrarily
    assigned the value 0 or 1 in an implementation.
  • Dont-cares can be used to further simplify a
    function.

53
Example with Dont-Care Conditions
  • Consider the following incompletely specified
    function F that has three dont-care minterms d
  • F(A,B,C,D) ?m(1,3,7,11,15)
  • d(A,B,C,D) ?m(0,2,5)

F1 CD AB
F2 CD AD
Notice F1 and F2 are algebraically not equal.
Both include the specified minterms of F, but
each includes different dont-care minterms.
54
3-Level Majority Circuit
  • K-Map Reduction results in a reduced two-level
    circuit (that is, AND followed by OR. Inverters
    are not included in the two-level count).
    Algebraic reduction can result in multi-level
    circuits with even fewer logic gates and fewer
    inputs to the logic gates.

55
Truth Table with Dont Cares
  • A truth table representation of a single
    function with dont cares.

56
Tabular (Quine-McCluskey) Reduction
  • Tabular reduction begins by grouping minterms
    for which F is nonzero according to the number of
    1s in each minterm. Dont cares are considered
    to be nonzero.
  • The next step forms a consensus between each
    pair of adjacent groups for all terms that differ
    in only one variable.

57
Table of Choice (Selection)
The prime implicants form a set that completely
covers the function, although not necessarily
minimally. A table of choice is used to obtain
a minimal cover set.
58
Reduced Table of Choice
In a reduced table of choice, the essential
prime implicants and the minterms they cover are
removed, producing the eligible set. F ABC
ABC BD AD
59
(No Transcript)
60
(No Transcript)
61
Where are we?
  • We have seen several implementations of AND, OR
    and NOT gates
  • With these primitives we can build for any 1-0
    table specification a CLU (combinational logic
    unit) satisfying it.
  • We already have built some higher level CLUs the
    next step is to use these higher level CLUs in
    turn to get the next level of sophistication
    (hierarchical approach)
  • An example of the next level in the hierarchy
    would be an Arithmetic Logic Unit this is
    exactly what we are going to build next.
  • Subsequently we will look at sequential circuits
    and memory elements.

62
Back to Constructing CLUs
  • Make a list of useful CLUs you made so far (hint
    consider the lectures and Assignments)
  • Construct a one-bit Arithmetic Logic Unit (ALU)
    i.e., provide its Logic Diagram this CLU has 5
    inputs and 2 outputs the inputs three data
    inputs (A and B and Carry_in) two control
    inputs they determine which of the four
    operations are carried out on the three data
    inputs (logical or of A and B, logical and of A
    and B, the negation of A, and lastly the sum of A
    and B which also takes into account the carry_in
    the output consists of 1) the result of the
    chosen operation and 2) a carry_out relevant in
    case the sum is wished for.
  • Implement the above constructed LD in Digital
    works.
  • Construct the LD for 32-bit ALU secondly,
    implement the LD in Digital Works.
Write a Comment
User Comments (0)
About PowerShow.com