Semiconductors - University of Utah

53
1 Logic Gates, Boolean, etc. Erik Brunvand Semiconductors Materials that pass electric current are conductors. Silver copper Materials that block electric current are insulators. Rubber glass Materials that lie in between are semiconductors. Silicon germanium

Transcript of Semiconductors - University of Utah

Ø 1

Logic Gates, Boolean, etc.

Erik Brunvand

Semiconductors w  Materials that pass electric current are conductors.

•  Silver •  copper

w  Materials that block electric current are insulators. •  Rubber •  glass

w  Materials that lie in between are semiconductors. •  Silicon •  germanium

Ø 2

Current dir vs. Carrier dir w Current (amps) flows from positive to negative

n  “positive current” w BUT – the charge carriers are (usually) electrons

n  Electrons have negative charge n  So – the electrons move from

negative to positive

w Charge carriers move in opposite direction from current! n  Yes, it’s confusing…

Silicon w Atomic structure is well suited to electronics

n  or at least can be manipulated to be useful w Silicon is a Group IV material

n  4 valence electrons in the outer shell n  Bonds tightly with four neighbors n  Nothing left to conduct

Ø 3

Silicon w Silicon is a Group IV material

n  4 valence electrons in the outer shell n  Bonds tightly with four neighbors n  Nothing left to conduct

Figures from Reid Harrison

“Semi” conductor?

w Thermal energy (atomic-scale vibrations) can shake an electron loose n  Leaves a “hole” behind

Figures from Reid Harrison

Ø 4

“Semi” conductor?

n  Room temperature: 1.5x1010 free electrons per cubic centimeter l  But, 5x1022 silicon atoms / cc l  So, one out of every 3 trillion atoms has a missing e

Figures from Reid Harrison

Dopants w Group V: extra electron (n-type)

n  Phosphorous, Arsenic, w Group III: missing electron, (p-type)

n  Usually Boron

Figures from Reid Harrison

Ø 5

Dopants w Group V: extra electron (n-type)

n  Phosphorous, Arsenic, w Group III: missing electron, (p-type)

n  Usually Boron

Charge Carriers w  Conductors are full of charge; when a

voltage is applied to them, this charge flows. The rate of movement of this charge is electric current.

w  Electrons are negatively charged and therefore flow from - to + within a circuit

w  A hole is a positive charge carrier that can be understood as the lack of an electron. When a voltage is applied, the hole moves from + to -

w  The hole does not contain charge per se, but as a neighboring electron falls into it, it leaves behind a vacant hole, meaning that the hole moves in the opposite direction to the flow of electrons

w  When we have either holes or free electrons (i.e. charge flow), we get current.

Ø 6

Dopants w Note that each type of doped silicon is

electrostatically neutral in the large n  Consists of mobile electrons and holes n  And fixed charges (dopant atoms)

Figures from Reid Harrison

p-n Junctions

w A junction between p-type and n-type semiconductor forms a diode. n  Current flows only in one direction

p-type n-type

anode cathode

Ø 7

p-n Junctions

n  Two mechanisms for carrier (hole or electron) motion l  Drift - requires an electric field l  Diffusion – requires a concentration gradient

Figures from Reid Harrison

p-n Junctions

n  With no external voltage diffusion causes a depletion region l  Causes an

electric field because of charge recombination

l  Causes drift current…

Figures from Reid Harrison

Ø 8

p-n Junctions

n  Eventually reaches equilibrium where diffusion current offsets drift current

Figures from Reid Harrison

p-n Junctions

n  By applying an external voltage you can modulate the width of the depletion region and cause diffusion or drift to dominate…

Figures from Reid Harrison

Ø 9

Diodes w  When the anode is more positive in voltage than the cathode, current can

flow (forward-biased); when the cathode is more positive than the anode, current is blocked (reverse-biased).

Protection Diodes

w We’ve seen these… n  to protect against the effects of unwanted reverse

current

Ø 10

Diodes “drop” voltages

w There’s a voltage drop across a diode n  Has to do with generating

enough positive voltage to put them in forward bias

w Can be used to generate a set of voltages

Rectifying AC to DC

w Diode “bridges” can turn AC into DC n  This is a “half-wave rectifier”

Ø 11

Rectifying AC to DC

w Diode “bridges” can turn AC into DC n  This is a “full-wave rectifier”

Rectifying AC to DC

w Diode “bridges” can turn AC into DC n  This is a “full-wave rectifier”

Ø 12

Rectifying AC to DC

w You need to filter the new DC to get rid of the “bumps” n  Use a capacitor

Battery Backup w  Whilst the DC supply is larger than the Battery, D1’s anode has greater

voltage than its cathode, and D2’s cathode has greater voltage than its anode.

w  If we lose the DC supply, then the opposite occurs: D2’s anode has greater voltage than its cathode, and D1’s cathode has greater voltage than its anode.

Ø 13

Zener Diodes

w Zener diodes are like regular diodes n  but when the reverse voltage reaches a specified

voltage, they conduct in the reverse direction n  Can use them to “clamp” a voltage

A simple Power Supply

w Use a voltage regulator to convert a higher voltage into a stable lower voltage

Ø 14

A simple Power Supply

w Use a voltage regulator to convert a higher voltage into a stable lower voltage

A simple Power Supply

w Use a voltage regulator to convert a higher voltage into a stable lower voltage

Ø 15

Transistors w  Bi-Polar, JFETs, MOSFETs, Triacs, Diacs, etc. w  Usually 2 N-type silicon layers and 1 P-type, or vice versa.

•  3 terminals in bipolar transistors called Base, Collector, Emitter.

•  Current flows between Collector and Emitter in proportion to the amount of voltage applied between the Base and the Emitter

Transistor Mechanics w  At the PN junction we have a “depletion region”, that insulates the Base from the

Emitter and the Collector (just like in a diode!) w  Once voltage is applied between base and emitter, the depletion layer becomes

thinner, as the free electrons and holes move around, carrying charge. •  The greater the voltage, the thinner the layer becomes. •  The voltage does not need to be high to incite a change in the depletion layer

-- for silicon, less than 1V

Ø 16

Collector-Base Interaction w  The transistor therefore combines two circuits: base-emitter and collector-

emitter. •  Individually the base-emitter and base-collector interfaces are like two diodes, each protected

from the other. •  However, as soon as a little current flows between base and emitter, the collector is able to

‘steal’ a few of the loose electrons from the base, thereby facilitating a current between collector and emitter.

•  Because the base P-layer is much smaller than the N-layers, a large current can thereby be controlled by a small current.

Choosing a Transistor

w  Bipolar transistors are generally characterized according to their maximum load current (IC), minimum base current (IB) and minimum current gain (hFE) n  IC = hFE * IB •  To ensure that the transistor will turn on, make sure you can supply

sufficient base current to the transistor. •  To prevent the transistor overheating, your transistor’s IC must be greater

than the load current of the circuit. The circuit’s load current can be found using Ohm’s Law: •  load current = supply voltage / load resistance

•  The transistor’s hFE is a ratio of current gain from base to collector. So, for a transistor with a hFE of 100, a 1mA current at the base will result in a 100mA current at the collector. •  Stick to these rules, and you should be able to match appropriate

transistors to your circuits.

Ø 17

Darlington Pairs w  When we combine two transistors together, we can acquire greater current

handling ability. •  The transistor circuit is known as a “Darlington pair”, and has a hFE that is

equivalent to the product of each transistor’s hFE. •  Typically, the first transistor will be low power and the second higher

power, thus allowing a transistor with a very low IB to control a high current load.

A TIP120 is a Darlington Pair…

PNP transistors w  A PNP transistor operates like an NPN transistor, but in ‘reverse’. w  PNP transistors consist of one layer of negatively-charged N-type silicon sandwiched

between two layers of positively-charged P-type silicon. Therefore, rather than applying a positive voltage to the base layer, we now need to apply a negative voltage in order to energize the Collector-Emitter. n  Also, because the Collector and Emitter are positively rather than negatively

charged now, the current will flow in the opposite direction. •  In practice, this means that we make the Base LOW in order for current to flow

from emitter to collector. When the Base is HIGH, no current flows.

Ø 18

Two Types of CMOS Transistors

Transistor Flavors w Both BJT

and MOS have two flavors

NPN/NMOS

PNP/PMOS

Ø 19

Switching Theory

w A theory of how to make circuits using switches n  Use transistors as switches n  Arrange those switches to do something useful

Circuit Switches

w  Just like light switches n  Except the finger is really another electrical

signal n  Transistors do this (among other things)

Ø 20

“AND” Circuit

w Both switch X AND switch Y need to be closed for the light to light up

+5v

0v

X Y

“AND” Circuit

w Both switch X AND switch Y need to be closed for the light to light up

+5v

0v X Y

Ø 21

“AND” Circuit

w Both switch X AND switch Y need to be closed for the light to light up

+5v

0v X Y

“AND” Circuit

w Both switch X AND switch Y need to be closed for the light to light up

+5v

0v X Y

Ø 22

“OR” Circuit

w The light comes on if either X OR Y are closed

+5v

X

Y 0v

“OR” Circuit

w The light comes on if either X OR Y are closed

+5v

X

Y 0v

Ø 23

Transistor Circuits

w Voltage inverter

Input Output low high high low

Series/Parallel Circuits

A B Out low low low low high high high low high high high high

A B Out low low low low high low high low low high high high

A B

Ø 24

Series/Parallel Circuits

A B Out

0 0 0 0 1 1 1 0 1 1 1 1

A B Out 0 0 0 0 1 0 1 0 0 1 1 1

A B

Truth Tables

Digital Logic Gates

w  The building blocks of digital electronics are Logic Gates n  allow us to develop complex

operations on 1s and 0s. w  There are seven basic

types of logic gate: •  INVERT(NOT) •  AND •  NAND •  OR •  NOR •  XOR •  XNOR

Ø 25

Gate Truth Tables

A B Y 0 0 0 0 1 0 1 0 0 1 1 1

A B Y 0 0 1 0 1 1 1 0 1 1 1 0

A Y 0 1 1 0

Not AND NAND

Gate Truth Tables

A B Y 0 0 0 0 1 1 1 0 1 1 1 1

A B Y 0 0 1 0 1 0 1 0 0 1 1 0

A B Y 0 0 0 0 1 1 1 0 1 1 1 0

A B Y 0 0 1 0 1 0 1 0 0 1 1 1

OR NOR XOR XNOR

Ø 26

Boolean Algebra

w Mathematics to reason about switching circuits n  Logical algebra n  Looks a little like regular algebra… n  OR is like +, AND is like X

w All these functions are “Boolean functions” n  How many Boolean functions of two inputs are

there? n  We know about seven of them…

A B 0 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1

All 16 Boolean functions of 2 inputs

Ø 27

A B 0 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1

All 16 Boolean functions of 2 inputs

With n inputs, there are possible functions… n=2, 22 = 4, 24 = 16 n=3, 23 = 8, 28 = 255 n=4, 24 =16, 216 = 65,536 (64k) n=5, 25 = 32, 232 = 4,294,967,296 (4G) €

22n

A B 0 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1

0 1 OR AND

~A

A B

~B

XOR

XNOR NAND NOR

Some have handy names…

Ø 28

Boolean Algebra and Logic

w You can use Boolean expressions to reason about things n  Turn on the light if both switch A and switch B are

ON l  Light = A AND B

n  The warning light will come on if the pressure drops while the temperature is high, or if the pressure drops while not both the emergency override and the manual controls are activated. l  Light = (P AND T) OR (P AND NOT (E AND M))

Boolean Algebra and Logic

w You can use Boolean expressions to reason about things n  Turn on the light if both switch A and switch B are

ON l  Light = A�B

n  The warning light will come on if the pressure drops while the temperature is high, or if the pressure drops while not both the emergency override and the manual controls are activated. l  Light = (P �T) + (P � ~(E � M))

Ø 29

Boolean Algebra and Logic

n  The warning light will come on if the pressure drops while the temperature is high, or if the pressure drops while not both the emergency override and the manual controls are activated. l  Light = (P �T) + (P � ~(E � M))

PTEM L 0000 0 0001 0 0010 0 0011 0 0100 0 0101 0 0110 0 0111 0 1000 1 1001 1 1010 1 1011 0 1100 1 1101 1 1110 1 1111 1

Boolean Algebra and Logic

n  Boolean functions to Boolean Gates l  Light = (P �T) + (P �~(E �M))

P T

P

E M

E�M ~(E�M) (P �~(E �M))

(P �T) Light

Ø 30

Boolean Algebra and Logic

n  Boolean functions to Boolean Gates l  Light = (P �T) + (P �~(E �M))

P T

P

E M

~(E�M) (P �~(E �M))

(P �T) Light

Logic Gate Chips

w Small chips with a few basic logic gates w Two types:

n  74LSxx – bipolar chips n  74HCxx – CMOS chips

w Mostly interchangeable… n  Generally a 5v power supply n  TTL levels: off = 0v to 0.8v, on = 2.2v to 5v n  CMOS levels: off = 0v to 1.5v, on = 3.5v to 5v n  74HCTxx is CMOS that uses TTL levels…

Ø 31

INVERT (NOT) w  TTL chips such as 74ls04 or 74HCT04 have 6

NOT gates, and single V+ and GND pins

w  NOT basically makes the output the logic opposite of the input

Input Output low high high low

A Y 0 1 1 0

AND w  TTL chips such as the 7408 have 4 (quad)

AND gates w  AND requires both inputs to be high in

order for the output to be high

Input A Input B Output low low low low high low high low low high high high

A B Y 0 0 0 0 1 0 1 0 0 1 1 1

Ø 32

NAND w  Logic symbols that are N(NOT) generally have

bubbles at their output w  NAND is therefore the logic opposite of AND,

where the output is high so long as both inputs are not high

Input A Input B Output low low high low high high high low high high high low

A B Y 0 0 1 0 1 1 1 0 1 1 1 0

OR w  OR requires either input to be high in order for the

output to be high

Input A Input B Output low low low low high high high low high high high high

A B Y 0 0 0 0 1 1 1 0 1 1 1 1

Ø 33

NOR w  NOR is the logic opposite of OR w  NOR will only go high when neither input is high w  Note that NOR is wired up opposite to OR

Input A Input B Output low low high low high low high low low high high low

A B Y 0 0 1 0 1 0 1 0 0 1 1 0

Exclusive OR (XOR) w  XOR can be reduced to a combination of NOT, AND and OR gates w  A transistor analogy would be fairly complex w  XOR requires the inputs to be different from each other for the output to

be high

Input A Input B Output low low low low high high high low high high high low

A B Y 0 0 0 0 1 1 1 0 1 1 1 0

Ø 34

Exclusive NOR (XNOR) w  XNOR is the logic opposite of XOR w  XNOR requires both inputs to be the same in order for the output to be

high w  74LS266 or 4077

Input A Input B Output low low high low high low high low low high high high

A B Y 0 0 1 0 1 0 1 0 0 1 1 1

Logic Gate Inputs w  Since logic gates require 0v or 5V to operate, we cannot simply have a switch ‘open’

or ‘closed’ -- in this scenario the input is ‘floating’, and unstable. We need to provide two alternative paths, one to ground and one to +5V.

w  Many switches are already capable of this -- e.g. toggle switches have 3 contacts w  Other switches have to be modified using pull-up or pull-down resistors. w  A pull-up resistor will make the I/O line high unless the switch is pressed. w  A pull-down resistor will make the I/O line low unless the switch is pressed.

Ø 35

Combining Logic Gates w  In combination, we can use logic gates to form circuits that perform complex functions

w  If you would like an event to occur when a specific set of conditions are met, simply

make each condition a logic input, and design your own sequence of logic gates.

w  Using this approach, you can also maximize your Arduino’s processing load by using logic gates instead.

Hard-wired Installation Complexity

Ø 36

Consider Addition (in binary)

w 0 + 0 = 0 w 0 + 1 = 1 w 1 + 0 = 1 w 1 + 1 = 10 (2 in binary) w You can derive logical equations for each of

those signals

Consider Addition (in binary)

w A B CS 0 + 0 = 00 0 + 1 = 01 1 + 0 = 01 1 + 1 = 10 (2 in binary)

Sum = (not(A) and B) or (A and not(B)) Carry = A and B

Ø 37

Binary Nerd Humor

Consider Addition (in binary)

Carry = A and B

Sum = (not(A) and B) or (A and not(B))

A B Carry

A B Sum

Each logical function has a circuit that implements

that function

Ø 38

Tricky – use only NAND A B Sum

A

B Sum

Boolean Algebra Axioms and Theorems

There are actually a few more that are useful…

One can use these to manipulate Boolean expressions

Ø 39

Lab – Wire something up! w Consider what you would like your logic to do

n  Write down logic statement n  Choose gates n  Draw circuit and wire it up!

•  NAND = 74LS00 •  NOR = 74LS02 •  NOT = 74LS04 •  AND = 74LS08 •  OR = 74LS32 •  XOR = 74LS86

Logical Operators in C

Ø 40

Boolean Algebra and Logic

n  The warning light will come on if the pressure drops while the temperature is high, or if the pressure drops while not both the emergency override and the manual controls are activated. l  Light = (P �T) + (P � ~(E � M))

l  if ((P && T) || (P && ~(E && M)) { digitalWrite(LightPin, HIGH); }

A B 0 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1

è

Aside: Boolean Arguments

“material implication”

AèB is “A implies B”

Seems odd that this is always true when A is false… - Anything is possible if your premise is false! - AèB is the same Boolean function as ~A+B

Ø 41

Charles Dodgson (aka Lewis Carroll)

w According to the Mock Turtle: n  The four branches of

arithmetic are: l  Ambition l  Distraction l  Uglification l  Derision

Charles Dodgson (aka Lewis Carroll)

(a) All babies are illogical (b) Nobody is despised who can manage a

crocodile (c) Illogical persons are despised What conclusion can we draw from these

premises?

Ø 42

Charles Dodgson (aka Lewis Carroll)

(a)  All babies are illogical (b)  Nobody is despised who can manage a crocodile (c)  Illogical persons are despised

B: It is a baby L: It is logical M: It can manage a crocodile D: It is despised B è~L Mè~D ~LèD

Charles Dodgson (aka Lewis Carroll)

(a)  All babies are illogical (b)  Nobody is despised who can manage a crocodile (c)  Illogical persons are despised

B: It is a baby L: It is logical M: It can manage a crocodile D: It is despised B è~L Lè~B Mè~D Dè~M ~LèD ~DèL With implication “contrapositive” is also valid

Ø 43

Charles Dodgson (aka Lewis Carroll)

(a)  All babies are illogical (b)  Nobody is despised who can manage a crocodile (c)  Illogical persons are despised

B: It is a baby L: It is logical M: It can manage a crocodile D: It is despised B è~L Lè~B Mè~D Dè~M Bè~LèDè~M ~LèD ~DèL Implication is transitive

Charles Dodgson (aka Lewis Carroll)

(a)  All babies are illogical (b)  Nobody is despised who can manage a crocodile (c)  Illogical persons are despised

B: It is a baby L: It is logical M: It can manage a crocodile D: It is despised B è~L Lè~B Mè~D Dè~M Bè~LèDè~M ~LèD ~DèL Conclusion: No baby can manage a crocodile!

Ø 44

Alice and the Knight "You are sad," the Knight said in an anxious

tone: "let me sing you a song to comfort you."

"Is it very long?" Alice asked, for she had heard a good deal of poetry that day.

"It's long," said the Knight, "but it's very, very beautiful. Everybody that hears me sing it--either it brings the tears into their eyes, or else---"

"Or else what?" said Alice, for the Knight had made a sudden pause.

"Or else it doesn't, you know."

Logical Arguments

w Premises n  Not many students enjoy 471 or 471 is difficult n  471 is easy if circuits are easy

Ø 45

Logical Arguments

w Premises n  Not many students enjoy 471 or 471 is difficult n  471 is easy if circuits are easy

w  Is is valid to conclude: n  If circuits are easy, then not many students enjoy 471? n  That 471 is not difficult or circuits are easy? n  The 471 is not difficult or circuits are difficult?

Logical Arguments

w Premises n  Not many students enjoy 471 or 471 is difficult n  471 is easy if circuits are easy

w  Is is valid to conclude: n  If circuits are easy, then not many students enjoy 471? n  That 471 is not difficult or circuits are easy? n  The 471 is not difficult or circuits are difficult?

w  Does the conjunction (AND) of the premises imply (è) the conclusion?

Ø 46

Logical Arguments

w Premises n  Not many students enjoy 471 or 471 is difficult n  471 is easy if circuits are easy

w  Is is valid to conclude: n  If circuits are easy, then not many students enjoy 471? n  That 471 is not difficult or circuits are easy? n  The 471 is not difficult or circuits are difficult?

n  E: Students enjoy 471 n  D: 471 is difficult n  C: Circuits are easy

Logical Arguments

w Premises n  Not many students enjoy 471 or 471 is difficult ~E+D n  471 is easy if circuits are easy Cè~D

w  Is is valid to conclude: n  If circuits are easy, then not many students enjoy 471? n  That 471 is not difficult or circuits are easy? n  The 471 is not difficult or circuits are difficult?

n  E: Students enjoy 471 n  D: 471 is difficult n  C: Circuits are easy

Ø 47

Logical Arguments

w Premises n  Not many students enjoy 471 or 471 is difficult ~E+D n  471 is easy if circuits are easy Cè~D

w  Is is valid to conclude: n  If circuits are easy, then not many students enjoy 471? Cè~D n  That 471 is not difficult or circuits are easy? ~D+C n  The 471 is not difficult or circuits are difficult? ~D+~C

n  E: Students enjoy 471 n  D: 471 is difficult n  C: Circuits are easy

Truth Tables!

CDE (~E+D) Cè~D (and) ~(and) Cè~E ~(and)+(c) 000 001 010 011 100 101 110 111

(and)è(c)

Ø 48

Truth Tables!

CDE (~E+D) Cè~D (and) ~(and) Cè~E ~(and)+(c) 000 1 001 0 010 1 011 1 100 1 101 0 110 1 111 1

(and)è(c)

Truth Tables!

CDE (~E+D) Cè~D (and) ~(and) Cè~E ~(and)+(c) 000 1 1 001 0 1 010 1 1 011 1 1 100 1 1 101 0 1 110 1 0 111 1 0

(and)è(c)

Ø 49

Truth Tables!

CDE (~E+D) Cè~D (and) ~(and) Cè~E ~(and)+(c) 000 1 1 1 001 0 1 0 010 1 1 1 011 1 1 1 100 1 1 1 101 0 1 0 110 1 0 0 111 1 0 0

(and)è(c)

Truth Tables!

CDE (~E+D) Cè~D (and) ~(and) Cè~E ~(and)+(c) 000 1 1 1 0 001 0 1 0 1 010 1 1 1 0 011 1 1 1 0 100 1 1 1 0 101 0 1 0 1 110 1 0 0 1 111 1 0 0 1

(and)è(c)

Ø 50

Truth Tables!

CDE (~E+D) Cè~D (and) ~(and) Cè~E ~(and)+(c) 000 1 1 1 0 1 001 0 1 0 1 1 010 1 1 1 0 1 011 1 1 1 0 1 100 1 1 1 0 1 101 0 1 0 1 0 110 1 0 0 1 1 111 1 0 0 1 0

(and)è(c)

Truth Tables!

CDE (~E+D) Cè~D (and) ~(and) Cè~E ~(and)+(c) 000 1 1 1 0 1 1 001 0 1 0 1 1 1 010 1 1 1 0 1 1 011 1 1 1 0 1 1 100 1 1 1 0 1 1 101 0 1 0 1 0 1 110 1 0 0 1 1 1 111 1 0 0 1 0 1

(and)è(c)

Ø 51

Truth Tables!

CDE (~E+D) Cè~D (and) ~(and) Cè~E ~(and)+(c) 000 1 1 1 0 1 1 001 0 1 0 1 1 1 010 1 1 1 0 1 1 011 1 1 1 0 1 1 100 1 1 1 0 1 1 101 0 1 0 1 0 1 110 1 0 0 1 1 1 111 1 0 0 1 0 1

(and)è(c)

So yes – the first conclusion is valid

Logical Arguments

w Premises n  Not many students enjoy 471 or 471 is difficult n  471 is easy if circuits are easy

w  Is is valid to conclude: n  If circuits are easy, then not many students enjoy 471? YES n  That 471 is not difficult or circuits are easy? n  The 471 is not difficult or circuits are difficult?

Ø 52

Truth Tables!

CDE (~E+D) Cè~D (and) ~(and) ~D+C ~(and)+(c) 000 1 1 1 0 001 0 1 0 1 010 1 1 1 0 011 1 1 1 0 100 1 1 1 0 101 0 1 0 1 110 1 0 0 1 111 1 0 0 1

(and)è(c) (c)

Truth Tables!

CDE (~E+D) Cè~D (and) ~(and) ~D+~C ~(and)+(c) 000 1 1 1 0 001 0 1 0 1 010 1 1 1 0 011 1 1 1 0 100 1 1 1 0 101 0 1 0 1 110 1 0 0 1 111 1 0 0 1

(and)è(c) (c)

Ø 53

Conclusions

w Boolean algebra is a useful way to manipulate logical statements n  Truth tables are a brute-force way to reason

about logical statements n  Can implement Boolean expressions directly as a

circuit using 74xx parts n  Can describe Boolean expressions directly in C

statements using logical operators w Boolean logic also useful for reasoning about

logical puzzles…