33
م ق گاه ش ن ی دا ق ط ن مرهایرس مدا دhttp://lc-qom.blogfa.com / ا ش گ کدDecoder )) و( ار ک"دگدEncoder ) ی ن ا رخ( می ا+ ن( شی ح وسط ت ده ه ش( ی ه ت ر( ی8 ب ک ر( میه ا گا ش ن ی دا ق ط ن مرهایرس مداهای د د( لای ش ر ا> " ب ی ن ت> ب مhttp://ceit.aut.ac.ir/~szamani/index_files/logic.htm

درس مدارهای منطقی دانشگاه قم / کدگشا Decoder) ) و کدگذار ( Encoder ) تهیه شده توسط حسین امیرخانی

  • Upload
    kerem

  • View
    50

  • Download
    5

Embed Size (px)

DESCRIPTION

درس مدارهای منطقی دانشگاه قم http://lc-qom.blogfa.com / کدگشا Decoder) ) و کدگذار ( Encoder ) تهیه شده توسط حسین امیرخانی مبتنی بر اسلایدهای درس مدارهای منطقی دانشگاه امیرکبیر http://ceit.aut.ac.ir/~szamani/index_files/logic.htm. E. ABC . 0. X. X. X. 0. 0. 0. 0. 0. 0. 0. 0. - PowerPoint PPT Presentation

Citation preview

Page 1: درس مدارهای منطقی دانشگاه قم  / کدگشا  Decoder) ) و کدگذار ( Encoder ) تهیه شده توسط حسین امیرخانی

درس مدارهای منطقی دانشگاه قمhttp://lc-qom.blogfa.com/

((Decoderکدگشا و(Encoderکدگذار )

تهیه شده توسط حسین امیرخانیمبتنی بر اسالیدهای درس مدارهای منطقی دانشگاه امیرکبیر

http://ceit.aut.ac.ir/~szamani/index_files/logic.htm

Page 2: درس مدارهای منطقی دانشگاه قم  / کدگشا  Decoder) ) و کدگذار ( Encoder ) تهیه شده توسط حسین امیرخانی

2

Decoder

ABC ABC ABC ABC ABC ABC ABC ABC

3:8 dec

O0 O1 O2

A

B

C

Enb

S2

S1

S0

O3

O4

O5

O6

O7

A B C O0 O1 O2 O3 O4 O5 O6 O7

0 X X X 0 0 0 0 0 0 0 0

0 0 0 1 0 0 0 0 0 0 00 0 1 0 1 0 0 0 0 0 00 1 0 0 0 1 0 0 0 0 00 1 1 0 0 0 1 0 0 0 01 0 0 0 0 0 0 1 0 0 01 0 1 0 0 0 0 0 1 0 01 1 0 0 0 0 0 0 0 1 01 1 1 0 0 0 0 0 0 0 1

E

11111111

• 2-to-4,• 3-to-8,• …• n-to-2n

Page 3: درس مدارهای منطقی دانشگاه قم  / کدگشا  Decoder) ) و کدگذار ( Encoder ) تهیه شده توسط حسین امیرخانی

3

Decoder

Page 4: درس مدارهای منطقی دانشگاه قم  / کدگشا  Decoder) ) و کدگذار ( Encoder ) تهیه شده توسط حسین امیرخانی

4

Design Using Decoder• Applications:

Implementing General Logic Any combinational circuit can be constructed using decoders

and OR gates!

F1 = A' B C' D + A' B' C D + A B C DF2 = A B C' D' + A B CF3 = (A' + B' + C' + D')

• Example: A ‘B’C’D’ A ‘B’C’D A ‘B’CD’A ‘B’CD A ‘BC’D’ A ‘BC’D A ‘BCD’ A ‘ BCD A B’C’D’ A B’C’D A B’CD’ A B’CD A B C’D’A B C’D A B C D’ A B C D

F 1

F 3

F 2

A

B

C

D

S2

S1

S0

S3

0 1 2 3 4 5 6 7 8 9

10 1 1 12 13 14 15

4:16 dec

Enb

Page 5: درس مدارهای منطقی دانشگاه قم  / کدگشا  Decoder) ) و کدگذار ( Encoder ) تهیه شده توسط حسین امیرخانی

5

Active Low

• Decoder with Active Low Enable Active Low Outputs

G A B Y0 Y1 Y2 Y3

1 X X 1 1 1 10 0 0 0 1 1 10 0 1 1 0 1 10 1 0 1 1 0 10 1 1 1 1 1 0

Page 6: درس مدارهای منطقی دانشگاه قم  / کدگشا  Decoder) ) و کدگذار ( Encoder ) تهیه شده توسط حسین امیرخانی

6

74x139 dual 2-to-4 decoder

Page 7: درس مدارهای منطقی دانشگاه قم  / کدگشا  Decoder) ) و کدگذار ( Encoder ) تهیه شده توسط حسین امیرخانی

7

74x138 3-8 Decoder

Page 8: درس مدارهای منطقی دانشگاه قم  / کدگشا  Decoder) ) و کدگذار ( Encoder ) تهیه شده توسط حسین امیرخانی

8

74x138 3-8 Decoder

Page 9: درس مدارهای منطقی دانشگاه قم  / کدگشا  Decoder) ) و کدگذار ( Encoder ) تهیه شده توسط حسین امیرخانی

9

Using 3-State Buffers Can use 3-state buffers to share a single line for

several devices.

Decoder guarantees that no two buffers are on simultaneously.

Some decoders have hi-Z outputs.

Page 10: درس مدارهای منطقی دانشگاه قم  / کدگشا  Decoder) ) و کدگذار ( Encoder ) تهیه شده توسط حسین امیرخانی

10

Decoders Can build a decoder by smaller decoders

A

B

C

D

S2

S1

S0

S3

0 1 2 3 4 5 6 7 8 9

10 1 1 12 13 14 15

4:16 dec

Enb

3:8 dec

O0 O1 O2

B C D

Enb

S2 S1 S0

O3O4

O5

O6

O7

3:8 dec

O0 O1 O2

B C

D

Enb

S2 S1 S0

O3O4

O5

O6

O7

A

B

C

D

Page 11: درس مدارهای منطقی دانشگاه قم  / کدگشا  Decoder) ) و کدگذار ( Encoder ) تهیه شده توسط حسین امیرخانی

11

Decoders

How to build a 5-32 decoder by using 4-16 and 2-4 decoders?

Page 12: درس مدارهای منطقی دانشگاه قم  / کدگشا  Decoder) ) و کدگذار ( Encoder ) تهیه شده توسط حسین امیرخانی

12

Decoders

• Decoder: a more general term Our focus was on “binary decoders”

Page 13: درس مدارهای منطقی دانشگاه قم  / کدگشا  Decoder) ) و کدگذار ( Encoder ) تهیه شده توسط حسین امیرخانی

13

7-Segment Decoder

• Seven-segment display:7 LEDs (light emitting diodes), each one

controlled by an input1 means “on”, 0 means “off”Display digit “3”?

Set a, b, c, d, g to 1Set e, f to 0

d

a

b

c e

f g

Page 14: درس مدارهای منطقی دانشگاه قم  / کدگشا  Decoder) ) و کدگذار ( Encoder ) تهیه شده توسط حسین امیرخانی

14

7-Segment Decoder

C 5

C 0

C 6

C 3

C 4

C 1

C 2

C 0

C 1

C 2

C 3

C 4

C 5

C 6

BCD-to-7-segment control signal

decoder

A B C D

Page 15: درس مدارهای منطقی دانشگاه قم  / کدگشا  Decoder) ) و کدگذار ( Encoder ) تهیه شده توسط حسین امیرخانی

15

7-Segment Decoder

• 7-Segment Decoder:Input is a 4-bit BCD code 4 inputs (A, B, C,

D).Output is a 7-bit code (a,b,c,d,e,f,g) that

allows for the decimal equivalent to be displayed.

• Example: Input: 0000BCDOutput: 1111110

(a=b=c=d=e=f=1, g=0)d

a

b

c e

f g

Page 16: درس مدارهای منطقی دانشگاه قم  / کدگشا  Decoder) ) و کدگذار ( Encoder ) تهیه شده توسط حسین امیرخانی

16

BCD-to-7Segment Truth Table

11100X001117X01111101106101101101015011001101004111100100113110110100102011000000011111111000000abcdefgABCDDigit abcdefgABCDDigit

XXXXXXX1111XXXXXXX1110XXXXXXX1101XXXXXXX1100XXXXXXX1011XXXXXXX1010111X01110019111111110008

??

10111111110000

1110011

Page 17: درس مدارهای منطقی دانشگاه قم  / کدگشا  Decoder) ) و کدگذار ( Encoder ) تهیه شده توسط حسین امیرخانی

17

K-maps

a = A + B D + C + B' D'b = A + C' D' + C D + B'c = A + B + C' + D

d = B' D' + C D' + B C' D + B' Ce = B' D' + C Df = A + C' D' + B D' + B C'g = A + C D' + B C' + B' C

AB

CD 00 01 11 10

00

01

11

10

D

B

C

A

1 0 X 1

0 1 X 1

1 1 X X

1 1 X X

K-map for a

AB

CD 00 01 11 10

00

01

11

10

D

B

C

A

1 1 X 1

1 0 X 1

1 1 X X

1 0 X X

K-map for b

AB

CD 00 01 11 10

00

01

11

10

D

B

C

A

1 1 X 1

1 1 X 1

1 1 X X

0 1 X X

K-map for c

AB

CD 00 01 11 10

00

01

11

10

D

B

C

A

1 0 X 1

0 1 X 0

1 0 X X

1 1 X X

K-map for d

AB

CD 00 01 11 10

00

01

11

10

D

B

C

A

1 0 X 1

0 0 X 0

0 0 X X

1 1 X X

K-map for e

AB

CD 00 01 11 10

00

01

11

10

D

B

C

A

1 1 X 1

0 1 X 1

0 0 X X

0 1 X X

K-map for f

AB

CD 00 01 11 10

00

01

11

10

D

B

C

A

0 1 X 1

0 1 X 1

1 0 X X

1 1 X X

K-map for g

Page 18: درس مدارهای منطقی دانشگاه قم  / کدگشا  Decoder) ) و کدگذار ( Encoder ) تهیه شده توسط حسین امیرخانی

تمرین های آزمون ارشد

04/22/2023

سؤال سال60 1381

63 1382

Page 19: درس مدارهای منطقی دانشگاه قم  / کدگشا  Decoder) ) و کدگذار ( Encoder ) تهیه شده توسط حسین امیرخانی

Encoder

Page 20: درس مدارهای منطقی دانشگاه قم  / کدگشا  Decoder) ) و کدگذار ( Encoder ) تهیه شده توسط حسین امیرخانی

20

Encoder• Encoder:

the inverse operation of a decoder. Has 2n input lines and n output lines. The output lines generate the binary

equivalent of the input line whose value is 1.

I0

I1

I2

I3

z1

z2

4-2Binary

Encoder

Page 21: درس مدارهای منطقی دانشگاه قم  / کدگشا  Decoder) ) و کدگذار ( Encoder ) تهیه شده توسط حسین امیرخانی

21

Encoder

3:8 decoder

O0 O1 O2

A

B

C

S2

S1

S0

O3

O4

O5

O6

O7

8:3 encoder

I0 I1 I2

A

B

C

Z2

Z1

Z0

I3

I4

I5

I6

I7

Page 22: درس مدارهای منطقی دانشگاه قم  / کدگشا  Decoder) ) و کدگذار ( Encoder ) تهیه شده توسط حسین امیرخانی

22

Encoder Circuit Design• Example:

8-3 Binary Encoder

A0 = D1 + D3 + D5 + D7

A1 = D2 + D3 + D6 + D7

A2 = D4 + D5 + D6 + D7

Page 23: درس مدارهای منطقی دانشگاه قم  / کدگشا  Decoder) ) و کدگذار ( Encoder ) تهیه شده توسط حسین امیرخانی

23

Encoder CircuitWith Enable

With Acknowledge

Page 24: درس مدارهای منطقی دانشگاه قم  / کدگشا  Decoder) ) و کدگذار ( Encoder ) تهیه شده توسط حسین امیرخانی

24

Application

The number of inputs: large fewer lines

Page 25: درس مدارهای منطقی دانشگاه قم  / کدگشا  Decoder) ) و کدگذار ( Encoder ) تهیه شده توسط حسین امیرخانی

25

Encoder Design Issues Only one input can be active at any

given time. If two inputs are active simultaneously,

the output produces an undefined combination (for example, if D3 and D6 are 1 simultaneously,

the output of the encoder will be 111.

A0 = D1 + D3 + D5 + D7

A1 = D2 + D3 + D6 + D7

A2 = D4 + D5 + D6 + D7

Page 26: درس مدارهای منطقی دانشگاه قم  / کدگشا  Decoder) ) و کدگذار ( Encoder ) تهیه شده توسط حسین امیرخانی

26

Priority Encoder Multiple asserted inputs are allowed;

one has priority over all others.

Page 27: درس مدارهای منطقی دانشگاه قم  / کدگشا  Decoder) ) و کدگذار ( Encoder ) تهیه شده توسط حسین امیرخانی

27

K-Maps

Page 28: درس مدارهای منطقی دانشگاه قم  / کدگشا  Decoder) ) و کدگذار ( Encoder ) تهیه شده توسط حسین امیرخانی

28

Circuit

Page 29: درس مدارهای منطقی دانشگاه قم  / کدگشا  Decoder) ) و کدگذار ( Encoder ) تهیه شده توسط حسین امیرخانی

29

8-3 Priority Encoder

Page 30: درس مدارهای منطقی دانشگاه قم  / کدگشا  Decoder) ) و کدگذار ( Encoder ) تهیه شده توسط حسین امیرخانی

30

74x148

• Features: inputs and outputs are active low. EI_L must be asserted for any of its outputs to

be asserted. GS_L is asserted when the device is enabled

and one or more of the request inputs is asserted. (“Group Select” or “Got Something.” )

EO_L is an enable output designed to be connected to the EI_L input of another ’148 that handles lower-priority requests. It is asserted if EI_L is asserted but no request

input is asserted; thus, a lower-priority ’148 may be enabled.

Page 31: درس مدارهای منطقی دانشگاه قم  / کدگشا  Decoder) ) و کدگذار ( Encoder ) تهیه شده توسط حسین امیرخانی

31

74x148 Truth Table

Page 32: درس مدارهای منطقی دانشگاه قم  / کدگشا  Decoder) ) و کدگذار ( Encoder ) تهیه شده توسط حسین امیرخانی

33

Datasheets http://www.techlearner.com/C&D/index.htm http://users.otenet.gr/~athsam/database.htm Some sample datasheets in the course site.

Page 33: درس مدارهای منطقی دانشگاه قم  / کدگشا  Decoder) ) و کدگذار ( Encoder ) تهیه شده توسط حسین امیرخانی

تمرین5.13تمرین Holdsworthکتاب •

34