Midterm 2 Revision Decoders and Multiplexers - PowerPoint PPT Presentation

1 / 73
About This Presentation
Title:

Midterm 2 Revision Decoders and Multiplexers

Description:

Midterm 2 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University Example Another Example Consider F(A,B,C) = m ... – PowerPoint PPT presentation

Number of Views:98
Avg rating:3.0/5.0
Slides: 74
Provided by: null83
Category:

less

Transcript and Presenter's Notes

Title: Midterm 2 Revision Decoders and Multiplexers


1
Midterm 2 RevisionDecoders and Multiplexers
CS147
Lecture 10
  • Prof. Sin-Min Lee
  • Department of Computer Science
  • San Jose State University

2
(No Transcript)
3
(No Transcript)
4
(No Transcript)
5
(No Transcript)
6
(No Transcript)
7
(No Transcript)
8
(No Transcript)
9
(No Transcript)
10
(No Transcript)
11
(No Transcript)
12
(No Transcript)
13
(No Transcript)
14
(No Transcript)
15
(No Transcript)
16
(No Transcript)
17
(No Transcript)
18
(No Transcript)
19
X Y F
0 0 0
0 1 0
1 0 0
1 1 1
F Sm F ?M xy
(xy)(xy)(xy) (xy)(xy)(xy)
(x(y.y))(xy) (x0) (xy) x.xxy
0xy xy
 
20
(No Transcript)
21
(No Transcript)
22
(No Transcript)
23
(No Transcript)
24
(No Transcript)
25
(No Transcript)
26
(No Transcript)
27
(No Transcript)
28
(No Transcript)
29
(No Transcript)
30
(No Transcript)
31
(No Transcript)
32
Example
  • F(X,Y,Z) XYZ XYZ XYZ XYZ
    Sm(1,2,6,7)
  • There are n3 inputs, thus we need a 22-to-1 MUX
  • The first n-1 (2) inputs serve as the selection
    lines

33
Z Y X F
0 0 0 0 F0
0 0 1 0
0 1 0 1 F1
0 1 1 1
1 0 0 1 F X
1 0 1 0
1 1 0 0 F X
1 1 1 1
0 1 X X
F
Z Y
34
Y X Z F
0 0 0 0 FZ
0 0 1 1
0 1 0 0 F0
0 1 1 0
1 0 0 1 F Z
1 0 1 0
1 1 0 1 F 1
1 1 1 1
Z 0 Z 1
F
Y X
35
Y X Z F
0 0 0 X .Y 0
0 0 1 X?Y0
0 1 0 X .Y 0
0 1 1 X?Y1
1 0 0 X .Y 1
1 0 1 X?Y1
1 1 0 X .Y 0
1 1 1 X?Y0
36
Another Example
  • Consider F(A,B,C) ?m(1,3,5,6). We can implement
    this function using a 4-to-1 MUX as follows.
  • The index is ABC. Apply A and B to the S1 and S0
    selection inputs of the MUX (A is most sig, S1 is
    most sig.)
  • Enumerate function in a truth table.

37
MUX Example (cont.)
A B C F
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 1
1 0 0 0
1 0 1 1
1 1 0 1
1 1 1 0
When AB0, FC
When A0, B1, FC
When A1, B0, FC
When AB1, FC
38
MUX implementation of F(A,B,C) ?m(1,3,5,6)
A
B
C
C
F
C
C
39
Or Simply.
C
C
11 10 01 00
F
C
C
A B
40
A larger Example
41
MUX as a Universal Gate
  • We can construct OR, AND, and NOT gates using
    2-to-1 MUXs. Thus, 2-to-1 MUX is a universal gate.

NOT
AND
OR
1
x1
z x1 x1x0 x1x0 x1x0 x1x0 x1
x0
z 0x 1x x
z x1x0 0x0 x1x0
42
Implementation using decoders Now we implement
the output f1 using an          decoder and
3-input OR gates.
43
(No Transcript)
44
Multiplexers
  • 2n data inputs, n control input, one data
    output
  • Data inputs selected by control are gated are
    gated to output
  • Each AND gate gets 3 control and one data input,
    selects input based on control
  • OR gate adds all selected inputs

45
Majority Function using a Multiplxer
  • Each input wired to 1 or 0
  • If 0 in table ground Else connect to Vcc. Check
    if it works!

46
Other Users of Multiplexers
  • Parallel to Serial Conversion
  • Put 8 bit data in input lines
  • Step through 000 to 111 in control lines to
    select inputs serially
  • Used in serializing device inputs such as key
    board inputs over telephone lines
  • Inverse operation Demultiplexing routes single
    serial input into multiple outputs depending on
    value of control lines

47
Decoders
  • Selects one of 2n inputs
  • Each AND gate implements one Boolean expression
    ABC etc.

48
Comparators
  • 4 address words, A, B compared.
  • Output (A B)
  • Users XOR gates 1 iff both inputs are same

49
3A.1 Introduction
  • In 1953, Maurice Karnaugh was a
    telecommunications engineer at Bell Labs.
  • While exploring the new field of digital logic
    and its application to the design of telephone
    circuits, he invented a graphical way of
    visualizing and then simplifying Boolean
    expressions.
  • This graphical representation, now known as a
    Karnaugh map, or Kmap, is named in his honor.

50
3A.2 Description of Kmaps and Terminology
  • A Kmap is a matrix consisting of rows and columns
    that represent the output values of a Boolean
    function.
  • The output values placed in each cell are derived
    from the minterms of a Boolean function.
  • A minterm is a product term that contains all of
    the functions variables exactly once, either
    complemented or not complemented.

51
3A.2 Description of Kmaps and Terminology
  • For example, the minterms for a function having
    the inputs x and y are
  • Consider the Boolean function,
  • Its minterms are

52
3A.2 Description of Kmaps and Terminology
  • Similarly, a function having three inputs, has
    the minterms that are shown in this diagram.

53
3A.2 Description of Kmaps and Terminology
  • A Kmap has a cell for each minterm.
  • This means that it has a cell for each line for
    the truth table of a function.
  • The truth table for the function F(x,y) xy is
    shown at the right along with its corresponding
    Kmap.

54
3A.3 Kmap Simplification for Two Variables
  • The best way of selecting two groups of 1s form
    our simple Kmap is shown below.
  • We see that both groups are powers of two and
    that the groups overlap.
  • The next slide gives guidance for selecting Kmap
    groups.

55
3A.3 Kmap Simplification for Two Variables
  • The rules of Kmap simplification are
  • Groupings can contain only 1s no 0s.
  • Groups can be formed only at right angles
    diagonal groups are not allowed.
  • The number of 1s in a group must be a power of 2
    even if it contains a single 1.
  • The groups must be made as large as possible.
  • Groups can overlap and wrap around the sides of
    the Kmap.

56
3A.4 Kmap Simplification for Three Variables
  • A Kmap for three variables is constructed as
    shown in the diagram below.
  • We have placed each minterm in the cell that will
    hold its value.
  • Notice that the values for the yz combination at
    the top of the matrix form a pattern that is not
    a normal binary sequence.

57
3A.4 Kmap Simplification for Three Variables
  • Thus, the first row of the Kmap contains all
    minterms where x has a value of zero.
  • The first column contains all minterms where y
    and z both have a value of zero.

58
3A.4 Kmap Simplification for Three Variables
  • Consider the function
  • Its Kmap is given below.
  • What is the largest group of 1s that is a power
    of 2?

59
3A.4 Kmap Simplification for Three Variables
  • This grouping tells us that changes in the
    variables x and y have no influence upon the
    value of the function They are irrelevant.
  • This means that the function,
  • reduces to F(x) z.

You could verify this reduction with identities
or a truth table.
60
3A.4 Kmap Simplification for Three Variables
  • Now for a more complicated Kmap. Consider the
    function
  • Its Kmap is shown below. There are (only) two
    groupings of 1s.
  • Can you find them?

61
3A.4 Kmap Simplification for Three Variables
  • In this Kmap, we see an example of a group that
    wraps around the sides of a Kmap.
  • This group tells us that the values of x and y
    are not relevant to the term of the function that
    is encompassed by the group.
  • What does this tell us about this term of the
    function?

What about the green group in the top row?
62
3A.4 Kmap Simplification for Three Variables
  • The green group in the top row tells us that only
    the value of x is significant in that group.
  • We see that it is complemented in that row, so
    the other term of the reduced function is .
  • Our reduced function is

Recall that we had six minterms in our original
function!
63
3A.5 Kmap Simplification for Four Variables
  • Our model can be extended to accommodate the 16
    minterms that are produced by a four-input
    function.
  • This is the format for a 16-minterm Kmap.

64
3A.5 Kmap Simplification for Four Variables
  • We have populated the Kmap shown below with the
    nonzero minterms from the function
  • Can you identify (only) three groups in this
    Kmap?

Recall that groups can overlap.
65
3A.5 Kmap Simplification for Four Variables
  • Our three groups consist of
  • A purple group entirely within the Kmap at the
    right.
  • A pink group that wraps the top and bottom.
  • A green group that spans the corners.
  • Thus we have three terms in our final function

66
3A.5 Kmap Simplification for Four Variables
  • It is possible to have a choice as to how to pick
    groups within a Kmap, while keeping the groups as
    large as possible.
  • The (different) functions that result from the
    groupings below are logically equivalent.

67
3A.6 Dont Care Conditions
  • Real circuits dont always need to have an output
    defined for every possible input.
  • For example, some calculator displays consist of
    7-segment LEDs. These LEDs can display 2 7 -1
    patterns, but only ten of them are useful.
  • If a circuit is designed so that a particular set
    of inputs can never happen, we call this set of
    inputs a dont care condition.
  • They are very helpful to us in Kmap circuit
    simplification.

68
3A.6 Dont Care Conditions
  • In a Kmap, a dont care condition is identified
    by an X in the cell of the minterm(s) for the
    dont care inputs, as shown below.
  • In performing the simplification, we are free to
    include or ignore the Xs when creating our
    groups.

69
3A.6 Dont Care Conditions
  • In one grouping in the Kmap below, we have the
    function

70
3A.6 Dont Care Conditions
  • A different grouping gives us the function

71
3A.6 Dont Care Conditions
  • The truth table of
  • is different from the truth table of
  • However, the values for which they differ, are
    the inputs for which we have dont care
    conditions.

72
3A Conclusion
  • Kmaps provide an easy graphical method of
    simplifying Boolean expressions.
  • A Kmap is a matrix consisting of the outputs of
    the minterms of a Boolean function.
  • In this section, we have discussed 2- 3- and
    4-input Kmaps. This method can be extended to
    any number of inputs through the use of multiple
    tables.

73
3A Conclusion
  • Recapping the rules of Kmap simplification
  • Groupings can contain only 1s no 0s.
  • Groups can be formed only at right angles
    diagonal groups are not allowed.
  • The number of 1s in a group must be a power of 2
    even if it contains a single 1.
  • The groups must be made as large as possible.
  • Groups can overlap and wrap around the sides of
    the Kmap.
  • Use dont care conditions when you can.
Write a Comment
User Comments (0)
About PowerShow.com