Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more ➡
Standard view
Full view
of .
×
0 of .
Results for:
P. 1
Foundations Of Computer Science - Chapter 13

# Foundations Of Computer Science - Chapter 13

Ratings: 0|Views: 802|Likes:

Published by: Ian on Mar 15, 2009

### Availability:

Read on Scribd mobile: iPhone, iPad and Android.
See More
See less

09/05/2010

pdf

text

original

CHAPTER
13
33 33
Using Logic toDesignComputer Components
In this chapter we shall see that the propositional logic studied in the previouschapter can be used to design
digital
electronic circuits. Such circuits, found inevery computer, use two voltage levels (“high” and “low”) to represent the binaryvalues 1 and 0. In addition to gaining some appreciation for the design process,we shall see that algorithm-design techniques, such as “divide-and-conquer,” canalso be applied to hardware. In fact, it is important to realize that the process of designing a digital circuit to perform a given logical function is quite similar in spiritto the process of designing a computer program to perform a given task. The datamodels diﬀer signiﬁcantly, and frequently circuits are designed to do many things
in parallel
(at the same time) while common programming languages are designed
Parallel andsequentialoperation
to execute their steps
sequentially
(one at a time). However, general programmingtechniques like modularizing a design are as applicable to circuits as they are toprograms.
33 33
13.1 What This Chapter is About
This chapter covers the following concepts from digital circuit design:
3
The notion of a gate, an electronic circuit that performs a logical operation(Section 13.2).
3
How gates are organized into circuits (Section 13.3).
3
Certain kinds of circuits, called combinational, that are an electronic equivalentof logical expressions (Section 13.4).
3
Physical constraints under which circuits are designed, and what propertiescircuits must have to produce their answers quickly (Section 13.5).699

700
USING LOGIC TO DESIGN COMPUTER COMPONENTS
3
Two interesting examples of circuits: adders and multiplexers. Sections 13.6and 13.7 show how a fast circuit can be designed for each problem using adivide-and-conquer technique.
3
The memory element as an example of a circuit that remembers its input. Incontrast, a combinational circuit cannot remember inputs received in the past(Section 13.8).
33 33
13.2 Gates
A
gate
is an electronic device with one or more inputs, each of which can assumeeither the value 0 or the value 1. As mentioned earlier, the logical values 0 and1 are generally represented electronically by two diﬀerent voltage levels, but thephysical method of representation need not concern us. A gate usually has oneoutput, which is a function of its inputs, and which is also either 0 or 1.
(a)
AND
(b)
OR
(c)
NOT
(d)
NAND
(e)
NOR
Fig. 13.1.
Symbols for gates.
Each gate computes some particular Boolean function. Most electronic “tech-nologies” (ways of manufacturing electronic circuits) favor the construction of gatesfor certain Boolean functions and not others. In particular,
AND
- and
OR
-gates areusually easy to build, as are
NOT
-gates, which are called
inverters.
AND
- and
OR
-gates
Inverter
can have any number of inputs, although, as we discuss in Section 13.5, there isusually a practical limitation on how many inputs a gate can have. The output of an
AND
-gate is 1 if all its inputs are 1, and its output is 0 if any one or more of itsinputs are 0. Likewise, the output of an
OR
-gate is 1 if one or more of its inputs are1, and the output is 0 if all inputs are 0. The inverter (
NOT
-gate) has one input; itsoutput is 1 if its input is 0 and 0 if its input is 1.We also ﬁnd it easy to implement
NAND
- and
NOR
-gates in most technologies.The
NAND
-gate produces the output 1 unless all its inputs are 1, in which caseit produces the output 0. The
NOR
-gate produces the output 1 when all inputsare 0 and produces 0 otherwise. An example of a logical function that is harderto implement electronically is equivalence, which takes two inputs
x
and
y
andproduces a 1 output if
x
and
y
are both 1 or both 0, and a 0 output when exactly

SEC.
13.3
CIRCUITS
701one of
x
and
y
is 1. However, we can build equivalence circuits out of
AND
-,
OR
-,and
NOT
-gates by implementing a circuit that realizes the logical function
xy
+ ¯
x
¯
y
.The symbols for the gates we have mentioned are shown in Fig. 13.1. In eachcase except for the inverter (
NOT
-gate), we have shown the gate with two inputs.However, we could easily show more than two inputs, by adding additional lines. Aone-input
AND
- or
OR
-gate is possible, but doesn’t really do anything; it just passesits input to the output. A one-input
NAND
- or
NOR
-gate is really an inverter.
33 33
13.3 Circuits
Gates are combined into circuits by connecting the outputs of some gates to theinputs of others. The circuit as a whole has one or more inputs, each of which can
Circuit inputsand outputs
be inputs to various gates within the circuit. The outputs of one or more gates aredesignated circuit outputs. If there is more than one output, then an order for theoutput gates must be speciﬁed as well.
y
x
AB Dz
Fig. 13.2.
Equivalence circuit:
z
is the expression
x
y
.

## Activity (2)

### Showing

AllMost RecentReviewsAll NotesLikes
You've already reviewed this. Edit your review.
1 hundred reads|over 4 years ago
User_Abuser liked this|over 3 years ago