From Switches to Transistors and Gates - PowerPoint PPT Presentation

About This Presentation
Title:

From Switches to Transistors and Gates

Description:

useful for manufacturing ... out = bd. out = bd. 1. 0. 0. 1. 0. 0. 0. 0. 0. 0. 0. 0. 1. 0. 0. 1. 00 01 11 10. 00. 01. ab. cd. 11. 10. 0 ... – PowerPoint PPT presentation

Number of Views:50
Avg rating:3.0/5.0
Slides: 33
Provided by: csCor
Category:

less

Transcript and Presenter's Notes

Title: From Switches to Transistors and Gates


1
From Switches to Transistors and Gates
  • Prof. Sirer
  • CS 303
  • Koç University

2
Origins
  • The most amazing and likely to be most long-lived
    invention of the 1800s was

3
Origins
  • The most amazing and likely to be most long-lived
    invention of the 1800s was
  • The steam engine?
  • The lightning rod?
  • The carbonated beverage?

4
Origins
  • The most amazing and likely to be most long-lived
    invention of the 1800s was
  • THE ELECTRIC SWITCH

5
A switch
  • A switch is a simple device that can act as a
    conductor or isolator
  • Can be used for amazing things

6
Switches
  • Either (OR)

-
7
Switches
  • Either (OR)
  • Both (AND)

-
-
  • One can build basic devices, but operation
    requires mechanical force

8
Transistors
  • What happens when switches are replaced with
    solid-state devices
  • The most amazing invention of the 1900s
  • Can be used for purposes other than switching
    (e.g. radios)
  • Two types, PNP and NPN

-

P
P
N
collector
emitter
collector
collector
base

NPN
N
N
-
P
PNP
base
emitter
emitter
9
P and N Transistors
  • NPN Transistor
  • Connect E to C whenbase 1
  • PNP Transistor
  • Connect E to C whenbase 0

E
E
B
B
C
C
  • Can be used to build primitives from which
    electronic machines can be constructed

10
Then and Now
  • The first transistor, on a workbench at ATT Bell
    Laboratories in 1947
  • An Intel Pentium has approximately 125 million
    transistors

11
Inverter
  • Function NOT
  • Called an inverter
  • Symbol
  • Useful for taking the inverse of an input

in
out
gnd
in
out
In Out
0 1
1 0
Truth table
12
NAND Gate
  • Function NAND
  • Symbol

a
a
b
out
out
b
gnd
A B out
0 0 1
1 0 1
0 1 1
1 1 0
13
NOR Gate

out
b
  • Function NOR
  • Symbol

a
gnd
A B out
0 0 1
1 0 0
0 1 0
1 1 0
14
Building Functions
  • NOT
  • AND
  • OR
  • NAND and NOR are universal, can implement any
    function using just NAND or just NOR gates
  • useful for manufacturing
  • Can specify functions by describing gates, truth
    tables or logic equations

a
b
a
b
15
Logic Equations
  • AND
  • out ab
  • OR
  • out a b
  • NOT
  • out a

16
Identities
  • Identities are useful for manipulating logic
    equations
  • For purposes of optimization ease of
    implementation
  • a a 1
  • a 0 a
  • a 1 1
  • aa 0
  • a0 0
  • a1 a
  • a(bc) ab ac
  • (a b) a b
  • (a b) a b
  • a a b a b

17
Logic Manipulation
  • Can manipulate logic equations algebraically
  • Can also use a truth table to prove equivalence
  • Example (ab)(ac) a bc

a b c ab ac LHS bc RHS
0 0 0 0 0 0 0 0
0 0 1 0 1 0 0 0
0 1 0 1 0 0 0 0
0 1 1 1 1 1 1 1
1 0 0 1 1 1 0 1
1 0 1 1 1 1 0 1
1 1 0 1 1 1 0 1
1 1 1 1 1 1 1 1
(ab)(ac) aa ab ac bc a a(bc)
bc a(1 (bc)) bc a bc
18
Logic Minimization
  • A common problem is how to implement a desired
    function most efficiently
  • One can derive the equation from the truth table
  • How does one find the most efficient equation?
  • Manipulate algebraically until satisfied
  • Use Karnaugh maps

for all outputs that are 1, take the
correspondingminterm, OR the minterms toobtain
the result in sum of products form
a b c minterm
0 0 0 abc
0 0 1 abc
0 1 0 abc
0 1 1 abc
1 0 0 abc
1 0 1 abc
1 1 0 abc
1 1 1 abc
19
Karnaugh maps
  • Encoding of the truth table where adjacent cells
    differ in only one bit

ab
00 01 11 10
a b out
0 0 0
0 1 0
1 0 0
1 1 1
0 0 1 0
Corresponding Karnaugh map
truth tablefor AND
20
Bigger Karnaugh Maps
a
a
b
4-inputfunc
3-inputfunc
y
b
y
c
d
c
ab
c
00 01 11 10
ab
0
cd


00 01 11 10
00




1
01
11
10
21
Minimization with Karnaugh maps (1)
a b c out
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 1
1 0 0 1
1 0 1 1
1 1 0 0
1 1 1 0
  • Sum of minterms yields
  • abc abc abc abc

22
Minimization with Karnaugh maps (2)
a b c out
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 1
1 0 0 1
1 0 1 1
1 1 0 0
1 1 1 0
  • Sum of minterms yields
  • abc abc abc abc
  • Karnaugh maps identify which inputs are
    (ir)relevant to the output

ab
c
00 01 11 10
0
0 0 0 1
1 1 0 1
1
23
Minimization with Karnaugh maps (2)
a b c out
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 1
1 0 0 1
1 0 1 1
1 1 0 0
1 1 1 0
  • Sum of minterms yields
  • abc abc abc abc
  • Karnaugh map minimization
  • Cover all 1s
  • Group adjacent blocks of 2n 1s that yield a
    rectangular shape
  • Encode the common features of the rectangle
  • out ab ac

ab
c
00 01 11 10
0
0 0 0 1
1 1 0 1
1
24
Karnaugh Minimization Tricks (1)
ab
c
00 01 11 10
  • Minterms can overlap
  • out bc ac ab
  • Minterms can span 2, 4, 8 or more cells
  • out c ab

0
0 1 1 1
0 0 1 0
1
ab
c
00 01 11 10
0
1 1 1 1
0 0 1 0
1
25
Karnaugh Minimization Tricks (2)
ab
00 01 11 10
cd
00
  • The map wraps around
  • out bd
  • out bd

0 0 0 0
1 0 0 1
1 0 0 1
0 0 0 0
01
11
10
ab
cd
00 01 11 10
00
1 0 0 1
0 0 0 0
0 0 0 0
1 0 0 1
01
11
10
26
Karnaugh Minimization Tricks (3)
ab
00 01 11 10
cd
00
  • Dont care values can be interpreted
    individually in whatever way is convenient
  • assume all xs 1
  • out d
  • assume middle xs 0
  • assume 4th column x 1
  • out bd

0 0 0 0
1 x x x
1 x x 1
0 0 0 0
01
11
10
ab
cd
00 01 11 10
00
1 0 0 x
0 x x 0
0 x x 0
1 0 0 1
01
11
10
27
Multiplexors
  • A multiplexor selects between multiple inputs
  • out a, if d 0
  • out b, if d 1
  • Build truth table
  • Build Karnaugh map
  • Derive logic diagram

a
0
b
d
28
Multiplexor Implementation
  • Build a truth table

a b d out
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 1
1 0 0 1
1 0 1 0
1 1 0 1
1 1 1 1
29
Multiplexor Implementation
  • Build the Karnaugh map

ab
d
00 01 11 10
0
0 0 1 1
0 1 1 0
a b d out
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 1
1 0 0 1
1 0 1 0
1 1 0 1
1 1 1 1
1
30
Multiplexor Implementation
  • Derive minimal logic equation
  • out ad bd

ab
d
00 01 11 10
a b d out
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 1
1 0 0 1
1 0 1 0
1 1 0 1
1 1 1 1
0
0 0 1 1
0 1 1 0
1
31
Multiplexor Implementation
  • Draw the circuit
  • out ad bd

ab
d
00 01 11 10
0
0 0 1 1
0 1 1 0
a b d out
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 1
1 0 0 1
1 0 1 0
1 1 0 1
1 1 1 1
1
a
out
d
b
32
Summary
  • We can now implement any logic circuit
  • Can do it efficiently, using Karnaugh maps to
    find the minimal terms required
  • Can use either NAND or NOR gates to implement the
    logic circuit
  • Can use P- and N-transistors to implement NAND or
    NOR gates
Write a Comment
User Comments (0)
About PowerShow.com