Transistor-based Combinational Logic: Exploring AND, OR, and NAND Gates - Prof. Peter M. C, Lab Reports of Engineering

A detailed explanation of how to implement combinational logic using transistors. The author covers the basics of transistors, their types, and how to implement simple logic functions like and, or, and not. The document also includes examples of implementing more complex logic blocks and a 1-bit register.

Typology: Lab Reports

Pre 2010

Uploaded on 09/02/2009

koofers-user-vnx
koofers-user-vnx 🇺🇸

4.5

(2)

10 documents

1 / 12

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
ENGR 100 1 Peter Chen
Implementing combinational and sequential
logic
We’ve used combinational logic, registers, and memory as
building blocks in our digital circuits
Specified the behavior of combinational logic as truth table
and in Verilog
• now we’ll implement arbitrary combinational logic
blocks with transistors
Specified the behavior of registers and memory
• now we’ll implement a register with combinational logic
and feedback
Overview of implementing combinational logic
• implement simple combinational logic functions (AND,
OR, NOT)
• combine these to implement arbitrary combinational
logic blocks
Transistors
Transistor is a controlled switch
• switch can be connected (source data flows to output
data) or disconnected (source data does not flow to out-
put data)
• state of the switch depends on a control input
p-type transistor
• if control input = 0, then output is connected to source (1)
• if control input = 1, then output is disconnected
n-type transistor
• if control input = 0, then output is disconnected
• if control input = 1, then output is connected to source (0)
p-type
1
control input
output
n-type
0
control input
output
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Transistor-based Combinational Logic: Exploring AND, OR, and NAND Gates - Prof. Peter M. C and more Lab Reports Engineering in PDF only on Docsity!

Implementing combinational and sequential

logic

We’ve used combinational logic, registers, and memory as

building blocks in our digital circuits

Specified the behavior of combinational logic as truth table

and in Verilog

• now we’ll implement arbitrary combinational logic

blocks with transistors

Specified the behavior of registers and memory

• now we’ll implement a register with combinational logic

and feedback

Overview of implementing combinational logic

• implement simple combinational logic functions (AND,

OR, NOT)

• combine these to implement arbitrary combinational

logic blocks

Transistors

Transistor is a controlled switch

• switch can be connected (source data flows to output

data) or disconnected (source data does not flow to out-

put data)

• state of the switch depends on a control input

p-type transistor

• if control input = 0, then output is connected to source (1)

• if control input = 1, then output is disconnected

n-type transistor

• if control input = 0, then output is disconnected

• if control input = 1, then output is connected to source (0)

p-type

control input

output

n-type

control input

output

What do these circuits do?

p-type

A

n-type

A

out

A out 0 1

p-type

A

n-type

A

output

B p-type

n-type

B

A B output 0 0 0 1 1 0 1 1

Implementing NAND with transistors Implementing AND with transistors

A B output 0 0 1 0 1 1 1 0 1 1 1 0

What does this circuit do?

p-type

~A

output

~B p-type

n-type

A

~B n-type

Multiple inputs, multiple output rows are 1

Implementing a 1-bit register

What does this circuit do?

A B C output 0 0 0 0 0 0 1 0 0 1 0 1 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1

NOT1 NOT

NOT1 (^) out NOT2 (^) out

Setting the stored value to 1

Remember that OR of anything with 1 produces 1

Setting SET=1 will

• change the output of the OR gate to 1, which will

• change NOT1out to 0, which will

• change NOT2out to 1

• after this, SET can go back to 0, and the value of

NOT2 out will remain 1

Clearing the stored value to 0

Setting CLEAR=1 will

• change output of OR2 to 1, which will

• change NOT2out to 0, which will

• change NOT1out to 1

• after this, CLEAR can go back to 0, and the value of

NOT2 out will remain 0

NOT1 NOT

NOT1 (^) out NOT2 (^) out

NOT1 NOT

NOT1 (^) out NOT2 (^) out

Adding a clock Edge-triggered register

The previous circuit is called a LATCH

• writes the new value whenever CLOCK=1 and

WRITE=

How to make an edge-triggered register (called a FLIP-FLOP)

from a LATCH?

General-purpose computers

What would it take to turn the E100 on the DE2 into a standal-

one, general-purpose computer?

The E100 on the DE2 is quite capable

• execute general-purpose algorithms, by composing them

from simpler operations, e.g. arithmetic average (with

addition, division), square root (with successive approx-

imation)

• input devices

keyboard

mouse

DPDT switches

microphone

SD card

serial port (receive)

• output devices

VGA

LCD module

speaker

LEDs

serial port (send)

What capabilities does a normal computer have that the E

lacks?

What if we added these capabilities? Is this now a standalone,

general-purpose computer?