ch. 6 combinational logic circuitsks.ac.kr/kimbh/ksu-lectures/lecture2006/se019-ch6.pdf ·...
TRANSCRIPT
1
Ch. 6 Combinational Logic Circuits
Logic CircuitsCombinational Logic CircuitsSequential Logic Circuits
Combinational Logic CircuitsAddersSubtractersCode ConvertersParity Generator/CheckerDecodersIncodersMultiplexer/Demultiplexer
2
Logic CircuitsCombinational Logic Circuits : Inputs, Logic gates, Outputs
Sequential Logic Circuits : Combinational Logic Circuits + Memory (Flip/Flop)
3
Combinational Logic Circuits
AddersHalf Adder
An arithmetic circuit that generates the sum of two binary bits.
4
Sum and Carry Functions
0 0
0 0 0 0
0 0
S
A B A BA B
≡
= += ⊕
∑
0
0 0
outC CA B
≡
=
5
0 0
0 0 0 0
0 0
S
A B A BA B
≡
= += ⊕
∑
0
0 0
outC CA B
≡
=
Circuit Design
6
0 0
0 0 0 0
0 0
S
A B A BA B
≡
= += ⊕
∑
0
0 0
outC CA B
≡
=
Circuit Design by using the HA Symbol
7
Full AdderA combinational circuit that forms the arithmetic sum of three input bits.
8
Sum and Carry Functions
0 0
1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1
1 1 1 1
1 1
( ) ( )
( ) ( )
in in in in
in in
in in
in
S
A B C A B C A B C A B CA B A B C A B A B C
A B C A B CA B C
≡
= + + +
= + + +
= ⊕ + ⊕
= ⊕ ⊕
∑
0
1 1 1 1 1 1
1 1 1 1( )
out
in in
in
C CA B A B C A B CA B A B C
≡
= + +
= + ⊕
9
Circuit Design
0 0
1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1
1 1 1 1
1 1
( ) ( )
( ) ( )
in in in in
in in
in in
in
S
A B C A B C A B C A B CA B A B C A B A B C
A B C A B CA B C
≡
= + + +
= + + +
= ⊕ + ⊕
= ⊕ ⊕
∑
0
1 1 1 1 1 1
1 1 1 1( )
out
in in
in
C CA B A B C A B CA B A B C
≡
= + +
= + ⊕
10
Circuit Design by using the FA Symbol
11
Circuit Design by using Two HA + OR Gate
1A1BinC
1∑outC
12
(Ex. 6.1) 4-Bit Binary Adder
13
4-Bit Binary Adder by 7483
Look-ahead carryReduce time delay
14
15
8-Bit Binary Adder by 74HC283
16
Combinational Logic Circuits
0 0 0 0 0
0 0
D A B A BA B
= +
= ⊕Subtractors
Half Subtractor
1 0 0rB A B=
0 0 0 0
0 1 1 1
1 0 0 1
1 1 0 0
0A 0B 1rB 0D
0A0D
1rB
0B
17
Combinational Logic Circuits
Full Subtractor
0 0 0 0 0
1
1
0 1 1 1 0
1 0 0 0 1
1 0 1 0 0
1 1 0 0 0
1
0 0 1 1
0 1 0 1
1 1 1 1
2rB1A 1B 1rB 0D
18
Combinational Logic Circuits
Logic Functions Check the K-Map !
0 0 0 0 0
1
1
0 1 1 1 0
1 0 0 0 1
1 0 1 0 0
1 1 0 0 0
1
0 0 1 1
0 1 0 1
1 1 1 1
2rB1A 1B 1rB 0D 0 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1
1 1 1
( ) ( )r r r r
r r
r
D A B B A B B A B B A B BA B A B B A B A B B
A B B
= + + +
= + + += ⊕ ⊕
2 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1
1 1 1 1 1
( )
( )
r r r
r
r
B A B A B B A B BA B A B A B B
A B A B B
= + +
= + +
= + ⊕
19
Combinational Logic Circuits
Circuit Design
0 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1
1 1 1
( ) ( )r r r r
r r
r
D A B B A B B A B B A B BA B A B B A B A B B
A B B
= + + +
= + + += ⊕ ⊕
2 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1
1 1 1 1 1
( )
( )
r r r
r
r
B A B A B B A B BA B A B A B B
A B A B B
= + +
= + +
= + ⊕
0D
2rB
1A1B1rB
20
Code ConvertersBinary Code Gray Code
BCD 2421 Code : p119
Binary code Gray code
0
1
1
0
0
1
1
0
0 0 0 0 0
0 0 1 0 0
1
0 1 1 0 1
1 0 0 1 1
1 0 1 1 1
1 1 0 1 0
0
0 1 0 0
1 1 1 1
2A 1A 0G1G0A 2G
2 2G A=
1 2 1 2 1
2 1
G A A A AA A
= += ⊕
0 1 0 1 0
1 0
G A A A AA A
= += ⊕
21
Code ConvertersBinary Code Gray Code
22
Parity Generator 3 Bits Odd parity
0 0 0 1
0 0 1 0
0 1 0 0
0 1 1 1
1 0 0 0
1 0 1 1
1 1 0 1
1 1 1 0
0A2A 1A P2 1 0 2 1 0 2 1 0 2 1 0
2 1 2 1 0 2 1 2 1 0
2 1 0 2 1 0
2 1 0
( ) ( )
( ) ( )
P A A A A A A A A A A A A
A A A A A A A A A A
A A A A A AA A A
= + + +
= + + +
= ⊕ + ⊕
= ⊕ ⊕
2A1A
0A
23
Parity Checker Odd parity checker : Table 6-4, p123
2 1 0 2 1 0 2 1 0 2 1 0 2 1 0 2 1 0
2 1 0 2 1 0
2 1 0 0 2 1 0 0 2 1 0 0 2 1 0 0
2 1 2 1 0 0 2 1 2 1 0 0
2 1 0 2 1 0
2 1
( ) ( ) ( ) ( )
( )( ) ( )( )
( )( ) ( )( )( )
C A A A P A A A P A A A P A A A P A A A P A A A P
A A A P A A A P
A A A P A P A A A P A P A A A P A P A A A P A P
A A A A A P A P A A A A A P A P
A A A P A A A PA A
= + + + + +
+ +
= + + + + + + +
= + + + + +
= ⊕ ⊕ + ⊕ ⊕
= ⊕ ⊕ 0
2 1 0
( )A PA A A P
⊕= ⊕ ⊕ ⊕
2A1A0A
P
24
DecodersDecoding is the conversion of an -bit input code to an -bit output code with such that each valid input code word produces an unique output code -to- -line decoder.
2nn m≤ ≤n m
n m
25
2-to-4 decoder : Fig. 6-15
26
Active Low Output 2-to-4 decoder with an Enable : Fig. 6-16
1A
0A
E
1D2D
0D
3D
27
3-to-8 decoder Table 6-6Figs. 6-17, 18
28
3-to-8 decoder IC : 74138
29
EncodersAn encoder is a digital function that performs the inverse of a decoder.An encoder has (or fewer) input lines and output lines, where the output lines generate the binary code corresponding to the input value.
2n n
30
Octal-to-Binary Encoder, Table 6-8
0 1 3 5 7
1 2 3 6 7
2 4 5 6 7
A D D D DA D D D DA D D D D
= + + += + + += + + +
31
Implementation of the Octal-to-Binary Encoder: Fig. 6-21
0
1
2
3
4
5
6
7
DDDDDDDD
0A0 1 3 5 7
1 2 3 6 7
2 4 5 6 7
A D D D DA D D D DA D D D D
= + + += + + += + + +1A
2A
32
Multiplexer (MUX)A multiplexer is a combinational circuit that selects binary information from one of many inputs lines and directs the information to a single output line. data selector
Input lines : Selection inputs :
2n
n
33
(Ex. 6.2) 4-to-1-line multiplexer
( ) ( ) ( ) ( )1 0 0 1 0 1 1 0 2 1 0 3Y S S I S S I S S I S S I= + + +
34
Logic diagram for a 4-to-1-line multiplexer
35
Logic diagram for a 8-to-1-line multiplexer : 74151
36
Demultiplexer
37
1x4 Demultiplexer
38
1x16 Demultiplexer
39
Homework3, 6, 9, 10