Download - CSC 110 - Intro. to Computing Lecture 5: Gates, Circuits, & Transistors.

Transcript
Page 1: CSC 110 - Intro. to Computing Lecture 5: Gates, Circuits, & Transistors.

CSC 110 -Intro. to Computing

Lecture 5:

Gates, Circuits, & Transistors

Page 2: CSC 110 - Intro. to Computing Lecture 5: Gates, Circuits, & Transistors.

Announcements

Homework available on BlackboardHomework due Friday at 4:00PM

Hand to me or put in my box in Wehle 207

Quiz on this material next Thursday Quiz last week went fairly well

Top was 100; Mean was 77 (σ = 20.7)Scores available on Blackboard

Come to my office to pick up your quiz

Page 3: CSC 110 - Intro. to Computing Lecture 5: Gates, Circuits, & Transistors.

Announcements

CSC tutors are now availableHours posted outside Wehle 208Also come to my office hours, make an

appointment, or call/e-mail me questions

Page 4: CSC 110 - Intro. to Computing Lecture 5: Gates, Circuits, & Transistors.

Circuit Design

In your group, complete work with circuitsCompute the truth tables for circuitsDraw the diagrams for these equations

)()( caba )()( bcba

Page 5: CSC 110 - Intro. to Computing Lecture 5: Gates, Circuits, & Transistors.

Truth Table

)()( bcba a b c c' a+b c'+b (a+b) * (c' + b)0 0 0 1 0 1 00 0 1 0 0 0 00 1 0 1 1 1 10 1 1 0 1 1 11 0 0 1 1 1 11 0 1 0 1 0 01 1 0 1 1 1 11 1 1 0 1 1 1

Page 6: CSC 110 - Intro. to Computing Lecture 5: Gates, Circuits, & Transistors.

Truth Table

a b c a' (a'+b) (a+c)' (a'+b) * (a+c)'0 0 0 1 1 1 10 0 1 1 1 0 00 1 0 1 1 1 10 1 1 1 1 0 01 0 0 0 0 0 01 0 1 0 0 0 01 1 0 0 1 0 01 1 1 0 1 0 0

)()( caba

Page 7: CSC 110 - Intro. to Computing Lecture 5: Gates, Circuits, & Transistors.

Circuit Design

)()( bcba

Page 8: CSC 110 - Intro. to Computing Lecture 5: Gates, Circuits, & Transistors.

Circuit Design

)()( caba

Page 9: CSC 110 - Intro. to Computing Lecture 5: Gates, Circuits, & Transistors.

Algebraic Properties

Property AND ORCommutative ab = ba a + b = b + aAssociative (ab)c = a(bc) (a + b) + c = a + (b + c)Distributive a(b + c) = ab + ac a + (bc) = (a + b)(a + c)Identity a1 = a a + 0 = aComplement a(a') = 0 a + a' = 1DeMorgan (ab)' = a' + b' (a + b)' = a'b'Idempotency aa = a a + a = a

Law of Double Negation: a’’ = a

Page 10: CSC 110 - Intro. to Computing Lecture 5: Gates, Circuits, & Transistors.

Improving Circuit Design

Circuit Property Used in this Step

Identity

Commutative

Distributive

)()( bcba

)()( cbab

)( cab

Page 11: CSC 110 - Intro. to Computing Lecture 5: Gates, Circuits, & Transistors.

Improving Circuit DesignCircuit Property Used in this Step

Identity

DeMorgan’s Law

Associativity

Commutativity

Distributive

Identity

Distributive

Identity

Identity

)()( caba )()( caba caba ))((cbaa ))((

cbaaa ))()((

cbaa ))((cba ))1((

ca )1(ca

Page 12: CSC 110 - Intro. to Computing Lecture 5: Gates, Circuits, & Transistors.

Circuit Propagation Delay

Time taken for signal to get through circuit Important measure when building processorGate cannot generate results until it has all of its

inputs Each gate starts at the time of the latest input

Each gate requires a set amount of time to complete

Could be specific amount of time (e.g., 10 ps) Or state result as multiple of gate delays

Page 13: CSC 110 - Intro. to Computing Lecture 5: Gates, Circuits, & Transistors.

How are these improved?

How long will this circuit need to complete?

)( cab

Page 14: CSC 110 - Intro. to Computing Lecture 5: Gates, Circuits, & Transistors.

How are these improved?

How long will it take for the signal to propagate through?

Page 15: CSC 110 - Intro. to Computing Lecture 5: Gates, Circuits, & Transistors.

Circuit Delay Propagation

What is the propagation delay for this circuit?

Page 16: CSC 110 - Intro. to Computing Lecture 5: Gates, Circuits, & Transistors.

Circuit Delay Propagation

What about this circuit?

Page 17: CSC 110 - Intro. to Computing Lecture 5: Gates, Circuits, & Transistors.

Transistors

Transistors used to implement gatesUses a semiconductive material

Material can serve as both conductor and insulator Silicon is the preferred semiconductor because of

cost. Why is it so cheap?

Page 18: CSC 110 - Intro. to Computing Lecture 5: Gates, Circuits, & Transistors.

Transistors

Originally invented by Bell Labs in 1947Have been improved since then…

Can switch on-and-off in nanoseconds Each transistor dissipates energy

Why is this be a problem?

Page 19: CSC 110 - Intro. to Computing Lecture 5: Gates, Circuits, & Transistors.

My View of Transistor

Source

Page 20: CSC 110 - Intro. to Computing Lecture 5: Gates, Circuits, & Transistors.

My View of Transistor

Ground

Page 21: CSC 110 - Intro. to Computing Lecture 5: Gates, Circuits, & Transistors.

My View of Transistor

Output

Page 22: CSC 110 - Intro. to Computing Lecture 5: Gates, Circuits, & Transistors.

My View of Circuit

Input:Franklin “off”flying a kite

Page 23: CSC 110 - Intro. to Computing Lecture 5: Gates, Circuits, & Transistors.

My View of Circuit

Input:Franklin “on”poking key

Page 24: CSC 110 - Intro. to Computing Lecture 5: Gates, Circuits, & Transistors.

Engineer’s View of a Circuit

Source connects system power Always at +5V (e.g. “high” state or 1)

Ground drains transistor’s energy Leaves transistor at +1V (e.g. 0)

When Vin controls “base” Acts like on-off switch When on, source drains into ground When off, source signal sent to Vout

Page 25: CSC 110 - Intro. to Computing Lecture 5: Gates, Circuits, & Transistors.

Transistor Design

Turns out NOT, NAND, and NOR are easiest gates to turn into transistorsHow do these work?

Page 26: CSC 110 - Intro. to Computing Lecture 5: Gates, Circuits, & Transistors.

Transistor Design

Apple wanted NAND-based memory (rather than NOR-based) for iPod Nano. Why?

Page 27: CSC 110 - Intro. to Computing Lecture 5: Gates, Circuits, & Transistors.

Combinatorial Circuits

So far, all circuits have been combinatorialOutput is determined only by input valuesWhy would we need other circuits?

Page 28: CSC 110 - Intro. to Computing Lecture 5: Gates, Circuits, & Transistors.

Sequential Circuits

Sequential circuits include another featureOutput determine by inputs AND current stateUsed when current state is important detail

E.g., Memory

Page 29: CSC 110 - Intro. to Computing Lecture 5: Gates, Circuits, & Transistors.

S-R Latch S-R latch stores single

binary digit (1 or 0) Result is value of X

Inputs stand for Set and Reset

Could also be implemented with NOR gates

Adapted from Computer Science Illuminated, Dale and Lewis, p. 112

X’

Page 30: CSC 110 - Intro. to Computing Lecture 5: Gates, Circuits, & Transistors.

S-R Latch

X’

Normally, S & R = 1 Maintains value of X

S = 1, R = 0 X = 0 Called the “set state”

S = 0, R = 1 X = 1 Called the “reset state”

Latches also called “flip-flop”s

Page 31: CSC 110 - Intro. to Computing Lecture 5: Gates, Circuits, & Transistors.

For next lecture

Start doing the homework Start reading Section 5 Be ready to discuss:

What Individual Computer Component Descriptions Mean

Sizes Disks Speed