ch. 6 combinational logic circuitsks.ac.kr/kimbh/ksu-lectures/lecture2006/se019-ch6.pdf ·...

39
1 Ch. 6 Combinational Logic Circuits Logic Circuits Combinational Logic Circuits Sequential Logic Circuits Combinational Logic Circuits Adders Subtracters Code Converters Parity Generator/Checker Decoders Incoders Multiplexer/Demultiplexer

Upload: others

Post on 29-May-2020

14 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Ch. 6 Combinational Logic Circuitsks.ac.kr/kimbh/KSU-Lectures/Lecture2006/SE019-ch6.pdf · 2006-04-29 · Combinational Logic Circuits 18 Logic Functions ÆCheck the K-Map ! 00000

1

Ch. 6 Combinational Logic Circuits

Logic CircuitsCombinational Logic CircuitsSequential Logic Circuits

Combinational Logic CircuitsAddersSubtractersCode ConvertersParity Generator/CheckerDecodersIncodersMultiplexer/Demultiplexer

Page 2: Ch. 6 Combinational Logic Circuitsks.ac.kr/kimbh/KSU-Lectures/Lecture2006/SE019-ch6.pdf · 2006-04-29 · Combinational Logic Circuits 18 Logic Functions ÆCheck the K-Map ! 00000

2

Logic CircuitsCombinational Logic Circuits : Inputs, Logic gates, Outputs

Sequential Logic Circuits : Combinational Logic Circuits + Memory (Flip/Flop)

Page 3: Ch. 6 Combinational Logic Circuitsks.ac.kr/kimbh/KSU-Lectures/Lecture2006/SE019-ch6.pdf · 2006-04-29 · Combinational Logic Circuits 18 Logic Functions ÆCheck the K-Map ! 00000

3

Combinational Logic Circuits

AddersHalf Adder

An arithmetic circuit that generates the sum of two binary bits.

Page 4: Ch. 6 Combinational Logic Circuitsks.ac.kr/kimbh/KSU-Lectures/Lecture2006/SE019-ch6.pdf · 2006-04-29 · Combinational Logic Circuits 18 Logic Functions ÆCheck the K-Map ! 00000

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

=

Page 5: Ch. 6 Combinational Logic Circuitsks.ac.kr/kimbh/KSU-Lectures/Lecture2006/SE019-ch6.pdf · 2006-04-29 · Combinational Logic Circuits 18 Logic Functions ÆCheck the K-Map ! 00000

5

0 0

0 0 0 0

0 0

S

A B A BA B

= += ⊕

0

0 0

outC CA B

=

Circuit Design

Page 6: Ch. 6 Combinational Logic Circuitsks.ac.kr/kimbh/KSU-Lectures/Lecture2006/SE019-ch6.pdf · 2006-04-29 · Combinational Logic Circuits 18 Logic Functions ÆCheck the K-Map ! 00000

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

Page 7: Ch. 6 Combinational Logic Circuitsks.ac.kr/kimbh/KSU-Lectures/Lecture2006/SE019-ch6.pdf · 2006-04-29 · Combinational Logic Circuits 18 Logic Functions ÆCheck the K-Map ! 00000

7

Full AdderA combinational circuit that forms the arithmetic sum of three input bits.

Page 8: Ch. 6 Combinational Logic Circuitsks.ac.kr/kimbh/KSU-Lectures/Lecture2006/SE019-ch6.pdf · 2006-04-29 · Combinational Logic Circuits 18 Logic Functions ÆCheck the K-Map ! 00000

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

= + +

= + ⊕

Page 9: Ch. 6 Combinational Logic Circuitsks.ac.kr/kimbh/KSU-Lectures/Lecture2006/SE019-ch6.pdf · 2006-04-29 · Combinational Logic Circuits 18 Logic Functions ÆCheck the K-Map ! 00000

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

= + +

= + ⊕

Page 10: Ch. 6 Combinational Logic Circuitsks.ac.kr/kimbh/KSU-Lectures/Lecture2006/SE019-ch6.pdf · 2006-04-29 · Combinational Logic Circuits 18 Logic Functions ÆCheck the K-Map ! 00000

10

Circuit Design by using the FA Symbol

Page 11: Ch. 6 Combinational Logic Circuitsks.ac.kr/kimbh/KSU-Lectures/Lecture2006/SE019-ch6.pdf · 2006-04-29 · Combinational Logic Circuits 18 Logic Functions ÆCheck the K-Map ! 00000

11

Circuit Design by using Two HA + OR Gate

1A1BinC

1∑outC

Page 12: Ch. 6 Combinational Logic Circuitsks.ac.kr/kimbh/KSU-Lectures/Lecture2006/SE019-ch6.pdf · 2006-04-29 · Combinational Logic Circuits 18 Logic Functions ÆCheck the K-Map ! 00000

12

(Ex. 6.1) 4-Bit Binary Adder

Page 13: Ch. 6 Combinational Logic Circuitsks.ac.kr/kimbh/KSU-Lectures/Lecture2006/SE019-ch6.pdf · 2006-04-29 · Combinational Logic Circuits 18 Logic Functions ÆCheck the K-Map ! 00000

13

4-Bit Binary Adder by 7483

Look-ahead carryReduce time delay

Page 14: Ch. 6 Combinational Logic Circuitsks.ac.kr/kimbh/KSU-Lectures/Lecture2006/SE019-ch6.pdf · 2006-04-29 · Combinational Logic Circuits 18 Logic Functions ÆCheck the K-Map ! 00000

14

Page 15: Ch. 6 Combinational Logic Circuitsks.ac.kr/kimbh/KSU-Lectures/Lecture2006/SE019-ch6.pdf · 2006-04-29 · Combinational Logic Circuits 18 Logic Functions ÆCheck the K-Map ! 00000

15

8-Bit Binary Adder by 74HC283

Page 16: Ch. 6 Combinational Logic Circuitsks.ac.kr/kimbh/KSU-Lectures/Lecture2006/SE019-ch6.pdf · 2006-04-29 · Combinational Logic Circuits 18 Logic Functions ÆCheck the K-Map ! 00000

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

Page 17: Ch. 6 Combinational Logic Circuitsks.ac.kr/kimbh/KSU-Lectures/Lecture2006/SE019-ch6.pdf · 2006-04-29 · Combinational Logic Circuits 18 Logic Functions ÆCheck the K-Map ! 00000

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

Page 18: Ch. 6 Combinational Logic Circuitsks.ac.kr/kimbh/KSU-Lectures/Lecture2006/SE019-ch6.pdf · 2006-04-29 · Combinational Logic Circuits 18 Logic Functions ÆCheck the K-Map ! 00000

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

= + +

= + +

= + ⊕

Page 19: Ch. 6 Combinational Logic Circuitsks.ac.kr/kimbh/KSU-Lectures/Lecture2006/SE019-ch6.pdf · 2006-04-29 · Combinational Logic Circuits 18 Logic Functions ÆCheck the K-Map ! 00000

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

Page 20: Ch. 6 Combinational Logic Circuitsks.ac.kr/kimbh/KSU-Lectures/Lecture2006/SE019-ch6.pdf · 2006-04-29 · Combinational Logic Circuits 18 Logic Functions ÆCheck the K-Map ! 00000

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

= += ⊕

Page 21: Ch. 6 Combinational Logic Circuitsks.ac.kr/kimbh/KSU-Lectures/Lecture2006/SE019-ch6.pdf · 2006-04-29 · Combinational Logic Circuits 18 Logic Functions ÆCheck the K-Map ! 00000

21

Code ConvertersBinary Code Gray Code

Page 22: Ch. 6 Combinational Logic Circuitsks.ac.kr/kimbh/KSU-Lectures/Lecture2006/SE019-ch6.pdf · 2006-04-29 · Combinational Logic Circuits 18 Logic Functions ÆCheck the K-Map ! 00000

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

Page 23: Ch. 6 Combinational Logic Circuitsks.ac.kr/kimbh/KSU-Lectures/Lecture2006/SE019-ch6.pdf · 2006-04-29 · Combinational Logic Circuits 18 Logic Functions ÆCheck the K-Map ! 00000

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

Page 24: Ch. 6 Combinational Logic Circuitsks.ac.kr/kimbh/KSU-Lectures/Lecture2006/SE019-ch6.pdf · 2006-04-29 · Combinational Logic Circuits 18 Logic Functions ÆCheck the K-Map ! 00000

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

Page 25: Ch. 6 Combinational Logic Circuitsks.ac.kr/kimbh/KSU-Lectures/Lecture2006/SE019-ch6.pdf · 2006-04-29 · Combinational Logic Circuits 18 Logic Functions ÆCheck the K-Map ! 00000

25

2-to-4 decoder : Fig. 6-15

Page 26: Ch. 6 Combinational Logic Circuitsks.ac.kr/kimbh/KSU-Lectures/Lecture2006/SE019-ch6.pdf · 2006-04-29 · Combinational Logic Circuits 18 Logic Functions ÆCheck the K-Map ! 00000

26

Active Low Output 2-to-4 decoder with an Enable : Fig. 6-16

1A

0A

E

1D2D

0D

3D

Page 27: Ch. 6 Combinational Logic Circuitsks.ac.kr/kimbh/KSU-Lectures/Lecture2006/SE019-ch6.pdf · 2006-04-29 · Combinational Logic Circuits 18 Logic Functions ÆCheck the K-Map ! 00000

27

3-to-8 decoder Table 6-6Figs. 6-17, 18

Page 28: Ch. 6 Combinational Logic Circuitsks.ac.kr/kimbh/KSU-Lectures/Lecture2006/SE019-ch6.pdf · 2006-04-29 · Combinational Logic Circuits 18 Logic Functions ÆCheck the K-Map ! 00000

28

3-to-8 decoder IC : 74138

Page 29: Ch. 6 Combinational Logic Circuitsks.ac.kr/kimbh/KSU-Lectures/Lecture2006/SE019-ch6.pdf · 2006-04-29 · Combinational Logic Circuits 18 Logic Functions ÆCheck the K-Map ! 00000

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

Page 30: Ch. 6 Combinational Logic Circuitsks.ac.kr/kimbh/KSU-Lectures/Lecture2006/SE019-ch6.pdf · 2006-04-29 · Combinational Logic Circuits 18 Logic Functions ÆCheck the K-Map ! 00000

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

= + + += + + += + + +

Page 31: Ch. 6 Combinational Logic Circuitsks.ac.kr/kimbh/KSU-Lectures/Lecture2006/SE019-ch6.pdf · 2006-04-29 · Combinational Logic Circuits 18 Logic Functions ÆCheck the K-Map ! 00000

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

Page 32: Ch. 6 Combinational Logic Circuitsks.ac.kr/kimbh/KSU-Lectures/Lecture2006/SE019-ch6.pdf · 2006-04-29 · Combinational Logic Circuits 18 Logic Functions ÆCheck the K-Map ! 00000

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

Page 33: Ch. 6 Combinational Logic Circuitsks.ac.kr/kimbh/KSU-Lectures/Lecture2006/SE019-ch6.pdf · 2006-04-29 · Combinational Logic Circuits 18 Logic Functions ÆCheck the K-Map ! 00000

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= + + +

Page 34: Ch. 6 Combinational Logic Circuitsks.ac.kr/kimbh/KSU-Lectures/Lecture2006/SE019-ch6.pdf · 2006-04-29 · Combinational Logic Circuits 18 Logic Functions ÆCheck the K-Map ! 00000

34

Logic diagram for a 4-to-1-line multiplexer

Page 35: Ch. 6 Combinational Logic Circuitsks.ac.kr/kimbh/KSU-Lectures/Lecture2006/SE019-ch6.pdf · 2006-04-29 · Combinational Logic Circuits 18 Logic Functions ÆCheck the K-Map ! 00000

35

Logic diagram for a 8-to-1-line multiplexer : 74151

Page 36: Ch. 6 Combinational Logic Circuitsks.ac.kr/kimbh/KSU-Lectures/Lecture2006/SE019-ch6.pdf · 2006-04-29 · Combinational Logic Circuits 18 Logic Functions ÆCheck the K-Map ! 00000

36

Demultiplexer

Page 37: Ch. 6 Combinational Logic Circuitsks.ac.kr/kimbh/KSU-Lectures/Lecture2006/SE019-ch6.pdf · 2006-04-29 · Combinational Logic Circuits 18 Logic Functions ÆCheck the K-Map ! 00000

37

1x4 Demultiplexer

Page 38: Ch. 6 Combinational Logic Circuitsks.ac.kr/kimbh/KSU-Lectures/Lecture2006/SE019-ch6.pdf · 2006-04-29 · Combinational Logic Circuits 18 Logic Functions ÆCheck the K-Map ! 00000

38

1x16 Demultiplexer

Page 39: Ch. 6 Combinational Logic Circuitsks.ac.kr/kimbh/KSU-Lectures/Lecture2006/SE019-ch6.pdf · 2006-04-29 · Combinational Logic Circuits 18 Logic Functions ÆCheck the K-Map ! 00000

39

Homework3, 6, 9, 10