57
Automation Systems Group Einführung in die technische Informatik Christopher Kruegel [email protected] http://www.auto.tuwien.ac.at/~chris Einfuehrung in die technische Informatik 2 Automation Systems Group Logische Schaltungen System mit – Eingängen – Ausgängen interne Logik die Eingänge auf Ausgänge abbildet Einfache Schaltungen kein innerer Zustand bestimmter Eingangszustand wird immer auf den selben Ausgangszustand abgebildet – Beispiel Multiplexer, Addierer

Einf hrung in die technische Informatik - auto.tuwien.ac.atchris/teaching/slides/Uebung1.pdf · Einfuehrung in die technische Informatik 3 Automation Systems Group Logische Schaltungen

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Einf hrung in die technische Informatik - auto.tuwien.ac.atchris/teaching/slides/Uebung1.pdf · Einfuehrung in die technische Informatik 3 Automation Systems Group Logische Schaltungen

Automation Systems Group

Einführungin die technische Informatik

Christopher Kruegel [email protected]

http://www.auto.tuwien.ac.at/~chris

Einfuehrung in die technische Informatik 2

Automation Systems Group

Logische Schaltungen

• System mit– Eingängen

– Ausgängen

– interne Logik die Eingänge auf Ausgänge abbildet

• Einfache Schaltungen– kein innerer Zustand

– bestimmter Eingangszustand wird immer auf den selben

Ausgangszustand abgebildet

– Beispiel• Multiplexer, Addierer

Page 2: Einf hrung in die technische Informatik - auto.tuwien.ac.atchris/teaching/slides/Uebung1.pdf · Einfuehrung in die technische Informatik 3 Automation Systems Group Logische Schaltungen

Einfuehrung in die technische Informatik 3

Automation Systems Group

Logische Schaltungen

• Komplexe (sequentielle) Schaltungen– haben inneren Zustand– bestimmter Eingangszustand kann auf unterschiedliche

Ausgangszustände abgebildet werden– Beispiel

• Zähler

• Logische Schaltungen können auf unterschiedlichenAbstraktionsebenen betrachtet werden

! In dieser Vorlesung sind logische Grundschaltungen(Grundgatter) die Basisbausteine• (N)AND Gatter, (N)OR Gatter, NOT Gatter• keine Transistoren werden mehr berücksichtigt

Einfuehrung in die technische Informatik 4

Automation Systems Group

Logische Schaltungen

• Einfache logische Schaltungen

– können durch Boolsche Funktionen beschrieben werden

– Eingangszustand wird durch Eingangsvariablen beschrieben

– Ausgangszustand wird durch Ausgangsvariablen

beschrieben

– jeder Ausgangsvariable kann eine Funktion zugeordnet

werden, die von allen Eingangsvariablen abhängen kann

Page 3: Einf hrung in die technische Informatik - auto.tuwien.ac.atchris/teaching/slides/Uebung1.pdf · Einfuehrung in die technische Informatik 3 Automation Systems Group Logische Schaltungen

Einfuehrung in die technische Informatik 5

Automation Systems Group

Boolsche Funktionen

• Boolsche Funktion

• Wahrheitstabelle

– 2n Einträge, einen für jede mögliche Belegung

!

f (b1,b2,...,bn )"{true, false}

0/11111

..........

0/11000

0/10000

f(...)bn...b2b1

Einfuehrung in die technische Informatik 6

Automation Systems Group

Logische Schaltungen

• AND Grundgatter

&b1b2

b3

bn

a...

!

b1"b

2" ..."bn #

a = true if ($bi) bi = true

a = false else

% & '

000 .. 001

111 .. 111

..........

000 .. 010

000 .. 000

abnb3 .. b(n-1)b2b1

Page 4: Einf hrung in die technische Informatik - auto.tuwien.ac.atchris/teaching/slides/Uebung1.pdf · Einfuehrung in die technische Informatik 3 Automation Systems Group Logische Schaltungen

Einfuehrung in die technische Informatik 7

Automation Systems Group

Logische Schaltungen

• OR Grundgatter

!1b1b2

b3

bn

a...

!

b1"b

2" ..."bn #

a = true if ($bi) bi = true

a = false else

% & '

100 .. 001

111 .. 111

..........

100 .. 010

000 .. 000

abnb3 .. b(n-1)b2b1

Einfuehrung in die technische Informatik 8

Automation Systems Group

Logische Schaltungen

• NOT Grundgatter

b a

!

¬b"a = true if (b = false)

a = false else

# $ %

01

10

ab

Page 5: Einf hrung in die technische Informatik - auto.tuwien.ac.atchris/teaching/slides/Uebung1.pdf · Einfuehrung in die technische Informatik 3 Automation Systems Group Logische Schaltungen

Einfuehrung in die technische Informatik 9

Automation Systems Group

Beispiel - Wahrheitstabelle

Die Wahrheitstabelle kann zu jeder Funktion

erstellt werden.

Beispiel:

!

(A"B"C"D)#

(A"B"¬C"D)#

(A"B"C"¬D)#

(A"B"¬C"¬D)#

(C"D)

Einfuehrung in die technische Informatik 10

Automation Systems Group

Beispiel - Wahrheitstabelle

Funktion

!

(A"B"C"D)#

(A"B"¬C"D)#

(A"B"C"¬D)#

(A"B"¬C"¬D)#

(C"D)

1111

0111

1011

0011

1101

0101

1001

0001

1110

0110

1010

0010

1100

0100

1000

0000

f(..)DCBA

Page 6: Einf hrung in die technische Informatik - auto.tuwien.ac.atchris/teaching/slides/Uebung1.pdf · Einfuehrung in die technische Informatik 3 Automation Systems Group Logische Schaltungen

Einfuehrung in die technische Informatik 11

Automation Systems Group

Beispiel - Wahrheitstabelle

Funktion

!

(A"B"C"D)#

(A"B"¬C"D)#

(A"B"C"¬D)#

(A"B"¬C"¬D)#

(C"D)

11111

0111

1011

0011

1101

0101

1001

0001

1110

0110

1010

0010

1100

0100

1000

0000

f(..)DCBA

Einfuehrung in die technische Informatik 12

Automation Systems Group

Beispiel - Wahrheitstabelle

Funktion

!

(A"B"C"D)#

(A"B"¬C"D)#

(A"B"C"¬D)#

(A"B"¬C"¬D)#

(C"D)

11111

0111

11011

0011

1101

0101

1001

0001

1110

0110

1010

0010

1100

0100

1000

0000

f(..)DCBA

Page 7: Einf hrung in die technische Informatik - auto.tuwien.ac.atchris/teaching/slides/Uebung1.pdf · Einfuehrung in die technische Informatik 3 Automation Systems Group Logische Schaltungen

Einfuehrung in die technische Informatik 13

Automation Systems Group

Beispiel - Wahrheitstabelle

Funktion

!

(A"B"C"D)#

(A"B"¬C"D)#

(A"B"C"¬D)#

(A"B"¬C"¬D)#

(C"D)

11111

10111

11011

10011

1101

0101

1001

0001

1110

0110

1010

0010

1100

0100

1000

0000

f(..)DCBA

Einfuehrung in die technische Informatik 14

Automation Systems Group

Beispiel - Wahrheitstabelle

Funktion

!

(A"B"C"D)#

(A"B"¬C"D)#

(A"B"C"¬D)#

(A"B"¬C"¬D)#

(C"D)

11111

10111

11011

10011

11101

0101

1001

0001

11110

0110

1010

0010

11100

0100

1000

0000

f(..)DCBA

Page 8: Einf hrung in die technische Informatik - auto.tuwien.ac.atchris/teaching/slides/Uebung1.pdf · Einfuehrung in die technische Informatik 3 Automation Systems Group Logische Schaltungen

Einfuehrung in die technische Informatik 15

Automation Systems Group

Beispiel - Wahrheitstabelle

Funktion

!

(A"B"C"D)#

(A"B"¬C"D)#

(A"B"C"¬D)#

(A"B"¬C"¬D)#

(C"D)

11111

10111

11011

10011

11101

00101

01001

00001

11110

00110

01010

00010

11100

00100

01000

00000

f(..)DCBA

Einfuehrung in die technische Informatik 16

Automation Systems Group

Minimierung

• Boolsche Funktionen– unterschiedliche, aber gleichwertige Darstellungen möglich– disjunktive Normalform, konjunktive Normalform– Frage nach minimaler Form

• Minimale disjunktive Normalform– Verfahren nach Quine und McClusky– Verfahren nach Karnaugh und Veitch (KV-Diagramme)

• Vorteil– einfacher in Hardware zu realisieren

Page 9: Einf hrung in die technische Informatik - auto.tuwien.ac.atchris/teaching/slides/Uebung1.pdf · Einfuehrung in die technische Informatik 3 Automation Systems Group Logische Schaltungen

Einfuehrung in die technische Informatik 17

Automation Systems Group

Beispiel - Minimierung

11111

10111

11011

10011

11101

00101

01001

00001

11110

00110

01010

00010

11100

00100

01000

00000

f(..)DCBA

D

C

B

A

1

2

4

3

5

6

8

7

9

12

11

16

15

13

1410

Einfuehrung in die technische Informatik 18

Automation Systems Group

Beispiel - Minimierung

11111

10111

11011

10011

11101

00101

01001

00001

11110

00110

01010

00010

11100

00100

01000

00000

f(..)DCBA

0

D

C

B

A

1

2

4

3

5

6

8

7

9

12

11

16

15

13

1410

Page 10: Einf hrung in die technische Informatik - auto.tuwien.ac.atchris/teaching/slides/Uebung1.pdf · Einfuehrung in die technische Informatik 3 Automation Systems Group Logische Schaltungen

Einfuehrung in die technische Informatik 19

Automation Systems Group

Beispiel - Minimierung

11111

10111

11011

10011

11101

00101

01001

00001

11110

00110

01010

00010

11100

00100

01000

00000

f(..)DCBA

0

0

D

C

B

A

1

2

4

3

5

6

8

7

9

12

11

16

15

13

1410

Einfuehrung in die technische Informatik 20

Automation Systems Group

Beispiel - Minimierung

11111

10111

11011

10011

11101

00101

01001

00001

11110

00110

01010

00010

11100

00100

01000

00000

f(..)DCBA

0

0

0

D

C

B

A

1

2

4

3

5

6

8

7

9

12

11

16

15

13

1410

Page 11: Einf hrung in die technische Informatik - auto.tuwien.ac.atchris/teaching/slides/Uebung1.pdf · Einfuehrung in die technische Informatik 3 Automation Systems Group Logische Schaltungen

Einfuehrung in die technische Informatik 21

Automation Systems Group

Beispiel - Minimierung

11111

10111

11011

10011

11101

00101

01001

00001

11110

00110

01010

00010

11100

00100

01000

00000

f(..)DCBA

0

1

0

0

D

C

B

A

1

2

4

3

5

6

8

7

9

12

11

16

15

13

1410

Einfuehrung in die technische Informatik 22

Automation Systems Group

Beispiel - Minimierung

11111

10111

11011

10011

11101

00101

01001

00001

11110

00110

01010

00010

11100

00100

01000

00000

f(..)DCBA

00

11

00

00

D

C

B

A

1

2

4

3

5

6

8

7

9

12

11

16

15

13

1410

Page 12: Einf hrung in die technische Informatik - auto.tuwien.ac.atchris/teaching/slides/Uebung1.pdf · Einfuehrung in die technische Informatik 3 Automation Systems Group Logische Schaltungen

Einfuehrung in die technische Informatik 23

Automation Systems Group

Beispiel - Minimierung

11111

10111

11011

10011

11101

00101

01001

00001

11110

00110

01010

00010

11100

00100

01000

00000

f(..)DCBA

0

1

0

0

00

11

00

00

D

C

B

A

1

2

4

3

5

6

8

7

9

12

11

16

15

13

1410

Einfuehrung in die technische Informatik 24

Automation Systems Group

Beispiel - Minimierung

11111

10111

11011

10011

11101

00101

01001

00001

11110

00110

01010

00010

11100

00100

01000

00000

f(..)DCBA

0

1

0

0

001

111

001

001

D

C

B

A

1

2

4

3

5

6

8

7

9

12

11

16

15

13

1410

Page 13: Einf hrung in die technische Informatik - auto.tuwien.ac.atchris/teaching/slides/Uebung1.pdf · Einfuehrung in die technische Informatik 3 Automation Systems Group Logische Schaltungen

Einfuehrung in die technische Informatik 25

Automation Systems Group

Beispiel - Minimierung

• Blöcke finden– größtmöglich

– alle True-Werte abdecken

– Randblöcke

nicht übersehen

– Überlappungen sind

in Ordnung

0

1

0

0

001

111

001

001

D

C

B

A

1

2

4

3

5

6

8

7

9

12

11

16

15

13

1410

Einfuehrung in die technische Informatik 26

Automation Systems Group

Beispiel - Minimierung

0

1

0

0

001

111

001

001

D

C

B

A

1

2

4

3

5

6

8

7

9

12

11

16

15

13

1410!

(C"D)

Page 14: Einf hrung in die technische Informatik - auto.tuwien.ac.atchris/teaching/slides/Uebung1.pdf · Einfuehrung in die technische Informatik 3 Automation Systems Group Logische Schaltungen

Einfuehrung in die technische Informatik 27

Automation Systems Group

Beispiel - Minimierung

0

1

0

0

001

111

001

001

D

C

B

A

1

2

4

3

5

6

8

7

9

12

11

16

15

13

1410

!

(C"D)#

(A"B)

Einfuehrung in die technische Informatik 28

Automation Systems Group

Rechenbeispiele

• Transformation– Ändern von vorgegebenen Schaltungen

• Schaltungen– Boolsche Funktionen

– Wahrheitstabellen

– Minimierung

– Gatter / PLA

Page 15: Einf hrung in die technische Informatik - auto.tuwien.ac.atchris/teaching/slides/Uebung1.pdf · Einfuehrung in die technische Informatik 3 Automation Systems Group Logische Schaltungen

Einfuehrung in die technische Informatik 29

Automation Systems Group

Transformation

• Schaltung nur aus bestimmten Gattern aufbauen– z.B., nur NAND

– z.B., nur NOR

– alles kann aus diesen Gattern aufgebaut werden

• De Morgan‘sche Regeln

!

A"B =¬(¬A#¬B)

A#B =¬(¬A"¬B)

Einfuehrung in die technische Informatik 30

Automation Systems Group

Beispiel - Transformation

Die folgende Schaltung soll nur aus NAND Gatternaufgebaut werden

&

!1

A

B

C

!1

Page 16: Einf hrung in die technische Informatik - auto.tuwien.ac.atchris/teaching/slides/Uebung1.pdf · Einfuehrung in die technische Informatik 3 Automation Systems Group Logische Schaltungen

Einfuehrung in die technische Informatik 31

Automation Systems Group

Beispiel - Transformation

&

&

!1 De MorganA

B

C

Einfuehrung in die technische Informatik 32

Automation Systems Group

Beispiel - Transformation

&

&

De Morgan

&A

B

C

Page 17: Einf hrung in die technische Informatik - auto.tuwien.ac.atchris/teaching/slides/Uebung1.pdf · Einfuehrung in die technische Informatik 3 Automation Systems Group Logische Schaltungen

Einfuehrung in die technische Informatik 33

Automation Systems Group

Beispiel - Transformation

&

&

Negationen verschieben

&A

B

C

Einfuehrung in die technische Informatik 34

Automation Systems Group

Beispiel - Transformation

&

&

Alle drei Gatter sind NAND Gatter, aber Negationen bei den Eingängen müssen noch ersetzt werden

&A

B

C

Page 18: Einf hrung in die technische Informatik - auto.tuwien.ac.atchris/teaching/slides/Uebung1.pdf · Einfuehrung in die technische Informatik 3 Automation Systems Group Logische Schaltungen

Einfuehrung in die technische Informatik 35

Automation Systems Group

Beispiel - Transformation

&X1

Y

1

0

X2

0111

1000

YX1 and X2X1X

X

X2

Einfuehrung in die technische Informatik 36

Automation Systems Group

Beispiel - Transformation

&X1

Y

1

0

X2

0111

1000

YX1 and X2X1X

X

X2

!

Y =¬X!

Page 19: Einf hrung in die technische Informatik - auto.tuwien.ac.atchris/teaching/slides/Uebung1.pdf · Einfuehrung in die technische Informatik 3 Automation Systems Group Logische Schaltungen

Einfuehrung in die technische Informatik 37

Automation Systems Group

Beispiel - Transformation

&

&

A

B

C

& &

&

&

Einfuehrung in die technische Informatik 38

Automation Systems Group

Rechenbeispiele

• Transformation– Ändern von vorgegebenen Schaltungen

• Schaltungen– Boolsche Funktionen

– Wahrheitstabellen

– Minimierung

– Gatter / PLA

Page 20: Einf hrung in die technische Informatik - auto.tuwien.ac.atchris/teaching/slides/Uebung1.pdf · Einfuehrung in die technische Informatik 3 Automation Systems Group Logische Schaltungen

Einfuehrung in die technische Informatik 39

Automation Systems Group

Schaltung

• Implementieren der Funktion

• Einzelbauteile– AND, OR, NOT Gatter

• PLA (Programmable Logic Array)– Setzen der entsprechenden Verbindungen

Einfuehrung in die technische Informatik 40

Automation Systems Group

Schaltung - Beispiel

• Realisieren der Funktion miteinzelnen Bauteilen

!

(C"D)# (A"B)

&

&

!1

A

B

C

D

Page 21: Einf hrung in die technische Informatik - auto.tuwien.ac.atchris/teaching/slides/Uebung1.pdf · Einfuehrung in die technische Informatik 3 Automation Systems Group Logische Schaltungen

Einfuehrung in die technische Informatik 41

Automation Systems Group

Wahrheitstabellen

• Vollständige Beschreibung des Systems

• Erstellt aus Boolscher Funktion

• Erstellt aus textueller Beschreibung des Systems

Einfuehrung in die technische Informatik 42

Automation Systems Group

Beispiel

AngabeAngabe

Eine Schaltung mit 4 Eingängen soll entworfenwerden, die genau dann 1 (true) liefert, wenn derWert der Eingänge (als Binärzahl interpretiert)kleiner als 7 ist.

Page 22: Einf hrung in die technische Informatik - auto.tuwien.ac.atchris/teaching/slides/Uebung1.pdf · Einfuehrung in die technische Informatik 3 Automation Systems Group Logische Schaltungen

Einfuehrung in die technische Informatik 43

Automation Systems Group

Beispiel - Schaltung

• 4 Eingänge– 4 Variable

– Zahlen von 0 - 15

– Tabelle mit 24 Zeilen

• Funktion– 1, wenn Wert " 6

– 0, wenn Wert ! 7

1111

0111

1011

0011

1101

0101

1001

0001

1110

0110

1010

0010

1100

0100

1000

0000

f(..)B0B1B2B3

Einfuehrung in die technische Informatik 44

Automation Systems Group

Beispiel - Schaltung

• Funktion– 1, wenn Wert " 6

– 0, wenn Wert ! 7

1

0

1

0

1

0

1

0

1

0

1

0

1

0

1

0

B0

15111

14111

13011

12011

11101

10101

9001

8001

7110

6110

5010

4010

3100

2100

1000

0000

f(..)WertB1B2B3

Page 23: Einf hrung in die technische Informatik - auto.tuwien.ac.atchris/teaching/slides/Uebung1.pdf · Einfuehrung in die technische Informatik 3 Automation Systems Group Logische Schaltungen

Einfuehrung in die technische Informatik 45

Automation Systems Group

Beispiel - Schaltung

• Funktion– 1, wenn Wert " 6

1

0

1

0

1

0

1

0

1

0

1

0

1

0

1

0

B0

15111

14111

13011

12011

11101

10101

9001

8001

7110

16110

15010

14010

13100

12100

11000

10000

f(..)WertB1B2B3

Einfuehrung in die technische Informatik 46

Automation Systems Group

Beispiel - Schaltung

• Funktion– 0, wenn Wert ! 7

1

0

1

0

1

0

1

0

1

0

1

0

1

0

1

0

B0

015111

014111

013011

012011

011101

010101

09001

08001

07110

16110

15010

14010

13100

12100

11000

10000

f(..)WertB1B2B3

Page 24: Einf hrung in die technische Informatik - auto.tuwien.ac.atchris/teaching/slides/Uebung1.pdf · Einfuehrung in die technische Informatik 3 Automation Systems Group Logische Schaltungen

Einfuehrung in die technische Informatik 47

Automation Systems Group

Beispiel - Schaltung

01111

00111

01011

00011

01101

00101

01001

00001

01110

10110

11010

10010

11100

10100

11000

10000

f(..)B0B1B2B3

B0

B1

B2

B3

1

2

4

3

5

6

8

7

9

12

11

16

15

13

1410

Einfuehrung in die technische Informatik 48

Automation Systems Group

Beispiel - Schaltung

01111

00111

01011

00011

01101

00101

01001

00001

01110

10110

11010

10010

11100

10100

11000

10000

f(..)B0B1B2B3

11

1

11

11

B0

B1

B2

B3

1

2

4

3

5

6

8

7

9

12

11

16

15

13

1410

Page 25: Einf hrung in die technische Informatik - auto.tuwien.ac.atchris/teaching/slides/Uebung1.pdf · Einfuehrung in die technische Informatik 3 Automation Systems Group Logische Schaltungen

Einfuehrung in die technische Informatik 49

Automation Systems Group

Beispiel - Schaltung

01111

00111

01011

00011

01101

00101

01001

00001

01110

10110

11010

10010

11100

10100

11000

10000

f(..)B0B1B2B3

1100

1000

1100

1100

B0

B1

B2

B3

1

2

4

3

5

6

8

7

9

12

11

16

15

13

1410

Einfuehrung in die technische Informatik 50

Automation Systems Group

Beispiel - Schaltung

1100

1000

1100

1100

B0

B1

B2

B3

1

2

4

3

5

6

8

7

9

12

11

16

15

13

1410

!

(¬B3"¬B

1)

Page 26: Einf hrung in die technische Informatik - auto.tuwien.ac.atchris/teaching/slides/Uebung1.pdf · Einfuehrung in die technische Informatik 3 Automation Systems Group Logische Schaltungen

Einfuehrung in die technische Informatik 51

Automation Systems Group

Beispiel - Schaltung

1100

1000

1100

1100

B0

B1

B2

B3

1

2

4

3

5

6

8

7

9

12

11

16

15

13

1410

!

(¬B3"¬B

1)#

(¬B3"¬B

2)

Einfuehrung in die technische Informatik 52

Automation Systems Group

Beispiel - Schaltung

1100

1000

1100

1100

B0

B1

B2

B3

1

2

4

3

5

6

8

7

9

12

11

16

15

13

1410

!

(¬B3"¬B

1)#

(¬B3"¬B

2)#

(¬B3"¬B

0)

Page 27: Einf hrung in die technische Informatik - auto.tuwien.ac.atchris/teaching/slides/Uebung1.pdf · Einfuehrung in die technische Informatik 3 Automation Systems Group Logische Schaltungen

Einfuehrung in die technische Informatik 53

Automation Systems Group

Beispiel - Schaltung

• Realisierung als PLA– jede Variable an einem Eingang

– zu jeder Variable ist Negation verfügbar

– AND Matrix und OR Matrix

– ideal für disjunktive Normalform

Einfuehrung in die technische Informatik 54

Automation Systems Group

Beispiel - SchaltungB0 B1 B2 B3

f0 f1 f2 f3

Page 28: Einf hrung in die technische Informatik - auto.tuwien.ac.atchris/teaching/slides/Uebung1.pdf · Einfuehrung in die technische Informatik 3 Automation Systems Group Logische Schaltungen

Einfuehrung in die technische Informatik 55

Automation Systems Group

Beispiel - SchaltungB0 B1 B2 B3

f0 f1 f2 f3

Eingänge mit Negation

Einfuehrung in die technische Informatik 56

Automation Systems Group

Beispiel - SchaltungB0 B1 B2 B3

f0 f1 f2 f3

AND Matrix

Page 29: Einf hrung in die technische Informatik - auto.tuwien.ac.atchris/teaching/slides/Uebung1.pdf · Einfuehrung in die technische Informatik 3 Automation Systems Group Logische Schaltungen

Einfuehrung in die technische Informatik 57

Automation Systems Group

Beispiel - SchaltungB0 B1 B2 B3

f0 f1 f2 f3

OR Matrix

Einfuehrung in die technische Informatik 58

Automation Systems Group

Beispiel - SchaltungB0 B1 B2 B3

f0 f1 f2 f3

Funktionsausgänge

Page 30: Einf hrung in die technische Informatik - auto.tuwien.ac.atchris/teaching/slides/Uebung1.pdf · Einfuehrung in die technische Informatik 3 Automation Systems Group Logische Schaltungen

Einfuehrung in die technische Informatik 59

Automation Systems Group

Beispiel - SchaltungB0 B1 B2 B3

f0 f1 f2 f3

!

(¬B3"¬B

1)# (¬B

3"¬B

2)# (¬B

3"¬B

0)

Einfuehrung in die technische Informatik 60

Automation Systems Group

Beispiel - SchaltungB0 B1 B2 B3

f0 f1 f2 f3

!

(¬B3"¬B

1)# (¬B

3"¬B

2)# (¬B

3"¬B

0)

Page 31: Einf hrung in die technische Informatik - auto.tuwien.ac.atchris/teaching/slides/Uebung1.pdf · Einfuehrung in die technische Informatik 3 Automation Systems Group Logische Schaltungen

Einfuehrung in die technische Informatik 61

Automation Systems Group

Beispiel - SchaltungB0 B1 B2 B3

f0 f1 f2 f3

!

(¬B3"¬B

1)# (¬B

3"¬B

2)# (¬B

3"¬B

0)

Einfuehrung in die technische Informatik 62

Automation Systems Group

Beispiel - SchaltungB0 B1 B2 B3

f0 f1 f2 f3

!

(¬B3"¬B

1)# (¬B

3"¬B

2)# (¬B

3"¬B

0)

Page 32: Einf hrung in die technische Informatik - auto.tuwien.ac.atchris/teaching/slides/Uebung1.pdf · Einfuehrung in die technische Informatik 3 Automation Systems Group Logische Schaltungen

Einfuehrung in die technische Informatik 63

Automation Systems Group

Beispiel - SchaltungB0 B1 B2 B3

f0 f1 f2 f3

!

(¬B3"¬B

1)# (¬B

3"¬B

2)# (¬B

3"¬B

0)

Einfuehrung in die technische Informatik 64

Automation Systems Group

Beispiel - SchaltungB0 B1 B2 B3

f0 f1 f2 f3

!

(¬B3"¬B

1)# (¬B

3"¬B

2)# (¬B

3"¬B

0)

Page 33: Einf hrung in die technische Informatik - auto.tuwien.ac.atchris/teaching/slides/Uebung1.pdf · Einfuehrung in die technische Informatik 3 Automation Systems Group Logische Schaltungen

Einfuehrung in die technische Informatik 65

Automation Systems Group

Beispiel - SchaltungB0 B1 B2 B3

f0 f1 f2 f3

!

(¬B3"¬B

1)# (¬B

3"¬B

2)# (¬B

3"¬B

0)

Einfuehrung in die technische Informatik 66

Automation Systems Group

Beispiel - SchaltungB0 B1 B2 B3

f0 f1 f2 f3

!

(¬B3"¬B

1)# (¬B

3"¬B

2)# (¬B

3"¬B

0)

Page 34: Einf hrung in die technische Informatik - auto.tuwien.ac.atchris/teaching/slides/Uebung1.pdf · Einfuehrung in die technische Informatik 3 Automation Systems Group Logische Schaltungen

Einfuehrung in die technische Informatik 67

Automation Systems Group

Komplexe Schaltungen

• Für manche Anwendungen sind mehrere Ausgängeerforderlich– diese Ausgänge können unterschiedliche Werte liefern

– sie realisieren unterschiedliche logische Funktionen

Einfuehrung in die technische Informatik 68

Automation Systems Group

Beispiel

AngabeAngabe

Eine Schaltung soll als PLA realisiert werden. DieseSchaltung soll zwei 2-bit Zahlen (X und Y)vergleichen und am Ausgang A1 genau dann denWert 1 liefern, wenn X kleiner als Y ist. Zusätzlichsoll am Ausgang A2 genau dann den Wert 1ausgegeben werden, wenn X gleich 0 und Yungleich 0 ist.

Page 35: Einf hrung in die technische Informatik - auto.tuwien.ac.atchris/teaching/slides/Uebung1.pdf · Einfuehrung in die technische Informatik 3 Automation Systems Group Logische Schaltungen

Einfuehrung in die technische Informatik 69

Automation Systems Group

Beispiel - Schaltung

• 2 x 2-bit Zahlen– 4 Eingänge

– Tabelle mit 24 Zeilen

• 2 Funktionen– A1 : X < Y

– A2 : X == 0 && Y != 0

A1

1111

0111

1011

0011

1101

0101

1001

0001

1110

0110

1010

0010

1100

0100

1000

0000

A2Y0Y1X0X1

Einfuehrung in die technische Informatik 70

Automation Systems Group

Beispiel - Schaltung

• A1 : X < Y

1

1

1

0

A1

1111

0111

1011

0011

1101

0101

1001

0001

1110

0110

1010

0010

1100

0100

1000

0000

A2Y0Y1X0X1

X = 0

Page 36: Einf hrung in die technische Informatik - auto.tuwien.ac.atchris/teaching/slides/Uebung1.pdf · Einfuehrung in die technische Informatik 3 Automation Systems Group Logische Schaltungen

Einfuehrung in die technische Informatik 71

Automation Systems Group

Beispiel - Schaltung

• A1 : X < Y

1

1

0

0

1

1

1

0

A1

1111

0111

1011

0011

1101

0101

1001

0001

1110

0110

1010

0010

1100

0100

1000

0000

A2Y0Y1X0X1

X = 1

Einfuehrung in die technische Informatik 72

Automation Systems Group

Beispiel - Schaltung

• A1 : X < Y

1

0

0

0

1

1

0

0

1

1

1

0

A1

1111

0111

1011

0011

1101

0101

1001

0001

1110

0110

1010

0010

1100

0100

1000

0000

A2Y0Y1X0X1

X = 2

Page 37: Einf hrung in die technische Informatik - auto.tuwien.ac.atchris/teaching/slides/Uebung1.pdf · Einfuehrung in die technische Informatik 3 Automation Systems Group Logische Schaltungen

Einfuehrung in die technische Informatik 73

Automation Systems Group

Beispiel - Schaltung

• A1 : X < Y

0

0

0

0

1

0

0

0

1

1

0

0

1

1

1

0

A1

1111

0111

1011

0011

1101

0101

1001

0001

1110

0110

1010

0010

1100

0100

1000

0000

A2Y0Y1X0X1

X = 3

Einfuehrung in die technische Informatik 74

Automation Systems Group

Beispiel - Schaltung

• A2 : X == 0 && Y != 0

0

0

0

0

1

0

0

0

1

1

0

0

1

1

1

0

A1

1111

0111

1011

0011

1101

0101

1001

0001

1110

0110

1010

0010

1100

0100

1000

0000

A2Y0Y1X0X1

Page 38: Einf hrung in die technische Informatik - auto.tuwien.ac.atchris/teaching/slides/Uebung1.pdf · Einfuehrung in die technische Informatik 3 Automation Systems Group Logische Schaltungen

Einfuehrung in die technische Informatik 75

Automation Systems Group

Beispiel - Schaltung

• A2 : X == 0 && Y != 0

0

0

0

0

1

0

0

0

1

1

0

0

1

1

1

0

A1

01111

00111

01011

00011

01101

00101

01001

00001

01110

00110

01010

00010

1100

0100

1000

0000

A2Y0Y1X0X1

X = 0

Einfuehrung in die technische Informatik 76

Automation Systems Group

Beispiel - Schaltung

• A2 : X == 0 && Y != 0

0

0

0

0

1

0

0

0

1

1

0

0

1

1

1

0

A1

01111

00111

01011

00011

01101

00101

01001

00001

01110

00110

01010

00010

1100

0100

1000

00000

A2Y0Y1X0X1

X = 0

Page 39: Einf hrung in die technische Informatik - auto.tuwien.ac.atchris/teaching/slides/Uebung1.pdf · Einfuehrung in die technische Informatik 3 Automation Systems Group Logische Schaltungen

Einfuehrung in die technische Informatik 77

Automation Systems Group

Beispiel - Schaltung

• A2 : X == 0 && Y != 0

0

0

0

0

1

0

0

0

1

1

0

0

1

1

1

0

A1

01111

00111

01011

00011

01101

00101

01001

00001

01110

00110

01010

00010

11100

10100

11000

00000

A2Y0Y1X0X1

X = 0

Einfuehrung in die technische Informatik 78

Automation Systems Group

Beispiel - Schaltung

0

0

0

0

1

0

0

0

1

1

0

0

1

1

1

0

A1

01111

00111

01011

00011

01101

00101

01001

00001

01110

00110

01010

00010

11100

10100

11000

00000

A2Y0Y1X0X1

Y0

Y1

X0

X1

1

2

4

3

5

6

8

7

9

12

11

16

15

13

1410

Page 40: Einf hrung in die technische Informatik - auto.tuwien.ac.atchris/teaching/slides/Uebung1.pdf · Einfuehrung in die technische Informatik 3 Automation Systems Group Logische Schaltungen

Einfuehrung in die technische Informatik 79

Automation Systems Group

Beispiel - Schaltung

0

0

0

0

1

0

0

0

1

1

0

0

1

1

1

0

A1

01111

00111

01011

00011

01101

00101

01001

00001

01110

00110

01010

00010

11100

10100

11000

00000

A2Y0Y1X0X1

Y0

Y1

X0

X1

1

2

4

3

5

6

8

7

9

12

11

16

15

13

1410

Einfuehrung in die technische Informatik 80

Automation Systems Group

Beispiel - Schaltung

0

0

0

0

1

0

0

0

1

1

0

0

1

1

1

0

A1

01111

00111

01011

00011

01101

00101

01001

00001

01110

00110

01010

00010

11100

10100

11000

00000

A2Y0Y1X0X1

1100

1101

1000

0000

Y0

Y1

X0

X1

1

2

4

3

5

6

8

7

9

12

11

16

15

13

1410

Page 41: Einf hrung in die technische Informatik - auto.tuwien.ac.atchris/teaching/slides/Uebung1.pdf · Einfuehrung in die technische Informatik 3 Automation Systems Group Logische Schaltungen

Einfuehrung in die technische Informatik 81

Automation Systems Group

Beispiel - Schaltung

1100

1101

1000

0000

Y0

Y1

X0

X1

1

2

4

3

5

6

8

7

9

12

11

16

15

13

1410

!

(¬X1"Y

1)

Ausgang A1

Einfuehrung in die technische Informatik 82

Automation Systems Group

Beispiel - Schaltung

1100

1101

1000

0000

Y0

Y1

X0

X1

1

2

4

3

5

6

8

7

9

12

11

16

15

13

1410

!

(¬X1"Y

1)#

(¬X1"¬X

0"Y

0)

Ausgang A1

Page 42: Einf hrung in die technische Informatik - auto.tuwien.ac.atchris/teaching/slides/Uebung1.pdf · Einfuehrung in die technische Informatik 3 Automation Systems Group Logische Schaltungen

Einfuehrung in die technische Informatik 83

Automation Systems Group

Beispiel - Schaltung

1100

1101

1000

0000

Y0

Y1

X0

X1

1

2

4

3

5

6

8

7

9

12

11

16

15

13

1410

!

(¬X1"Y

1)#

(¬X1"¬X

0"Y

0)#

(¬X0"Y

1"Y

0)

Ausgang A1

Einfuehrung in die technische Informatik 84

Automation Systems Group

Beispiel - Schaltung

0

0

0

0

1

0

0

0

1

1

0

0

1

1

1

0

A1

01111

00111

01011

00011

01101

00101

01001

00001

01110

00110

01010

00010

11100

10100

11000

00000

A2Y0Y1X0X1

Y0

Y1

X0

X1

1

2

4

3

5

6

8

7

9

12

11

16

15

13

1410

Page 43: Einf hrung in die technische Informatik - auto.tuwien.ac.atchris/teaching/slides/Uebung1.pdf · Einfuehrung in die technische Informatik 3 Automation Systems Group Logische Schaltungen

Einfuehrung in die technische Informatik 85

Automation Systems Group

Beispiel - Schaltung

0

0

0

0

1

0

0

0

1

1

0

0

1

1

1

0

A1

01111

00111

01011

00011

01101

00101

01001

00001

01110

00110

01010

00010

11100

10100

11000

00000

A2Y0Y1X0X1

1000

1000

1000

0000

Y0

Y1

X0

X1

1

2

4

3

5

6

8

7

9

12

11

16

15

13

1410

Einfuehrung in die technische Informatik 86

Automation Systems Group

Beispiel - Schaltung

1000

1000

1000

0000

Y0

Y1

X0

X1

1

2

4

3

5

6

8

7

9

12

11

16

15

13

1410

!

(¬X1"¬X

0"Y

1)

Ausgang A2

Page 44: Einf hrung in die technische Informatik - auto.tuwien.ac.atchris/teaching/slides/Uebung1.pdf · Einfuehrung in die technische Informatik 3 Automation Systems Group Logische Schaltungen

Einfuehrung in die technische Informatik 87

Automation Systems Group

Beispiel - Schaltung

1000

1000

1000

0000

Y0

Y1

X0

X1

1

2

4

3

5

6

8

7

9

12

11

16

15

13

1410

!

(¬X1"¬X

0"Y

1)#

(¬X1"¬X

0"Y

0)

Ausgang A2

Einfuehrung in die technische Informatik 88

Automation Systems Group

Beispiel - SchaltungX1 X0 Y1 Y0

A1 A2

!

A1: (¬X

1"Y

1)# (¬X

1"¬X

0"Y

0)# (¬X

0"Y

1"Y

0)

!

A2: (¬X

1"¬X

0"Y

1)# (¬X

1"¬X

0"Y

0)

Page 45: Einf hrung in die technische Informatik - auto.tuwien.ac.atchris/teaching/slides/Uebung1.pdf · Einfuehrung in die technische Informatik 3 Automation Systems Group Logische Schaltungen

Einfuehrung in die technische Informatik 89

Automation Systems Group

Beispiel - SchaltungX1 X0 Y1 Y0

A1 A2

!

A1: (¬X

1"Y

1)# (¬X

1"¬X

0"Y

0)# (¬X

0"Y

1"Y

0)

!

A2: (¬X

1"¬X

0"Y

1)# (¬X

1"¬X

0"Y

0)

Einfuehrung in die technische Informatik 90

Automation Systems Group

Beispiel - SchaltungX1 X0 Y1 Y0

A1 A2

!

A1: (¬X

1"Y

1)# (¬X

1"¬X

0"Y

0)# (¬X

0"Y

1"Y

0)

!

A2: (¬X

1"¬X

0"Y

1)# (¬X

1"¬X

0"Y

0)

Page 46: Einf hrung in die technische Informatik - auto.tuwien.ac.atchris/teaching/slides/Uebung1.pdf · Einfuehrung in die technische Informatik 3 Automation Systems Group Logische Schaltungen

Einfuehrung in die technische Informatik 91

Automation Systems Group

Beispiel - SchaltungX1 X0 Y1 Y0

A1 A2

!

A1: (¬X

1"Y

1)# (¬X

1"¬X

0"Y

0)# (¬X

0"Y

1"Y

0)

!

A2: (¬X

1"¬X

0"Y

1)# (¬X

1"¬X

0"Y

0)

Einfuehrung in die technische Informatik 92

Automation Systems Group

Beispiel - SchaltungX1 X0 Y1 Y0

A1 A2

!

A1: (¬X

1"Y

1)# (¬X

1"¬X

0"Y

0)# (¬X

0"Y

1"Y

0)

!

A2: (¬X

1"¬X

0"Y

1)# (¬X

1"¬X

0"Y

0)

Page 47: Einf hrung in die technische Informatik - auto.tuwien.ac.atchris/teaching/slides/Uebung1.pdf · Einfuehrung in die technische Informatik 3 Automation Systems Group Logische Schaltungen

Einfuehrung in die technische Informatik 93

Automation Systems Group

Beispiel - SchaltungX1 X0 Y1 Y0

A1 A2

!

A1: (¬X

1"Y

1)# (¬X

1"¬X

0"Y

0)# (¬X

0"Y

1"Y

0)

!

A2: (¬X

1"¬X

0"Y

1)# (¬X

1"¬X

0"Y

0)

Einfuehrung in die technische Informatik 94

Automation Systems Group

Beispiel - SchaltungX1 X0 Y1 Y0

A1 A2

!

A1: (¬X

1"Y

1)# (¬X

1"¬X

0"Y

0)# (¬X

0"Y

1"Y

0)

!

A2: (¬X

1"¬X

0"Y

1)# (¬X

1"¬X

0"Y

0)

Page 48: Einf hrung in die technische Informatik - auto.tuwien.ac.atchris/teaching/slides/Uebung1.pdf · Einfuehrung in die technische Informatik 3 Automation Systems Group Logische Schaltungen

Einfuehrung in die technische Informatik 95

Automation Systems Group

Beispiel - SchaltungX1 X0 Y1 Y0

A1 A2

!

A1: (¬X

1"Y

1)# (¬X

1"¬X

0"Y

0)# (¬X

0"Y

1"Y

0)

!

A2: (¬X

1"¬X

0"Y

1)# (¬X

1"¬X

0"Y

0)

Einfuehrung in die technische Informatik 96

Automation Systems Group

Beispiel - SchaltungX1 X0 Y1 Y0

A1 A2

!

A1: (¬X

1"Y

1)# (¬X

1"¬X

0"Y

0)# (¬X

0"Y

1"Y

0)

!

A2: (¬X

1"¬X

0"Y

1)# (¬X

1"¬X

0"Y

0)

Page 49: Einf hrung in die technische Informatik - auto.tuwien.ac.atchris/teaching/slides/Uebung1.pdf · Einfuehrung in die technische Informatik 3 Automation Systems Group Logische Schaltungen

Einfuehrung in die technische Informatik 97

Automation Systems Group

Sequentielle Schaltungen

• Bisher einfache Schaltungen– Ausgänge hängen immer direkt von Eingängen ab

– keine Speicherung von Information

– kein interner Zustand

• Sequentielle (komplexe) Schaltungen– Ausgänge hängen von Eingängen und aktuellem Zustand ab

– Zustand wird in Speicherelementen gehalten

– Beispiel• Zähler

• Speicherregister

Einfuehrung in die technische Informatik 98

Automation Systems Group

Sequentielle Schaltungen

• Speicherelemente– Flip-Flops / Latches

– arbeiten mit Rückkoppelung

!1

!1R

S

Q

Q

Page 50: Einf hrung in die technische Informatik - auto.tuwien.ac.atchris/teaching/slides/Uebung1.pdf · Einfuehrung in die technische Informatik 3 Automation Systems Group Logische Schaltungen

Einfuehrung in die technische Informatik 99

Automation Systems Group

Sequentielle Schaltungen

• Speicherelemente– Flip-Flops / Latches

– arbeiten mit Rückkoppelung

!1

!1R

S

Q

Q

high (log. 1)

low (log. 0)

Einfuehrung in die technische Informatik 100

Automation Systems Group

Sequentielle Schaltungen

• Speicherelemente– Flip-Flops / Latches

– arbeiten mit Rückkoppelung

!1

!1R

S

Q

Q

high (log. 1)

low (log. 0)

setdurchführen

Page 51: Einf hrung in die technische Informatik - auto.tuwien.ac.atchris/teaching/slides/Uebung1.pdf · Einfuehrung in die technische Informatik 3 Automation Systems Group Logische Schaltungen

Einfuehrung in die technische Informatik 101

Automation Systems Group

Sequentielle Schaltungen

• Speicherelemente– Flip-Flops / Latches

– arbeiten mit Rückkoppelung

!1

!1R

S

Q

Q

high (log. 1)

low (log. 0)

Einfuehrung in die technische Informatik 102

Automation Systems Group

Sequentielle Schaltungen

• Speicherelemente– Flip-Flops / Latches

– arbeiten mit Rückkoppelung

!1

!1R

S

Q

Q

high (log. 1)

low (log. 0)

Page 52: Einf hrung in die technische Informatik - auto.tuwien.ac.atchris/teaching/slides/Uebung1.pdf · Einfuehrung in die technische Informatik 3 Automation Systems Group Logische Schaltungen

Einfuehrung in die technische Informatik 103

Automation Systems Group

!1

Sequentielle Schaltungen

• Speicherelemente– Flip-Flops / Latches

– arbeiten mit Rückkoppelung

!1

R

S

Q

Q

high (log. 1)

low (log. 0)

Einfuehrung in die technische Informatik 104

Automation Systems Group

Sequentielle Schaltungen

• Speicherelemente– Flip-Flops / Latches

– arbeiten mit Rückkoppelung

!1

!1R

S

Q

Q

high (log. 1)

low (log. 0)

Page 53: Einf hrung in die technische Informatik - auto.tuwien.ac.atchris/teaching/slides/Uebung1.pdf · Einfuehrung in die technische Informatik 3 Automation Systems Group Logische Schaltungen

Einfuehrung in die technische Informatik 105

Automation Systems Group

Sequentielle Schaltungen

• Speicherelemente– Flip-Flops / Latches

– arbeiten mit Rückkoppelung

!1

!1R

S

Q

Q

high (log. 1)

low (log. 0)

Einfuehrung in die technische Informatik 106

Automation Systems Group

Sequentielle Schaltungen

• Speicherelemente– Flip-Flops / Latches

– arbeiten mit Rückkoppelung

!1

!1R

S

Q

Q

high (log. 1)

low (log. 0)resetdurchführen

Page 54: Einf hrung in die technische Informatik - auto.tuwien.ac.atchris/teaching/slides/Uebung1.pdf · Einfuehrung in die technische Informatik 3 Automation Systems Group Logische Schaltungen

Einfuehrung in die technische Informatik 107

Automation Systems Group

Sequentielle Schaltungen

• Speicherelemente– Flip-Flops / Latches

– arbeiten mit Rückkoppelung

!1

!1R

S

Q

Q

high (log. 1)

low (log. 0)

Einfuehrung in die technische Informatik 108

Automation Systems Group

Sequentielle Schaltungen

• Speicherelemente– Flip-Flops / Latches

– arbeiten mit Rückkoppelung

!1

!1R

S

Q

Q

high (log. 1)

low (log. 0)

Page 55: Einf hrung in die technische Informatik - auto.tuwien.ac.atchris/teaching/slides/Uebung1.pdf · Einfuehrung in die technische Informatik 3 Automation Systems Group Logische Schaltungen

Einfuehrung in die technische Informatik 109

Automation Systems Group

Sequentielle Schaltungen

• Speicherelemente– Flip-Flops / Latches

– arbeiten mit Rückkoppelung

!1

!1R

S

Q

Q

high (log. 1)

low (log. 0)

Einfuehrung in die technische Informatik 110

Automation Systems Group

Sequentielle Schaltungen

• Speicherelemente– Flip-Flops / Latches

– arbeiten mit Rückkoppelung

!1

!1R

S

Q

Q

high (log. 1)

low (log. 0)

Page 56: Einf hrung in die technische Informatik - auto.tuwien.ac.atchris/teaching/slides/Uebung1.pdf · Einfuehrung in die technische Informatik 3 Automation Systems Group Logische Schaltungen

Einfuehrung in die technische Informatik 111

Automation Systems Group

Sequentielle Schaltungen

• Speicherelemente– Flip-Flops / Latches

– arbeiten mit Rückkoppelung

!1

!1R

S

Q

Q

high (log. 1)

low (log. 0)

Einfuehrung in die technische Informatik 112

Automation Systems Group

Sequentielle Schaltungen

• Typen von Speicherelementen– RS-Flip-Flop

• auf vorigen Folien beschrieben

• undefinierter Zustand wenn R = S = 1

– D-Latch• nur ein Eingang

• verhindert undefinierten Zustand des RS-Flip-Flops

– JK-Flip-Flop• ähnlich wie RS-Flip-Flop

• wenn J = K = 1, dann schaltet der Ausgang des Flip-Flop in

den anderen logischen Zustand (aus low wird high und

umgekehrt)

Page 57: Einf hrung in die technische Informatik - auto.tuwien.ac.atchris/teaching/slides/Uebung1.pdf · Einfuehrung in die technische Informatik 3 Automation Systems Group Logische Schaltungen

Einfuehrung in die technische Informatik 113

Automation Systems Group

Zusammenfassung

• Logische Schaltungen– Boolsche Funktionen– Wahrheitstabellen

• Minimierung– minimale disjunktive Normalform– KV Diagramme

• Implementierung– Gatter– PLA

• Sequentielle Schaltungen