Lec 8

Download as ppt
Download as ppt
You are on page 1of 12

Computer Programming TA C162

Today’s Menu
•Transistors
• MOS/CMOS
 n-Type
 P-Type
•Logic Gates Implementation Using Transistors
• AND
• OR
• NOT
• NOR
• NAND

21/01/09 Second Semester 2008-2009 1


Computer Programming TA C162

Transistor: Building Block of Computers


Microprocessors contain millions of transistors
• Intel Pentium 4 (2000): 48 million
• IBM PowerPC 750FX (2002): 38 million
• IBM/Apple PowerPC G5 (2003): 58 million

Logically, each transistor acts as a switch


Combined to implement logic functions
• AND, OR, NOT, XOR, NOR
Combined to build higher-level structures
• Adder, multiplexer, decoder, register, …
Combined to build processor
• LC-3, Pentium

21/01/09 Second Semester 2008-2009 2


Computer Programming TA C162

n-type MOS Transistor


MOS = Metal Oxide Semiconductor
• Two types: n-type and p-type
n-type
• When Gate has positive voltage,
short circuit between #1 and #2
(switch closed)
• When Gate has zero voltage,
open circuit between #1 and #2
(switch open) Gate = 1

Terminal #2 must be
connected to GND (0V).

Gate = 0

21/01/09 Second Semester 2008-2009 3


Computer Programming TA C162

p-type MOS Transistor


p-type is complementary to n-type
• When Gate has positive voltage,
open circuit between #1 and #2
(switch open)
• When Gate has zero voltage,
short circuit between #1 and #2
(switch closed)

Gate = 1
Terminal #1 must be
connected to +2.9V.

Gate = 0

21/01/09 Second Semester 2008-2009 4


Computer Programming TA C162

Logic Gates
Use switch behavior of MOS transistors
to implement logical functions: AND, OR, NOT.
Digital symbols:
• Recall that we assign a range of analog voltages to each
digital (logic) symbol

• Assignment of voltage ranges depends on electrical properties


of transistors being used
 Typical values for "1": +5V, +3.3V, +2.9V
 From now on we'll use +2.9V
21/01/09 Second Semester 2008-2009 5
Computer Programming TA C162

CMOS Circuit
Complementary MOS
Uses both n-type and p-type MOS transistors
• p-type
 Attached to + voltage
 Pulls output voltage UP when input is zero
• n-type
 Attached to GND
 Pulls output voltage DOWN when input is one

For all inputs, make sure that output is either connected to GND or to +, but
not both!

21/01/09 Second Semester 2008-2009 6


Computer Programming TA C162

NOR Gate

A B C
0 0 1
0 1 0
1 0 0
1 1 0
21/01/09 Second Semester 2008-2009 7
Computer Programming TA C162

Inverter (NOT Gate)

In Out
0 1
1 0

21/01/09 Second Semester 2008-2009 8


Computer Programming TA C162

OR Gate
A B C
0 0 0
0 1 1
1 0 1
1 1 1

Add inverter to NOR.

21/01/09 Second Semester 2008-2009 9


Computer Programming TA C162

NAND Gate (AND-NOT)

A B C
0 0 1
0 1 1
1 0 1
1 1 0
21/01/09 Second Semester 2008-2009 10
Computer Programming TA C162

AND Gate
A B C
0 0 0
0 1 0
1 0 0
1 1 1

Add inverter to NAND.

21/01/09 Second Semester 2008-2009 11


Computer Programming TA C162

Basic Logic Gates

21/01/09 Second Semester 2008-2009 12

You might also like