logic and integrated circuits lin zhong elec101, spring 2011
TRANSCRIPT
Key concepts
• Binary numeral system• Boolean logic
– Logic gates– Functional completeness
• CMOS gates• Integrated circuits
2
Binary computing
• Modern computing are based on binary states – Two values: HIGH vs. LOW, 1 vs. 0, true vs. false
• Why– Easy to implement– Robust against interference, noise,
3
Computing with binary states
• Binary numeral system– Represent numeric values using two values: 0 and 1– The more “natural” numeral system is decimal
• 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
– One to one mapping between the two systems
4
Decimal Binary
0 0
1 1
2 10
3 11
4 100
Decimal Binary
5 101
6 110
7 111
8 1000
9 1001
How about a two-to-one computer
6
Binary “states” for input and output: HIGH or LOW (1 or 0)
How many different computers are there?
A
OutB
A B Out
0 0
0 1
1 0
1 1
How about a two-to-one computer
7
Binary “states” for input and output: HIGH or LOW (1 or 0)
Useless ones: Out always 1; Out always 0; Out=A; Out=B
InverterOut= Invert (A); Out= Invert (B)
Useful ones:????
A
OutB
Three basic logic operations• Inversion (NOT): Out = ¬ In
• AND: Out = A Λ B
• OR: Out = A V B
8
In Out
0 1
1 0
A B Out
0 0 0
0 1 0
1 0 0
1 1 1
A B Out
0 0 0
0 1 1
1 0 1
1 1 1
How about a two-to-one computer
10
Binary “states” for input and output: HIGH or LOW (1 or 0)
Useless ones:Out = 0; Out =1; Out =A; Out=B;Inverters:Out= ¬A; Out= ¬B;
Useful ones:Out = A Λ B(AND), Out= A V B(OR), Out= A XOR BOut = ¬(A Λ B) (NAND), Out= ¬ (A V B) (NOR), Out = ¬ ( A XOR B)
A Λ (¬B); (¬A) Λ B; A V (¬B); (¬A) V B;
A
OutB
Functional completeness
• NOT, AND and OR can be used to build ANY Boolean function– Functionally complete
• Can you prove the following?– NOR is functionally complete– NAND is functionally complete
11
Adder
16
A B
Sum
Carry-out
A, B, and Sum are states that take value from 0 to 9
Carry-out is a state that take value from 0 to 1
A B Sum Carry-out
2 5 7 0
9 9 8 1
… … … …
The simplest adder
17
A B
Sum
Carry-out
A, B, and Sum are states that take value from 0 to 1
Carry-out is a state that take value from 0 to 1
A B Sum Carry-out
0 1 1 0
1 1 0 1
1 0 1 0
0 0 0 0
Truth table
The simplest adder (Contd.)
18
A B
Sum
Carry-out
A, B, and Sum are states that take value from 0 to 1
Carry-out is a state that take value from 0 to 1
A B Sum Carry-out
0 1 1 0
1 1 0 1
1 0 1 0
0 0 0 0
Truth table
Sum= A XOR BCarry-out = A AND B
XOR
Sum= A XOR B = [A Λ (¬B)] V [(¬A) Λ B]
= [A AND (NOT B)] OR [(NOT A) AND B]
=[A NAND (NOT B)] NAND [(NOT A) NAND B]
= [(A AND B) NOR (A NOR B)]
21
Computing with binary states (Contd.)• Boolean logic
– Variables are binary (0 or 1)– Three operations on binary variables
• Inversion (¬), AND (Λ), and OR (V)
– Five axioms
24
George Boole
1815-1864
Ivan Sutherland won Turing Award in 1988 for his Ph.D. work in 1963
http://www.cl.cam.ac.uk/techreports/UCAM-CL-TR-574.pdf
“Programmable” integrated circuit
34
A B
Output
Control
Storage
0110100010101Instruction in machine code
36
Computing vs. human performance
Sources: intel.com and factmonster.com
1968 1972 1976 1980 1984 1988 1992 1996 2000 20041
10
100
1000
10000
100000
1000000
Olympic Gold Metal winner: 100m dash (men)Olympic God Metal winner: 100m dash (women)# of transistors for Intel processorProcessor performance measured in MIPS
Year
Tim
es
of
imp
rov
em
en
t
37
Computing vs. humanity
1965 1970 1975 1980 1985 1990 1995 2000 20050.000001
0.00001
0.0001
0.001
0.01
0.1
1
10
USA Federal minimum wage in 2003 dollar
Average transistor price for Intel processors in contemporary dollar
US
A $
Source: Intel.com and dol.gov