we know binary we know how to add and subtract in binary –same as in decimal next up: learn how...
TRANSCRIPT
• We know binary
• We know how to add and subtract in binary– Same as in decimal
• Next up: learn how apply this knowledge
Boolean and Binary Inputs
• Discrete voltages represented by 1 and 0
• For example: 0 = ground (GND) or 0 volts
1 = VDD or 5 volts
• What about 4.99 volts? Is that a 0 or a 1?
• What about 3.2 volts?
Boolean and Binary Inputs
Logic Levels
• Range of voltages for 1 and 0
• Different ranges for inputs and outputs to allow for noise
Logic Gates• Perform logic functions:
– inversion (NOT), AND, OR, etc.
• Single-input: – NOT gate, buffer
• Two-input: – AND, OR, etc.
Boolean and Binary Inputs
The Static Discipline
• With logically valid inputs, every circuit element must produce logically valid outputs
• Use limited ranges of voltages to represent discrete values
Practical Application
Driver ReceiverForbidden
Zone
NML
NMH
Input CharacteristicsOutput Characteristics
VO H
VDD
VO L
GND
VIH
VIL
Logic HighInput Range
Logic LowInput Range
Logic HighOutput Range
Logic LowOutput Range
NMH = VOH – VIH
NML = VIL – VOL
Practical Application - Transistors
g
s
d
g = 0
s
d
g = 1
s
d
OFF ON
• Logic gates built from transistors
• 3-ported voltage-controlled switch– 2 ports connected depending on voltage of 3rd– d and s are connected (ON) when g is 1
Boolean Algebra
8
Boolean algebra is based on the binary number system
George Boole(November 2, 1815 – December 8, 1864)
Boolean Algebra
9
Truth Tables
Boolean operations can be defined using a Truth Table.
Inversion:
A A
0 11 0
AND:A B A·B
0 0 00 1 01 0 01 1 1
OR:A B A+B
0 0 00 1 11 0 11 1 1
or justAB
Boolean Algebra
10
Truth Tables
Boolean operations can be defined using a Truth Table.
XOR:A B AB
0 0 00 1 11 0 11 1 0
NAND:A B A·B
0 0 10 1 11 0 11 1 0
NOR:A B A+B
0 0 10 1 01 0 01 1 0
Boolean Algebra
11
DeMorgan’s Theorems
A B A·B A·B A B A + B
0 0 0 1 1 1 10 1 0 1 1 0 11 0 0 1 0 1 11 1 1 0 0 0 0
A·B = A + B A+B = A · B
Proof:
A B A+B A+B A B A · B
0 0 0 1 1 1 10 1 1 0 1 0 01 0 1 0 0 1 01 1 1 0 0 0 0
Boolean Algebra
12
Example
A B C A BC AB BC BC AB F
0 0 0 1 1 1 0 0 0 0 00 0 1 1 1 0 0 0 1 0 10 1 0 1 0 1 0 1 0 1 10 1 1 1 0 0 0 0 0 1 11 0 0 0 1 1 1 0 0 0 11 0 1 0 1 0 1 0 1 0 11 1 0 0 0 1 0 1 0 0 11 1 1 0 0 0 0 0 0 0 0
F = AB + BC + BC + AB
Boolean Algebra
13
Another Example
F = AB + BC + BC + AC
A B C C AB BC BC AC F
0 0 0 1 0 0 0 0 00 0 1 0 0 0 0 0 00 1 0 1 0 1 0 0 10 1 1 0 0 0 1 0 11 0 0 1 0 0 0 0 01 0 1 0 0 0 0 1 11 1 0 1 1 1 0 0 11 1 1 0 1 0 1 1 1
Boolean Algebra
14
F = AB + BC + BC + AC
A B C C AB BC BC AC F
0 0 0 1 0 0 0 0 00 0 1 0 0 0 0 0 00 1 0 1 0 1 0 0 10 1 1 0 0 0 1 0 11 0 0 1 0 0 0 0 01 0 1 0 0 0 0 1 11 1 0 1 1 1 0 0 11 1 1 0 1 0 1 1 1
Is there a simpler way to determine how these inputs can produce these outputs?
Probably.
Boolean Algebra
15
Simplifying logical expression using Boolean algebra is not easy. Obscure identities must be applied in clever ways (this requires LOTS of practice).
There is a much easier (and more practical) way: Karnaugh maps
A B C D F0 0 0 0 00 0 0 1 00 0 1 0 00 0 1 1 00 1 0 0 10 1 0 1 00 1 1 0 00 1 1 1 01 0 0 0 11 0 0 1 11 0 1 0 11 0 1 1 11 1 0 0 11 1 0 1 01 1 1 0 11 1 1 1 1
0123456789
101112131415
F =
0 1 3 2
4 5 7 6
12 13 15 14
8 9 11 10
0 0 0 01 0 0 0
1 0 1 1
1 1 1 1A
B
C
D
Boolean Algebra
16
A B C D F0 0 0 0 00 0 0 1 00 0 1 0 00 0 1 1 00 1 0 0 10 1 0 1 00 1 1 0 00 1 1 1 01 0 0 0 11 0 0 1 11 0 1 0 11 0 1 1 11 1 0 0 11 1 0 1 01 1 1 0 11 1 1 1 1
0123456789
101112131415
F = _
0 1 3 2
4 5 7 6
12 13 15 14
8 9 11 10
0 0 0 01 0 0 0
1 0 1 1
1 1 1 1A
B
C
D
Karnaugh maps
Karnaugh Maps - Rules of Simplification
Rule 1. Groups may not include any cell containing a zero
Boolean Algebra
17
A B C D F0 0 0 0 00 0 0 1 00 0 1 0 00 0 1 1 00 1 0 0 10 1 0 1 00 1 1 0 00 1 1 1 01 0 0 0 11 0 0 1 11 0 1 0 11 0 1 1 11 1 0 0 11 1 0 1 01 1 1 0 11 1 1 1 1
0123456789
101112131415
F =_
0 1 3 2
4 5 7 6
12 13 15 14
8 9 11 10
0 0 0 01 0 0 0
1 0 1 1
1 1 1 1A
B
C
D
Karnaugh maps
Karnaugh Maps - Rules of Simplification
Rule 2. Groups may be horizontal or vertical, but not diagonal.
Boolean Algebra
18
A B C D F0 0 0 0 00 0 0 1 00 0 1 0 00 0 1 1 00 1 0 0 10 1 0 1 00 1 1 0 00 1 1 1 01 0 0 0 11 0 0 1 11 0 1 0 11 0 1 1 11 1 0 0 11 1 0 1 01 1 1 0 11 1 1 1 1
0123456789
101112131415
F =
0 1 3 2
4 5 7 6
12 13 15 14
8 9 11 10
0 0 0 01 0 0 0
1 0 1 1
1 1 1 1A
B
C
D
Karnaugh Maps - Rules of Simplification Rule 3. Groups must contain 1, 2, 4, 8, or in general 2n cells. That is if n = 1, a group will contain two 1's since 21 = 2. If n = 2, a group will contain four 1's since 22 = 4.
Boolean Algebra
19
A B C D F0 0 0 0 00 0 0 1 00 0 1 0 00 0 1 1 00 1 0 0 10 1 0 1 00 1 1 0 00 1 1 1 01 0 0 0 11 0 0 1 11 0 1 0 11 0 1 1 11 1 0 0 11 1 0 1 01 1 1 0 11 1 1 1 1
0123456789
101112131415
F =
0 1 3 2
4 5 7 6
12 13 15 14
8 9 11 10
0 0 0 01 0 0 0
1 0 1 1
1 1 1 1A
B
C
D
Karnaugh Maps - Rules of Simplification
Rule 4. Each group should be as large as possible. Each cell containing a one must be in at least one group.
Boolean Algebra
20
A B C D F0 0 0 0 00 0 0 1 00 0 1 0 00 0 1 1 00 1 0 0 10 1 0 1 00 1 1 0 00 1 1 1 01 0 0 0 11 0 0 1 11 0 1 0 11 0 1 1 11 1 0 0 11 1 0 1 01 1 1 0 11 1 1 1 1
0123456789
101112131415
F =
0 1 3 2
4 5 7 6
12 13 15 14
8 9 11 10
0 0 0 01 0 0 0
1 0 1 1
1 1 1 1A
B
C
D
Karnaugh Maps - Rules of Simplification Rule 5. Groups may overlap.
Boolean Algebra
21
A B C D F0 0 0 0 00 0 0 1 00 0 1 0 00 0 1 1 00 1 0 0 10 1 0 1 00 1 1 0 00 1 1 1 01 0 0 0 11 0 0 1 11 0 1 0 11 0 1 1 11 1 0 0 11 1 0 1 01 1 1 0 11 1 1 1 1
0123456789
101112131415
F =
0 1 3 2
4 5 7 6
12 13 15 14
8 9 11 10
0 0 0 01 0 0 0
1 0 1 1
1 1 1 1A
B
C
D
Karnaugh Maps - Rules of Simplification Rule 6. Groups may wrap around the table. The leftmost cell in a row may be grouped with the rightmost cell and the top cell in a column may be grouped with the bottom cell.
Boolean Algebra
22
A B C D F0 0 0 0 00 0 0 1 00 0 1 0 00 0 1 1 00 1 0 0 10 1 0 1 00 1 1 0 00 1 1 1 01 0 0 0 11 0 0 1 11 0 1 0 11 0 1 1 11 1 0 0 11 1 0 1 01 1 1 0 11 1 1 1 1
0123456789
101112131415
F =
0 1 3 2
4 5 7 6
12 13 15 14
8 9 11 10
0 0 0 01 0 0 0
1 0 1 1
1 1 1 1A
B
C
D
Karnaugh Maps - Rules of Simplification Rule 7. There should be as few groups as possible, as long as this does not contradict any of the previous rules.
Boolean Algebra
23
F =
0 1 3 2
4 5 7 6
12 13 15 14
8 9 11 10
0 0 0 01 0 0 0
1 0 1 1
1 1 1 1A
B
C
D
Karnaugh Maps - Rules of Simplification
Rule 7. There should be as few groups as possible, as long as this does not contradict any of the previous rules.
Rule 6. Groups may wrap around the table. The leftmost cell in a row may be grouped with the rightmost cell and the top cell in a column may be grouped with the bottom cell.
Rule 5. Groups may overlap.
http://www.youtube.com/watch?v=PA0kBrpHLM4
Rule 1. Groups may not include any cell containing a zero
Rule 4. Each group should be as large as possible. Each cell containing a one must be in at least one group.
Rule 3. Groups must contain 1, 2, 4, 8, or in general 2n cells. That is if n = 1, a group will contain two 1's since 21 = 2. If n = 2, a group will contain four 1's since 22 = 4.
Rule 2. Groups may be horizontal or vertical, but not diagonal.
Boolean Algebra
24
Simplifying logical expression using Boolean algebra is not easy. Obscure identities must be applied in clever ways (this requires LOTS of practice).
There is a much easier (and more practical) way: Karnaugh maps
A B C D F0 0 0 0 00 0 0 1 00 0 1 0 00 0 1 1 00 1 0 0 10 1 0 1 00 1 1 0 00 1 1 1 01 0 0 0 11 0 0 1 11 0 1 0 11 0 1 1 11 1 0 0 11 1 0 1 01 1 1 0 11 1 1 1 1
0123456789
101112131415
F = AC + AB + BCD___
0 1 3 2
4 5 7 6
12 13 15 14
8 9 11 10
0 0 0 01 0 0 0
1 0 1 1
1 1 1 1A
B
C
D
Implementing Logic with Switches
25
X
Y
0
1
1
0
X Y L0 0 00 1 11 0 11 1 0
XOR:A B AB
0 0 00 1 11 0 11 1 0
• Nicknamed “Mayor of Silicon Valley”
• Cofounded Fairchild Semiconductor in 1957
• Cofounded Intel in 1968• Co-invented the integrated
circuit• Figured out how to connect
multiple transistors on a silicon chip
Robert Noyce (1927-1990)
Practical Application - MOS Transistors
n
p
gatesource drain
substrate
SiO2
nMOS
Polysilicon
n
gate
source drain
• Metal oxide silicon (MOS) transistors: – Polysilicon (used to be metal) gate
– Oxide (silicon dioxide) insulator
– Doped silicon
Practical Application - Transistors: nMos
n
p
gatesource drain
substrate
n n
p
gatesource drain
substrate
n
GND
GND
VDD
GND
+++++++- - - - - - -
channel
Gate = 0
OFF (no connection between source and drain)
Gate = 1
ON (channel between source and drain)
Practical Application - Transistors: pMOS
SiO2
n
gatesource drainPolysilicon
p p
gate
source drain
substrate
• pMOS transistor is opposite– ON when Gate = 0– OFF when Gate = 1
Practical Application - Transistor Function
g
s
d
g = 0
s
d
g = 1
s
d
g
d
s
d
s
d
s
nMOS
pMOS
OFF ON
ON OFF
Practical Application - nMOS vs pMOS
• nMOS: pass good 0’s, so connect source to GND
• pMOS: pass good 1’s, so connect source to VDD
pMOSpull-upnetwork
outputinputs
nMOSpull-downnetwork
VDD
GND