![Page 1: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/1.jpg)
T,JK-flip-flop, Midterm 1 RevisionDecoders and Multiplexers
Prof. Sin-Min Lee
Department of Computer Science
San Jose State University
![Page 2: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/2.jpg)
2
![Page 3: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/3.jpg)
3
4 Basic types of Flip-Flops• SR, JK, D, and T• JK ff has 2 inputs, J and K need to be asserted
at the same time to change the state• D ff has 1 input D (DATA), which sets the ff
when D = 1 and resets it when D = 0• T ff has1 input T (Toggle), which forces the ff
to change states when T = 1• SR ff has 2 inputs, S (set) and R (reset) that set
or reset the output Q when asserted
![Page 4: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/4.jpg)
4
![Page 5: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/5.jpg)
5
Analysis of Sequential Systems
• Goal:– Decide the timing and functional behavior from the implementation of a
sequential system composed of FFs and logic gates
• Types:– Functional analysis– Timing analysis
![Page 6: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/6.jpg)
6
Characteristic Equation of FFs
![Page 7: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/7.jpg)
7
![Page 8: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/8.jpg)
8
The origin of the name for the JK flip-flop is detailed by P. L. Lindley, a JPL engineer, in a letter to EDN, an electronics newsletter. The letter is dated June 13, 1968, and was published in the August edition of the newsletter. In the letter, Mr. Lindley explains that he heard the story of the JK flip-flop from Dr. Eldred Nelson, who is responsible for coining the term while working at Hughes Aircraft.Flip-flops in use at Hughes at the time were all of the type that came to be known as J-K. In designing a logical system, Dr. Nelson assigned letters to flip-flop inputs as follows: #1: A & B, #2: C & D, #3: E & F, #4: G & H, #5: J & K. Given the size of the system that he was working on, Dr. Nelson realized that he was going to run out of letters, so he decided to use J and K as the set and reset input of each flip-flop in his system (using subscripts or somesuch to distinguish the flip-flops), since J and K were "nice, innocuous letters."
![Page 9: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/9.jpg)
9
Dr. Montgomery Phister, Jr., an engineer under Dr. Nelson at Hughes, picked up the idea that J and K were the set and reset input for a "Hughes type" of flip-flop, which he then termed "J-K flip-flops," a name that he carried with him when he left for Scientific Data Systems in Santa Monica.
![Page 10: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/10.jpg)
10
![Page 11: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/11.jpg)
11
Implement D Flip-flop by T Flip-flop
0 1
0 0
1 1
0 1
0 1
1 0
D T
Q Q
0
1
0
1
T = D Q’ + D’ Q
D
D’
T
![Page 12: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/12.jpg)
12
Implement JK Flip-flop by D Flip-flop
0 1
0 1
0 0
1 0
1 1
J K
Q
0 0
0 1
1 1
1 0
D = J Q’ + K’ Q
D
0 1
J K
Q
0 0
0 1
1 1
1 0
0 1
0 0
1 0
1 1
D Q+
0
1
0
1
J
K
Q
Q’
![Page 13: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/13.jpg)
13
Implement JK Flip-flop by T Flip-flop
0 1
0 1
0 0
1 0
1 1
J K
Q
0 0
0 1
1 1
1 0
T = J Q’ + K Q
T
0 1
J K
0 0
0 1
1 1
1 0
0 0
0 1
1 1
1 0
T Q+
0
1
Q
Q’
J
K
Q
Q’
QQ+
J K Q+
0 0
0 1
1 0
1 1
Q
0
1
Q’
![Page 14: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/14.jpg)
14
Implement T Flip-flop by JK Flip-flop
0 X
1 X
X 1
X 0
J K
0 0
0 1
1 0
1 1
TQ
0
1
0 1
1 0
Q Q+0 1
TQ
0
1
0 X
1 X
0 1 TQ
0
1
X 0
X 1
0 1
J = T K = T
![Page 15: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/15.jpg)
15
![Page 16: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/16.jpg)
16
![Page 17: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/17.jpg)
17
![Page 18: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/18.jpg)
18
![Page 19: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/19.jpg)
19
![Page 20: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/20.jpg)
20
![Page 21: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/21.jpg)
21
![Page 22: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/22.jpg)
22
![Page 23: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/23.jpg)
23
![Page 24: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/24.jpg)
24
![Page 25: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/25.jpg)
25
![Page 26: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/26.jpg)
26
![Page 27: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/27.jpg)
27
![Page 28: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/28.jpg)
28
![Page 29: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/29.jpg)
29
![Page 30: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/30.jpg)
30
![Page 31: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/31.jpg)
31
![Page 32: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/32.jpg)
32
X Y F
0 0 0
0 1 0
1 0 0
1 1 1
F = Σm F = ΠM
= xy = (x+y)(x+y´)(x´+y)
(x+y)(x+y´)(x´+y)
= (x+(y.y´))(x´+y)
= (x+0) (x´+y)
= x.x´+xy
= 0+xy
= xy
![Page 33: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/33.jpg)
33
![Page 34: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/34.jpg)
34
![Page 35: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/35.jpg)
35
![Page 36: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/36.jpg)
36
![Page 37: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/37.jpg)
37
![Page 38: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/38.jpg)
38
![Page 39: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/39.jpg)
39
![Page 40: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/40.jpg)
40
![Page 41: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/41.jpg)
41
![Page 42: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/42.jpg)
42
![Page 43: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/43.jpg)
43
![Page 44: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/44.jpg)
44
![Page 45: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/45.jpg)
45
Example•F(X,Y,Z) = X’Y’Z + X’YZ’ + XYZ’ + XYZ = Σm(1,2,6,7)•There are n=3 inputs, thus we need a 2222-to-1 MUX-to-1 MUX•The first n-1 (=2) inputs serve as the selection linesThe first n-1 (=2) inputs serve as the selection lines
![Page 46: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/46.jpg)
46
Z Y X F
0 0 0 0 F=0
0 0 1 0
0 1 0 1 F=1
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
![Page 47: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/47.jpg)
47
Y X Z F
0 0 0 0 F=Z
0 0 1 1
0 1 0 0 F=0
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
![Page 48: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/48.jpg)
48
Y X Z F
0 0 0 X .Y ´=0
0 0 1 X⊕Y=0
0 1 0 X .Y ´=0
0 1 1 X⊕Y=1
1 0 0 X .Y ´=1
1 0 1 X⊕Y=1
1 1 0 X .Y ´=0
1 1 1 X⊕Y=0
![Page 49: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/49.jpg)
49
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.
![Page 50: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/50.jpg)
50
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 A=B=0, F=CWhen A=B=0, F=C
When A=0, B=1, When A=0, B=1, F=CF=CWhen A=1, B=0, When A=1, B=0, F=CF=CWhen A=B=1, When A=B=1, F=C’F=C’
![Page 51: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/51.jpg)
51
MUX implementation of F(A,B,C) = m(1,3,5,6)
AA
BB
CC
CC
CC
C’C’
FF
![Page 52: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/52.jpg)
52
Or Simply….
F
A B
C
C
C
C
11
10
01
00
![Page 53: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/53.jpg)
53
A larger Example
![Page 54: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/54.jpg)
54
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.
ORORNOTNOT ANDAND
z = xz = x11+ x+ x11’x’x0 0
= = xx11xx00’ + ’ + xx11xx00 + + xx11’x’x0 0 = = xx11 + x + x0 0
z = 0x + 1x’ = x’z = 0x + 1x’ = x’ z = xz = x11xx00 + 0x + 0x00’ = x’ = x11xx00
11
xx11
![Page 55: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/55.jpg)
55
Implementation using decoders: Now we implement the output f1
using an decoder and 3-input OR gates.
![Page 56: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/56.jpg)
56
![Page 57: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/57.jpg)
57
Multiplexers• 2**n 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
![Page 58: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/58.jpg)
58
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!
![Page 59: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/59.jpg)
59
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
![Page 60: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/60.jpg)
60
Decoders
• Selects one of 2**n inputs
• Each AND gate implements one Boolean expression ABC etc.
![Page 61: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/61.jpg)
61
Comparators• 4 address
words, A, B compared.
• Output (A =B)
• Users XOR gates: 1 iff both inputs are same
![Page 62: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/62.jpg)
62
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.
![Page 63: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/63.jpg)
63
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 function’s variables exactly once, either complemented or not complemented.
![Page 64: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/64.jpg)
64
• For example, the minterms for a function having the inputs x and y are:
• Consider the Boolean function,
• Its minterms are:
3A.2 Description of Kmaps and Terminology
![Page 65: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/65.jpg)
65
• Similarly, a function having three inputs, has the minterms that are shown in this diagram.
3A.2 Description of Kmaps and Terminology
![Page 66: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/66.jpg)
66
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.
![Page 67: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/67.jpg)
67
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.
![Page 68: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/68.jpg)
68
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.
3A.3 Kmap Simplification for Two Variables
![Page 69: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/69.jpg)
69
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.
![Page 70: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/70.jpg)
70
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.
![Page 71: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/71.jpg)
71
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?
![Page 72: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/72.jpg)
72
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.
![Page 73: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/73.jpg)
73
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?
![Page 74: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/74.jpg)
74
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?
![Page 75: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/75.jpg)
75
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!
![Page 76: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/76.jpg)
76
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.
![Page 77: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/77.jpg)
77
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.
![Page 78: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/78.jpg)
78
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:
![Page 79: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/79.jpg)
79
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.
![Page 80: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/80.jpg)
80
3A.6 Don’t Care Conditions
• Real circuits don’t 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 don’t care condition.
• They are very helpful to us in Kmap circuit simplification.
![Page 81: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/81.jpg)
81
3A.6 Don’t Care Conditions
• In a Kmap, a don’t care condition is identified by an X in the cell of the minterm(s) for the don’t care inputs, as shown below.
• In performing the simplification, we are free to include or ignore the X’s when creating our groups.
![Page 82: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/82.jpg)
82
3A.6 Don’t Care Conditions
• In one grouping in the Kmap below, we have the function:
![Page 83: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/83.jpg)
83
3A.6 Don’t Care Conditions
• A different grouping gives us the function:
![Page 84: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/84.jpg)
84
3A.6 Don’t 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 don’t care conditions.
![Page 85: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/85.jpg)
85
• 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.
3A Conclusion
![Page 86: T,JK-flip-flop, Midterm 1 Revision Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University](https://reader035.vdocuments.site/reader035/viewer/2022062722/56649f2c5503460f94c46e74/html5/thumbnails/86.jpg)
86
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 don’t care conditions when you can.
3A Conclusion