Professional Documents
Culture Documents
Tut 02
Tut 02
ENGG 2020
Outline
• Gate Level Minimization
• Minterm and Maxterm
• K-Map Method
• Combinational Logic
• Combinational logic circuit
• Adder and Subtractor
• Comparator
• Decoder and Encoder
1
13/10/2020
Outline
• Gate Level Minimization
• Minterm and Maxterm
• K-Map Method
• Combinational Logic
• Combinational logic circuit
• Adder and Subtractor
• Comparator
• Decoder and Encoder
• Maxterm
• If there are 2 variables x and y, there are 4 possible combinations: x+y,
x+y’, x’+y, x’+y’, each of these 4 OR terms is called a maxterm
• If there are N variables, there are 2 maxterms
• A symbol for each maxterm is denoted as 𝑀 , where the subscript j
denotes the decimal equivalent of the binary number of the maxterm
designated
2
13/10/2020
3
13/10/2020
K-Map Method
• General procedure
• Construct truth table.
• Draw K-Map.
• Use truth table to fill out K-Map.
• Find groups in K-Map and generate the minimal expressions.
• We are going to learn 7 rules on how to group adjacent cells
and so achieve complete simplification of terms
B
A 0 1 B
A 0 1
0 0 0 0 0 0
c
1 1 1 1 1 c 1
wrong correct√
4
13/10/2020
B
A 0 1 A 0 1
B
0 0 1 0 0 1
c
𝑭=𝑨+𝑩
1 1 1 1 1 1
wrong correct√
01 0 1 0 0 0
11 0 1 1 1 1
10 0 1
wrong (group of 3)
correct√ (group of 2)
10
10
5
13/10/2020
BC
A 0 1 BC
A 0 1
00 0 1 00 0 1
01 0 1 01 0 1
11 1 1 11 1 1
10 1 1 10 1 1
wrong(Not minimal) correct√
𝑭 = 𝑨𝑩 + 𝑨𝑩 + 𝑨𝑩 𝑭=𝑨+𝑩
11
11
BC
A 0 1 A 0 1
BC
00 0 0 00 0 0
01 0 0 01 0 0
11 0 1 11 0 1
10 1 1 10 1 1
wrong(Not minimal) correct√
12
12
6
13/10/2020
BC
A 0 1 A 0 1
BC
00 0 1 00 0 1
01 0 1 01 0 1
11 1 1 11 1 1
10 1 1 10 1 1
wrong
(Not overlapping so not minimal)
correct√
13
13
BC
A 0 1
00 1 1
01 0 0 𝑭=𝑪
11 0 0
10 1 1
14
14
7
13/10/2020
BC
A 0 1
00 0 1
01 0 0 𝑭 = 𝑨𝑪
11 0 0
10 0 1
15
15
16
8
13/10/2020
AB
CD
00 01 11 10
00 1 1
01 1 1
11
10 1 1 1
17
Adjacent
18
9
13/10/2020
Mirror
ABC
DE 000 001 011 010 110 111 101 100
00 0 4 12 8 24 28 20 16
01 1 5 13 9 25 29 21 17
11 3 7 15 11 27 31 23 19
10 2 6 14 10 26 30 22 18
Adjacent
19
19
Adjacent Adjacent
20
20
10
13/10/2020
10
ABC
DE 000 001 011 010 110 111 101 100
00 1 1 1 1
01 1 1
11 1 1
10 1 1 1 1
21
21
ABC
DE 000 001 011 010 110 111 101 100
00 1 1 1 1
01 1 1
11 1 1
10 1 1 1 1
22
22
11
13/10/2020
AB
CD 00 01 11 10
00 1 x 0 1
01 1 0 0 1
11 x 0 0 0
10 1 1 0 0
23
Exercises
Using K-Map to simplify the following logical functions
with Sum-of-Product (SOP) forms.
3. 𝑓(𝐴, 𝐵, 𝐶, 𝐷, 𝐸) =
∑𝑚(0, 2, 4, 6, 9, 13,21, 23, 25, 29, 31) [Take-Home]
24
12
13/10/2020
Answer: Exercise 1
• 𝑓 𝐴, 𝐵, 𝐶, 𝐷 = ∏ 𝑀(0, 2, 7, 8, 10, 15).
𝑓 𝐴, 𝐵, 𝐶, 𝐷 = 𝐵𝐶 + 𝐵𝐷 + 𝐵 𝐷 or
𝑓 𝐴, 𝐵, 𝐶, 𝐷 = 𝐶 𝐷 + 𝐵𝐷 + 𝐵 𝐷
AB AB
CD 00 01 11 10 CD 00 01 11 10
00 0 1 1 0 00 0 1 1 0
01 1 1 1 1 01 1 1 1 1
11 1 0 0 1 11 1 0 0 1
10 0 1 1 0 10 0 1 1 0
25
Outline
• Gate Level Minimization
• Minterm and Maxterm
• K-Map Method
• Combinational Logic
• Combinational logic circuit
• Adder and Subtractor
• Comparator
• Decoder and Encoder
26
13
13/10/2020
Combinational Circuit
• A combinational circuit consists of input variables,
logic gates, and output variables
• Combinational logic gates react to the values of the
signals at their inputs and produce the value of the
output signal
27
Example: BCD-to-Excess3
• Truth table
28
14
13/10/2020
Example: BCD-to-Excess3
• Since we have 4 inputs and
4 outputs, 4x 4-variable K-
maps are constructed for w,
x, y, and z
• Some of cells are X (i.e.
“Don’t Care”)
29
30
15
13/10/2020
31
32
16
13/10/2020
33
Full Adder
34
17
13/10/2020
Subtractor
• Subtractor is similar to adder, except that it takes a
borrow-in bit into consideration.
• Truth table:
Full Subtractor (FS)
35
Example:Four-bit adder–subtractor
• Four-bit adder–subtractor (with overflow detection)
36
18
13/10/2020
Four-bit adder
• 1001 + 0101
0 1 1 0 0 0 1 1
S3 S2 S1 S0 C4 C3 C2 C1 C0 V
1 1 1 0 0 0 0 1 0 0
37
Four-bit subtractor
• 0011 – 1010 = 0011 + 0101 + 1
1 0 0 0 1 1 0 1
S3 S2 S1 S0 C4 C3 C2 C1 C0 V
1 0 0 1 0 1 1 1 1 1
38
19
13/10/2020
In Class Exercise 2
• 1010 + 0010
1 0 0 0 1 1 0 0
S3 S2 S1 S0 C4 C3 C2 C1 C0 V
39
• 1010 + 0010
1 0 0 0 1 1 0 0
S3 S2 S1 S0 C4 C3 C2 C1 C0 V
1 1 0 0 0 0 1 0 0 0
40
20
13/10/2020
S3 S2 S1 S0 C4 C3 C2 C1 C0 V
41
Comparator
• Consider a 4-bit comparator to compare the
magnitude of two 4-bit binary numbers, A and B
• After comparison, only one of the following three
outputs will be HIGH
• D1: A = B
• D2: A > B
• D3: A < B
42
21
13/10/2020
Comparator
43
Comparator
44
22
13/10/2020
45
Decoder
46
23
13/10/2020
Encoder
• Encoder is a combinational circuit which is designed
to perform the inverse operation of the decoder.
• By changing the input/output directions, we have
the truth table of 3x8 decoder and 8x3 encoder
47
Encoder
• Logic Circuit of 8x3 Encoder
48
24
13/10/2020
49
50
25
13/10/2020
51
Thanks
52
26