of 38 /38
Logische Funktionen Grundlagen der technischen Informatik Wintersemester 2018/19 Folien basierend auf Material von F. Vahid und S. Werner

Logische Funktionen - uni-due.de...010 0110 & 010 0111 ' 010 1000 (010 1001 ) 010 1010 * 010 1011 + 010 1100 , 010 1101 - ... From Decimal to Binary. Grundlagen der Technische Informatik

  • Upload
    others

  • View
    30

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Logische Funktionen - uni-due.de...010 0110 & 010 0111 ' 010 1000 (010 1001 ) 010 1010 * 010 1011 + 010 1100 , 010 1101 - ... From Decimal to Binary. Grundlagen der Technische Informatik

Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

1

Logische FunktionenGrundlagen der technischen InformatikWintersemester 2018/19

Folien basierend auf Material von F. Vahid und S. Werner

Page 2: Logische Funktionen - uni-due.de...010 0110 & 010 0111 ' 010 1000 (010 1001 ) 010 1010 * 010 1011 + 010 1100 , 010 1101 - ... From Decimal to Binary. Grundlagen der Technische Informatik

Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

2Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

• Look “under the hood” of computers– Solid understanding --> confidence,

insight, even better programmer when aware of hardware resource issues

• Electronic devices becoming digital– Enabled by shrinking and more capable chips– Enables:

• Better devices: Sound recorders, cameras, cars, cell phones, medical devices,...

• New devices: Video games, smartphones, ...

– Known as “embedded systems”• Thousands of new devices every year• Designers needed: Potential career

direction

Review: Why Study Digital Design?

Page 3: Logische Funktionen - uni-due.de...010 0110 & 010 0111 ' 010 1000 (010 1001 ) 010 1010 * 010 1011 + 010 1100 , 010 1101 - ... From Decimal to Binary. Grundlagen der Technische Informatik

Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

3Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

• ASCII*: 7- (or 8-) bit encoding of each letter, number, or symbol

• Unicode: popular 16-bit encoding– Encodes

characters from various world languages

Question: What does this ASCII bit sequence represent?

1010010 1000101 1010011 1010100

R E S T

Sample ASCII encodingsSymbolEncoding

010 0000 <space>010 0001 !010 0010 "010 0011 #010 0100 $010 0101 %010 0110 &010 0111 '010 1000 (010 1001 )010 1010 *010 1011 +010 1100 ,010 1101 -010 1110 .010 1111 /

SymbolEncoding100 1110 N100 1111 O101 0000 P101 0001 Q101 0010 R101 0011 S101 0100 T101 0101 U101 0110 V101 0111 W101 1000 X101 1001 Y101 1010 Z

100 0001 A100 0010 B100 0011 C100 0100 D100 0101 E100 0110 F100 0111 G100 1000 H100 1001 I100 1010 J100 1011 K100 1100 L100 1101 M

SymbolEncoding

SymbolEncoding

011 0000 0011 0001 1011 0010 2011 0011 3011 0100 4011 0101 5011 0110 6011 0111 7011 1000 8011 1001 9

110 0001 a110 0010 b ...111 1001 y111 1010 z

Review: ASCII, Unicode

*American Standard Code for Information Interchange

Page 4: Logische Funktionen - uni-due.de...010 0110 & 010 0111 ' 010 1000 (010 1001 ) 010 1010 * 010 1011 + 010 1100 , 010 1101 - ... From Decimal to Binary. Grundlagen der Technische Informatik

Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

4Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

• Put 1 in leftmost place without sum exceeding number

• Track sum

16 18 4 20

16 18 4 28

1

16 18 4 212 1 1

16 18 4 2done 1 1 00

016 > 12, too big;Put 0 in 16’s place

8 <= 12, so put1 in 8’s place,current sum is 8

8+4=12 <= 12, so put1 in 4’s place,current sum is 12

Reached desired 12,so put 0s in remainingplaces

Desired decimalnumber: 12

Currentsum

Binarynumber

(a)

(d)

(c)

(b)0

0

0

a

Review: From Decimal to Binary

Page 5: Logische Funktionen - uni-due.de...010 0110 & 010 0111 ' 010 1000 (010 1001 ) 010 1010 * 010 1011 + 010 1100 , 010 1101 - ... From Decimal to Binary. Grundlagen der Technische Informatik

Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

5Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

• Microprocessors a common choice to implement a digital system– Easy to program– Cheap (as low as

1 €)– Readily available

I3I4I5I6I7

I2I1I0

P3P4P5P6P7

P2P1P0 void main()

while (1)

P0 = I0 && !I1; // F = a and !b,

0F

b

a

10101

6:00 7:05 7:06 9:00 9:01 time

Desired motion-at-night detector Programmedmicroprocessor

Custom designeddigital circuit

1.3Review: µProzessor vs. Digital System

Page 6: Logische Funktionen - uni-due.de...010 0110 & 010 0111 ' 010 1000 (010 1001 ) 010 1010 * 010 1011 + 010 1100 , 010 1101 - ... From Decimal to Binary. Grundlagen der Technische Informatik

Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

6Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

• Let’s learn to design digital circuits, starting with a simple form of circuit:– Combinational circuit

• Outputs depend solely on the present combination of the circuit inputs’ values

• vs. sequential circuit: Has “memory” that impacts outputs too

DigitalSystem

b=0 F=0

DigitalSystem

if b=0, then F=0if b=1, then F=1

b=1 F=1

(a)

Motionsensor Digital

System

Lightsensor

Lamp

a

b

F

if a=0 and b=0, then F=0if a=0 and b=1, then F=0if a=1 and b=0, then F=1if a=1 and b=1, then F=0

(b) Cannot determine value of F solely from present value

(c)

Introduction

DigitalSystem

b=0 F=0

DigitalSystem

b=1 F=1

DigitalSystem

b=0 F=1

Page 7: Logische Funktionen - uni-due.de...010 0110 & 010 0111 ' 010 1000 (010 1001 ) 010 1010 * 010 1011 + 010 1100 , 010 1101 - ... From Decimal to Binary. Grundlagen der Technische Informatik

Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

7Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

• Electronic switches are the basis of binary digital circuits– Electrical terminology

• Voltage: Difference in electric potential between two points (volts, V)

– Analogous to water pressure• Current: Flow of charged particles (amps, A)

– Analogous to water flow• Resistance: Tendency of wire to resist current

flow (ohms, Ω)– Analogous to water pipe diameter

• R = V/I (Ohm’s Law)R = 9 V / 4.5 AR = 2 ohms

4.5 A

4.5

A

4.5 A

2 ohms

9 V

0 V 9 V

+–

If a 9V potential difference is appliedacross a 2 ohm resistor, then 4.5 A of current will flow.

Switches

Page 8: Logische Funktionen - uni-due.de...010 0110 & 010 0111 ' 010 1000 (010 1001 ) 010 1010 * 010 1011 + 010 1100 , 010 1101 - ... From Decimal to Binary. Grundlagen der Technische Informatik

Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

8Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

• A switch has three parts– Source input, and output

• Current tries to flow from source input to output

– Control input• Voltage that controls whether

that current can flow • The amazing shrinking switch

– 1930s: Relays– 1940s: Vacuum tubes– 1950s: Discrete transistor– 1960s: Integrated circuits (ICs)

•Initially just a few transistors on IC•Then tens, hundreds, thousands...

“off”

“on”

outputsourceinput

outputsourceinput

controlinput

controlinput

relay vacuum tube

discrete transistor

IC

quarter(to see the relative size)

Switches

Page 9: Logische Funktionen - uni-due.de...010 0110 & 010 0111 ' 010 1000 (010 1001 ) 010 1010 * 010 1011 + 010 1100 , 010 1101 - ... From Decimal to Binary. Grundlagen der Technische Informatik

Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

9Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

Moore‘s Law

• Prediction announced by Gordon Moore in 1965

• Semiconductor Technology to double effectiveness every 18 Months

16151413121110987654321

Log2

ofth

eN

umbe

rof

Com

pone

nts

Per

Inte

grat

edFu

nctio

n

Year

1959

1960

1961

1962

1963

1964

1965

1966

1967

1968

1969

1970

1971

1972

1973

1974

1975

Year Source: Moore, 1965

Log 2

Anza

hl d

er T

rans

istor

en fü

r jed

e in

tegr

iert

e Fu

nktio

n

Page 10: Logische Funktionen - uni-due.de...010 0110 & 010 0111 ' 010 1000 (010 1001 ) 010 1010 * 010 1011 + 010 1100 , 010 1101 - ... From Decimal to Binary. Grundlagen der Technische Informatik

Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

10Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

Moore‘s Law

Page 11: Logische Funktionen - uni-due.de...010 0110 & 010 0111 ' 010 1000 (010 1001 ) 010 1010 * 010 1011 + 010 1100 , 010 1101 - ... From Decimal to Binary. Grundlagen der Technische Informatik

Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

11Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

Moore‘s Law

0

300

600

900

1200

1500

1800

2100

2002 2004 2006 2008 2010 2012 2014/15

# Tr

ansi

stor

s (M

ill.)

Year

Sandy Bridge995 Mill.

Northwood55 Mill.

Prescott125 Mill.

Yonah151 Mill.

Wolfdale410 Mill.

Ivy Bridge1860 Mill.

Broadwell1900 Mill.

130 nm

90 nm

65 nm

45 nm32 nm

22 nm14 nm

0

20

40

60

80

100

120

140

0

300

600

900

1200

1500

1800

2100

2002 2004 2006 2008 2010 2012 2014/15

Tech

nolo

gy

# Tr

ansi

stor

s (M

ill.)

Year

Sandy Bridge995 Mill.

Northwood55 Mill.

Prescott125 Mill.

Yonah151 Mill.

Wolfdale410 Mill.

Ivy Bridge1860 Mill.

Broadwell1900 Mill.

Page 12: Logische Funktionen - uni-due.de...010 0110 & 010 0111 ' 010 1000 (010 1001 ) 010 1010 * 010 1011 + 010 1100 , 010 1101 - ... From Decimal to Binary. Grundlagen der Technische Informatik

Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

12Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

Moore‘s Law

Page 13: Logische Funktionen - uni-due.de...010 0110 & 010 0111 ' 010 1000 (010 1001 ) 010 1010 * 010 1011 + 010 1100 , 010 1101 - ... From Decimal to Binary. Grundlagen der Technische Informatik

Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

13Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

Moore‘s Law

1 m10 cm1 cm1 mm100 µm10 µm100 nm

„22 nm“-Transistorsource: Intel

Source: „Spektrum der Wissenschaften“

Page 14: Logische Funktionen - uni-due.de...010 0110 & 010 0111 ' 010 1000 (010 1001 ) 010 1010 * 010 1011 + 010 1100 , 010 1101 - ... From Decimal to Binary. Grundlagen der Technische Informatik

Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

14Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

• CMOS transistor– Basic switch in modern ICs

Silicon -- not quite a conductor or insulator:Semiconductor

gate

source drainoxide

A positive voltage here...

IC package

IC

...attracts electrons here, turning the channel between the source and drain into a conductor

The CMOS Transistor

Page 15: Logische Funktionen - uni-due.de...010 0110 & 010 0111 ' 010 1000 (010 1001 ) 010 1010 * 010 1011 + 010 1100 , 010 1101 - ... From Decimal to Binary. Grundlagen der Technische Informatik

Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

15Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

does notconduct

0

conducts

1gate

nMOS

does notconduct

1gate

pMOS

conducts

0

The CMOS Transistor

Page 16: Logische Funktionen - uni-due.de...010 0110 & 010 0111 ' 010 1000 (010 1001 ) 010 1010 * 010 1011 + 010 1100 , 010 1101 - ... From Decimal to Binary. Grundlagen der Technische Informatik

Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

16Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

gatesource

draindrain

sourcegate

CMOS Transistor Analogy

Page 17: Logische Funktionen - uni-due.de...010 0110 & 010 0111 ' 010 1000 (010 1001 ) 010 1010 * 010 1011 + 010 1100 , 010 1101 - ... From Decimal to Binary. Grundlagen der Technische Informatik

Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

17Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

• “Logic gates” are better digital circuit building blocks than switches (transistors)– Why?...

Boolean Logic Gates -Building Blocks for Digital Circuits

Page 18: Logische Funktionen - uni-due.de...010 0110 & 010 0111 ' 010 1000 (010 1001 ) 010 1010 * 010 1011 + 010 1100 , 010 1101 - ... From Decimal to Binary. Grundlagen der Technische Informatik

Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

18Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

• To understand the benefits of “logic gates” vs. switches, we should first understand Boolean algebra

• “Traditional” algebra– Variables represent real numbers (x, y)– Operators operate on variables, return real numbers (2.5*x + y - 3)

• Boolean Algebra– Variables represent 0 or 1 only– Operators return 0 or 1 only– Basic operators

• AND: a AND b returns 1 only when both a=1 and b=1• OR: a OR b returns 1 if either (or both) a=1 or b=1• NOT: NOT a returns the opposite of a (1 if a=0, 0 if a=1)

Boolean Algebra and its Relation to Digital Circuits

a0011

b0101

AND0001

a0011

b0101

OR0111

a01

NOT10

Page 19: Logische Funktionen - uni-due.de...010 0110 & 010 0111 ' 010 1000 (010 1001 ) 010 1010 * 010 1011 + 010 1100 , 010 1101 - ... From Decimal to Binary. Grundlagen der Technische Informatik

Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

19Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

George Boole

George Boole(November 2, 1815 –December 8, 1864) was a British mathematicianand philosopher

Page 20: Logische Funktionen - uni-due.de...010 0110 & 010 0111 ' 010 1000 (010 1001 ) 010 1010 * 010 1011 + 010 1100 , 010 1101 - ... From Decimal to Binary. Grundlagen der Technische Informatik

Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

20Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

• Developed mid-1800’s by George Boole to formalize human thought– Ex: “I’ll go to lunch if Mary goes OR John goes, AND Sally does not

go.”• Let F represent my going to lunch (1 means I go, 0 I don’t go)• Likewise, m for Mary going, j for John, and s for Sally• Then F = (m OR j) AND NOT(s)

– Nice features• Formally evaluate

– m=1, j=0, s=1 --> F = (1 OR 0) AND NOT(1) = 1 AND 0 = 0• Formally transform

– F = (m and NOT(s)) OR (j and NOT(s)) » Looks different, but same function» We’ll show transformation techniques soon

• Formally prove– Prove that if Sally goes to lunch (s=1), then I don’t go (F=0)– F = (m OR j) AND NOT(1) = (m OR j) AND 0 = 0

a0011

b0101

AND0001

a0011

b0101

OR0111

a01

NOT10

Boolean Algebra and its Relation to Digital Circuits

Page 21: Logische Funktionen - uni-due.de...010 0110 & 010 0111 ' 010 1000 (010 1001 ) 010 1010 * 010 1011 + 010 1100 , 010 1101 - ... From Decimal to Binary. Grundlagen der Technische Informatik

Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

21Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

21

• Evaluate the Boolean equation F = (a AND b) OR (c AND d)for the given values of variables a, b, c, and d:– Q1: a=1, b=1, c=1, d=0.

•Answer: F = (1 AND 1) OR (1 AND 0) = 1 OR 0 = 1.

– Q2: a=0, b=1, c=0, d=1. •Answer: F = (0 AND 1) OR (0 AND 1) = 0 OR 0 = 0.

– Q3: a=1, b=1, c=1, d=1. •Answer: F = (1 AND 1) OR (1 AND 1) = 1 OR 1 = 1.

Evaluating Boolean Equations

a0011

b0101

AND0001

a0011

b0101

OR0111

a01

NOT10

Page 22: Logische Funktionen - uni-due.de...010 0110 & 010 0111 ' 010 1000 (010 1001 ) 010 1010 * 010 1011 + 010 1100 , 010 1101 - ... From Decimal to Binary. Grundlagen der Technische Informatik

Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

22Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

• Convert the following English statements to a Boolean equation– Q1. a is 1 and b is 1.

• Answer: F = a AND b– Q2. either of a or b is 1.

• Answer: F = a OR b– Q3. a is 1 and b is 0.

• Answer: F = a AND NOT(b) – Q4. a is not 0.

• Answer:–(a) Option 1: F = NOT(NOT(a))–(b) Option 2: F = a

Converting to Boolean Equations

Page 23: Logische Funktionen - uni-due.de...010 0110 & 010 0111 ' 010 1000 (010 1001 ) 010 1010 * 010 1011 + 010 1100 , 010 1101 - ... From Decimal to Binary. Grundlagen der Technische Informatik

Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

23Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

• Q1. A fire sprinkler system should spray water if high heat is sensed and the system is set to enabled.– Answer: Let Boolean variable h represent “high heat is sensed,” e

represent “enabled,” and F represent “spraying water.” Then an equation is: F = h AND e.

• Q2. A car alarm should sound if the alarm is enabled, and either the car is shaken or the door is opened. – Answer: Let a represent “alarm is enabled,” s represent “car is

shaken,” d represent “door is opened,” and F represent “alarm sounds.” Then an equation is: F = a AND (s OR d).

– (a) Alternatively, assuming that our door sensor d represents “door is closed” instead of open (meaning d=1 when the door is closed, 0 when open), we obtain the following equation: F = a AND (s OR NOT(d)).

Converting to Boolean Equations

Page 24: Logische Funktionen - uni-due.de...010 0110 & 010 0111 ' 010 1000 (010 1001 ) 010 1010 * 010 1011 + 010 1100 , 010 1101 - ... From Decimal to Binary. Grundlagen der Technische Informatik

Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

24Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

• Implement Boolean operators using transistors– Call those implementations logic gates. – Lets us build circuits by doing math -- powerful concept

Boolean algebra(mid-1800s)

Boole’s intent: formalizehuman thought

Switches(1930s)

Shannon (1938)

Digital design

Showed application of Boolean algebra to design of switch-

based circuits

For telephone switching and other electronic uses

Relating Boolean Algebra to Digital Design

Page 25: Logische Funktionen - uni-due.de...010 0110 & 010 0111 ' 010 1000 (010 1001 ) 010 1010 * 010 1011 + 010 1100 , 010 1101 - ... From Decimal to Binary. Grundlagen der Technische Informatik

Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

25Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

Logic Gates

x0011

y0101

F0001

x0011

y0101

F0111

x01

F10

Fxx

yF

ORN O T

Fx

y

AND

1

0

Fx

Symbol

TruthTable

Transistorcircuit

F

1

0

x

x

y

y

F

1

0

x y

x

y

1.8 V

1.2 V

0.6 V

0V“0”

“1”

1 and 0 each actually

corresponds to a voltage range

Page 26: Logische Funktionen - uni-due.de...010 0110 & 010 0111 ' 010 1000 (010 1001 ) 010 1010 * 010 1011 + 010 1100 , 010 1101 - ... From Decimal to Binary. Grundlagen der Technische Informatik

Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

26Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

0

1

1

0

time

F

x

x

0

1

F

1

0

1

0

F1x 0

(a)

1

0

F0x1

(b)

When the input is 0 When the input is 1

NOT gate

Page 27: Logische Funktionen - uni-due.de...010 0110 & 010 0111 ' 010 1000 (010 1001 ) 010 1010 * 010 1011 + 010 1100 , 010 1101 - ... From Decimal to Binary. Grundlagen der Technische Informatik

Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

27Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

x

0

0

1

1

y

0

1

0

1

F

0

1

1

1

1

0x

y

F1

1

0

0

timeWhen one input is 1 When both inputs are 0

OR gate

1

0

11

0

1

1

1

10

0

1

1

0

0

0

0

0

1

0

Page 28: Logische Funktionen - uni-due.de...010 0110 & 010 0111 ' 010 1000 (010 1001 ) 010 1010 * 010 1011 + 010 1100 , 010 1101 - ... From Decimal to Binary. Grundlagen der Technische Informatik

Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

28Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

x

0

0

1

1

y

0

1

0

1

F

0

0

0

1

1

0x

y

F1

1

0

0

timeWhen both inputs are 1 When an input is 0

AND gate

10

1

0

0 1

0

1

11

1

0

1 1

1

1

0

Page 29: Logische Funktionen - uni-due.de...010 0110 & 010 0111 ' 010 1000 (010 1001 ) 010 1010 * 010 1011 + 010 1100 , 010 1101 - ... From Decimal to Binary. Grundlagen der Technische Informatik

Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

29Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

More Gates

Page 30: Logische Funktionen - uni-due.de...010 0110 & 010 0111 ' 010 1000 (010 1001 ) 010 1010 * 010 1011 + 010 1100 , 010 1101 - ... From Decimal to Binary. Grundlagen der Technische Informatik

Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

30Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

• Recall Chapter 1 motion-in-dark example– Turn on lamp (F=1) when motion sensed (a=1) and no light (b=0)– F = a AND NOT(b)– Build using logic gates, AND and NOT, as shown– We just built our first digital circuit!

Building Circuits Using Gates

Page 31: Logische Funktionen - uni-due.de...010 0110 & 010 0111 ' 010 1000 (010 1001 ) 010 1010 * 010 1011 + 010 1100 , 010 1101 - ... From Decimal to Binary. Grundlagen der Technische Informatik

Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

31Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

• Q: Convert the following equation to logic gates: F = a AND NOT( b OR NOT(c) )

ab

cF

Start from the output, work back towards the inputs

Example: Converting a Boolean Equation to a Circuit of Logic Gates

Page 32: Logische Funktionen - uni-due.de...010 0110 & 010 0111 ' 010 1000 (010 1001 ) 010 1010 * 010 1011 + 010 1100 , 010 1101 - ... From Decimal to Binary. Grundlagen der Technische Informatik

Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

32Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

Start from the output, work back towards the inputs

as

dF

(a)

F = a AND (s OR d)1 2 a

b

c

F

(b)

F = (a AND NOT(b)) OR (b AND NOT(c))2 1 3

More examples

Page 33: Logische Funktionen - uni-due.de...010 0110 & 010 0111 ' 010 1000 (010 1001 ) 010 1010 * 010 1011 + 010 1100 , 010 1101 - ... From Decimal to Binary. Grundlagen der Technische Informatik

Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

33Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

(a) (b)

F = a AND b AND c

ab

FF

abc

c

Can think of as AND(a,b,c)

Using gates with more than 2 inputs

Page 34: Logische Funktionen - uni-due.de...010 0110 & 010 0111 ' 010 1000 (010 1001 ) 010 1010 * 010 1011 + 010 1100 , 010 1101 - ... From Decimal to Binary. Grundlagen der Technische Informatik

Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

34Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

• Design circuit for warning light• Sensors

– s=1: seat belt fastened– k=1: key inserted

• Capture Boolean equation– seat belt not fastened, and key

inserted• Convert equation to circuit

• Timing diagram illustrates circuit behavior– We set inputs to any values– Output set according to circuit

w = NOT(s) AND k

k

s

w

BeltWarn

Seatbelt

time

Inputs

Outputs

1

1

1

0

0

0

k

s

w

Example: Seat Belt Warning Light System

Page 35: Logische Funktionen - uni-due.de...010 0110 & 010 0111 ' 010 1000 (010 1001 ) 010 1010 * 010 1011 + 010 1100 , 010 1101 - ... From Decimal to Binary. Grundlagen der Technische Informatik

Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

35Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

Notice • Boolean algebra enables easy capture as equation

and conversion to circuit• How design with switches?

• Of course, logic gates are built from switches, but we think at level of logic gates, not switches

w = NOT(s) AND k

k

s

w

BeltWarn

Seatbelt

BeltWarn

w

1

0

0

1

s

k

Gates vs. switches

Page 36: Logische Funktionen - uni-due.de...010 0110 & 010 0111 ' 010 1000 (010 1001 ) 010 1010 * 010 1011 + 010 1100 , 010 1101 - ... From Decimal to Binary. Grundlagen der Technische Informatik

Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

36Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

• Only illuminate warning light if person is in the seat (p=1), and seat belt not fastened and key inserted

• w = p AND NOT(s) AND k

k

p

s

w

Belt W a r n

• Given t=1 for 5 seconds after key inserted. Turn on warning light when t=1 (to check that warning lights are working)

• w = (p AND NOT(s) AND k) OR t

k

wp

s

t

BeltWarn

More examples: Seat belt warning light extensions

Page 37: Logische Funktionen - uni-due.de...010 0110 & 010 0111 ' 010 1000 (010 1001 ) 010 1010 * 010 1011 + 010 1100 , 010 1101 - ... From Decimal to Binary. Grundlagen der Technische Informatik

Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

37Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

no yes

not ok

ok

xy

F

no yes

Some Gate-Based Circuit Drawing Conventions

Page 38: Logische Funktionen - uni-due.de...010 0110 & 010 0111 ' 010 1000 (010 1001 ) 010 1010 * 010 1011 + 010 1100 , 010 1101 - ... From Decimal to Binary. Grundlagen der Technische Informatik

Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

38Grundlagen der Technische InformatikWintersemester 2018/19

Vorlesender:Dr. Ing. Frank Sill Torres

• Unterschied kombinatorische und sequentielle Schaltungen

• Schalter (Transistoren) sind Grundelemente

• Logikgatter bestehen aus Transistoren

• Logikgatter ermöglichen Umsetzung Boolescher Logik zu digitalen Schaltungen

Was haben Sie gelernt?