Sie sind auf Seite 1von 12

ME 310: Microprocessors

and Automatic Control

Basics of digital logic design


Combinational

P.S. Gandhi
Mechanical Engineering
IIT Bombay

PRASANNA S GANDHI 1

gandhi@me.iitb.ac.in

Life Skill

Process of Learning or
Gaining Knowledge
n Journey from something known to
something unknown
n What it is not?
Just information: (a lot of it is on web
why we need classroom teaching)
Just memory
n So what to do if you feel you dont
understand things? Go one step back and
connect dots there what was missing..
PRASANNA S GANDHI gandhi@me.iitb.ac.in 2

1
Recap

n Introduction why we should study


microprocessors and control fundes?
n Examples of real life automation in
industry and in appliances
n Core or brain of all these is
microprocessor
n Todays class: start with building blocks
for microprocessors
PRASANNA S GANDHI gandhi@me.iitb.ac.in 3

Applications of Logic
Design/Microprocessors
n Embedded products and real-time
control systems: as we saw already
n Scientific equipment
Testing, sensing, reporting
n Conventional computer design
CPUs, memories, peripherals
n Networking and communications
Phones, modems, routers, computer
PRASANNA S GANDHI gandhi@me.iitb.ac.in 4

2
Brief history
n 1850: George Boole invents Boolean algebra
Maps logical propositions to symbols
Permits manipulation of logic statements using mathematics
n 1938: Claude Shannon links Boolean algebra to switches
His Masters thesis
n 1945: John von Neumann develops first stored program
computer
Its switching elements are vacuum tubes (a big advance from
relays)
n 1946: ENIAC--worlds first all electronic computer
18,000 vacuum tubes
Several hundred multiplications per minute
n 1947: Shockley, Brattain, and Bardeen invent the transistor
replaces vacuum tubes
n enable integration of multiple devices into one package
gateway to PRASANNA
modern electronics
S GANDHI gandhi@me.iitb.ac.in 5

Switches to Implement
Digital Logic

n AND logic
A B
Z A B

Z = A AND B

n OR logic A

Z A

Z = A OR B

BPRASANNA S GANDHI gandhi@me.iitb.ac.in 6

3
Switches to Implement
Digital Logic

n AND logic
A B
Z A=1 B=1

Z = A AND B

n OR logic A

Z A=1

Z = A OR B

BPRASANNA S GANDHI gandhi@me.iitb.ac.in 7

B=0

Scaling the
Logic
A B
Z A=1 B=1

Z = A AND B

n Q: How to use output z Z

as a switch input to ???


some other logic circuit
instead of bulb? A=1 B=1

PRASANNA S GANDHI gandhi@me.iitb.ac.in


User User 8

input input

4
Switching networks
n To build larger computations
Use a light bulb (output of the network) to set
other switches (inputs to another network)
concept of relay

This is the way


older big size
computers
were created

n Connect one network with another and so on


PRASANNA S GANDHI gandhi@me.iitb.ac.in 9

Transistors replacing
relays
n Relays: bulky unreliable
n Invention of transistors first in the form of
cathode ray tubes and next in the form of
semiconductor revolutionized digital circuits
n Current technology: Complementary metal
oxide semiconductor (CMOS) :
Several chips including pentium use this
Fabrication using VLSI technology (Very large
scale integration)
n MOS transistors act as voltage controlled
PRASANNA S GANDHI gandhi@me.iitb.ac.in 10

switches

5
CMOS Transistors

n Have 3 terminals source S, gate G and drain


D two varieties (hence the word
complementory) mentioned below
G G

S D S D
n-channel p-channel

Normally open (when G is low) Normally closed (when G is low)

PRASANNA S GANDHI gandhi@me.iitb.ac.in 11

CMOS Transistors

n Have 3 terminals source S, gate G and drain


D two varieties (hence the word
complementory) mentioned below
G G

S D S D
n-type p-type

Closes when Voltage(G) > voltage(S) Opens when Voltage(G) > voltage(S)

PRASANNA S GANDHI gandhi@me.iitb.ac.in 12

6
CMOS circuit for simple
NOT gate
X n Input is X and output is Y
n Can you generate a truth
3v
table (1 means 3v):
Y
X Y

NOT Gate 0 volts : 0 3volts: 1


0v
3 volts : 1 0 volts: 0

Why not just the upper


n

P type devices not very good in connecting


MOS???
low voltages. Output may not get quite low X
enough and could not be used appropriately
PRASANNA S GANDHI gandhi@me.iitb.ac.in
Y 13
to connect the transistor in the next circuit 3v

Simple network
Logic Gate: NOT
n Three other possibilities
Can we connect 0v at S of p-type
transistor and get 0v as output at D when
X its switched on normally?
P-type
Can we connect 5v at S of n-type
3v
transistor and get 5v as output at D when
Y its switched on by giving G high (needs to
be greater than 5v+d)?
Can we have zero at Y when we are not
0v
connected by wire (through transistors) to
N-type
zero?
Answers NO
PRASANNA forgandhi@me.iitb.ac.in
S GANDHI practical reasons: see 14
characteristics of CMOS transistors

7
Logic gates and their
CMOS circuit
X Y
Truth tables
3v NAND
X Y Z
Z 0 0 1
0 1 1
1 0 1
0v
1 1 0
NOR
X Y
X Y Z
3v 0 0 1
0 1 0
Z
1 0 0
1 1 0
PRASANNA S GANDHI gandhi@me.iitb.ac.in 15
0v

How to construct other


gates in similar way?

n AND = NOT(NAND) so invert output of NAND


gate (circuit??)
n OR = NOT(NOR) so invert the output of NOR
gate (circuit??)

PRASANNA S GANDHI gandhi@me.iitb.ac.in 16

8
Some practical aspects:
CMOS networks
n What influences the speed: wires
acting as capacitor and charging
discharging delays
n Is zero perfect 0v or is 1 perfect 3v?
No. there is a noise margin transfer
characteristics (example: NOT gate)
3v
Logic 0 input Vin Vout
Vout Logic 1 input
PRASANNA S GANDHI gandhi@me.iitb.ac.in
Vin 17

Some practical aspects:


CMOS networks
Why do we use digital abstraction??
n

Robustness!!

So are these Vin Vout


circuit analog
or digital
3v
Logic 0 input

Vout Logic 1 input


PRASANNA S GANDHI gandhi@me.iitb.ac.in
Vin 18

9
Logic design
What is design?
n Given a problem develop a solution using
available resources to meet some specific
design performance parameters
Logic design?
n Converting application task inputs and
outputs to specifications in terms of 0s and
1s. (encoding) several possible ways
n Establishing mathematical relationship and
developing combination of basic elements to
achieve the goal several possible ways
PRASANNA S GANDHI gandhi@me.iitb.ac.in 19

n Selection of optimum design

Example
Inputs Output/s n Say you have a logic table
A B C Z
with inputs and outputs
0 0 0 0 specified. How will you
0 0 1 1 come up with some
0 1 0 0 combination of standard
0 1 1 0 gates to realize it in
1 0 0 1
practice? Unique way or
1 0 1 0
several ways
1 1 0 1
n Z = (A BC)+ (ABC) +
1 1 1 0
(ABC)
n Further simplification
PRASANNA S GANDHI gandhi@me.iitb.ac.in 20
possible K maps

10
Example
Inputs Output/s n Z = (A BC)+ (ABC) +
(ABC)
A B C Z
0 0 0 0
n Further simplification
0 0 1 1 possible K maps,
0 1 0 0 Boolean identities
0 1 1 0
n Using the CMOS circuits for
1 0 0 1
AND, OR, and NOT gates
1 0 1 0
1 1 0 1
this expression can be
1 1 1 0 realized in practice! Isnt it?
n Z is NOT(A) AND (NOT(B))
AND C OR
PRASANNA S GANDHI gandhi@me.iitb.ac.in 21

Example
n Z = (A BC)+ (ABC) +
(ABC)
A B C
n Z is NOT(A) AND (NOT(B))
AND C OR

Q:how to realize 3
input AND circuit
(we saw 2 input)
PRASANNA S GANDHI gandhi@me.iitb.ac.in 22

11
THANK YOU

PRASANNA S GANDHI 23
gandhi@me.iitb.ac.in

12

Das könnte Ihnen auch gefallen