Murdocca - Principles of Computer Architecture (Prentice, 1999)(1).pdf

(2873 KB) Pobierz
PRINCIPLES OF
COMPUTER
ARCHITECTURE
CLASS TEST EDITION – AUGUST 1999
Miles J. Murdocca
Department of Computer Science
Rutgers University
New Brunswick, NJ 08903 (USA)
murdocca@cs.rutgers.edu
http://www.cs.rutgers.edu/~murdocca/
Vincent P. Heuring
Department of Electrical and Computer Engineering
University of Colorado
Boulder, CO 80309-0425 (USA)
heuring@colorado.edu
http://ece-www.colorado.edu/faculty/heuring.html
Copyright © 1999 Prentice Hall
For Ellen, Alexandra, and Nicole
and
For Gretchen
PREFACE
iii
PREFACE
About the Book
Our goal in writing this book is to expose the inner workings of the modern
digital computer at a level that demystifies what goes on inside the machine.
The only prerequisite to
Principles of Computer Architecture
is a working
knowledge of a high-level programming language. The breadth of material has
been chosen to cover topics normally found in a first course in computer
architecture or computer organization. The breadth and depth of coverage
have been steered to also place the beginning student on a solid track for con-
tinuing studies in computer related disciplines.
In creating a computer architecture textbook, the technical issues fall into
place fairly naturally, and it is the organizational issues that bring important
features to fruition. Some of the features that received the greatest attention in
Principles of Computer Architecture
include the choice of the instruction set
architecture (ISA), the use of case studies, and a voluminous use of examples
and exercises.
THE INSTRUCTIONAL ISA
A textbook that covers assembly language programming needs to deal with the
issue of which instruction set architecture (ISA) to use: a model architecture,
or one of the many commercial architectures. The choice impacts the instruc-
tor, who may want an ISA that matches a local platform used for student
assembly language programming assignments. To complicate matters, the
local platform may change from semester to semester: yesterday the MIPS,
today the Pentium, tomorrow the SPARC. The authors opted for having it
both ways by adopting a SPARC-subset for an instructional ISA, called “A
RISC Computer” (ARC), which is carried through the mainstream of the
iv
PREFACE
book, and complementing it with platform-independent software tools that sim-
ulate the ARC ISA as well as the MIPS and x86 (Pentium) ISAs.
CASE STUDIES, EXAMPLES, AND EXERCISES
Every chapter contains at least one case study as a means for introducing the stu-
dent to “real world” examples of the topic being covered. This places the topic in
perspective, and in the authors’ opinion, lends an air of reality and interest to the
material.
We incorporated as many examples and exercises as we practically could, cover-
ing the most significant points in the text. Additional examples and solutions are
available on-line, at the companion Web site (see below.)
Coverage of Topics
Our presentation views a computer as an integrated system. If we were to choose
a subtitle for the book, it might be “An Integrated Approach,” which reflects high
level threads that tie the material together. Each topic is covered in the context of
the entire machine of which it is a part, and with a perspective as to how the
implementation affects behavior. For example, the finite precision of binary
numbers is brought to bear in observing how many 1’s can be added to a floating
point number before the error in the representation exceeds 1. (This is one rea-
son why floating point numbers should be avoided as loop control variables.) As
another example, subroutine linkage is covered with the expectation that the
reader may someday be faced with writing C or Java programs that make calls to
routines in other high level languages, such as Fortran.
As yet another example of the integrated approach, error detection and correc-
tion are covered in the context of mass storage and transmission, with the expec-
tation that the reader may tackle networking applications (where bit errors and
data packet losses are a fact of life) or may have to deal with an unreliable storage
medium such as a compact disk read-only memory (CD-ROM.)
Computer architecture impacts many of the ordinary things that computer pro-
fessionals do, and the emphasis on taking an integrated approach addresses the
great diversity of areas in which a computer professional should be educated.
This emphasis reflects a transition that is taking place in many computer related
undergraduate curricula. As computer architectures become more complex they
must be treated at correspondingly higher levels of abstraction, and in some ways
PREFACE
v
they also become more technology-dependent. For this reason, the major portion
of the text deals with a high level look at computer architecture, while the appen-
dices and case studies cover lower level, technology-dependent aspects.
THE CHAPTERS
Chapter 1: Introduction
introduces the textbook with a brief history of com-
puter architecture, and progresses through the basic parts of a computer, leaving
the student with a high level view of a computer system. The conventional von
Neumann model of a digital computer is introduced, followed by the System Bus
Model, followed by a topical exploration of a typical computer. This chapter lays
the groundwork for the more detailed discussions in later chapters.
Chapter 2
: Data Representation
covers basic data representation. One’s comple-
ment, two’s complement, signed magnitude and excess representations of signed
numbers are covered. Binary coded decimal (BCD) representation, which is fre-
quently found in calculators, is also covered in Chapter 2. The representation of
floating point numbers is covered, including the IEEE 754 floating point stan-
dard for binary numbers. The ASCII, EBCDIC, and Unicode character repre-
sentations are also covered.
Chapter 3
: Arithmetic
covers computer arithmetic and advanced data represen-
tations. Fixed point addition, subtraction, multiplication, and division are cov-
ered for signed and unsigned integers. Nine’s complement and ten’s complement
representations, used in BCD arithmetic, are covered. BCD and floating point
arithmetic are also covered. High performance methods such as carry-lookahead
addition, array multiplication, and division by functional iteration are covered. A
short discussion of residue arithmetic introduces an unconventional high perfor-
mance approach.
Chapter 4
: The Instruction Set Architecture
introduces the basic architectural
components involved in program execution. Machine language and the
fetch-execute cycle are covered. The organization of a central processing unit is
detailed, and the role of the system bus in interconnecting the arithmetic/logic
unit, registers, memory, input and output units, and the control unit are dis-
cussed.
Assembly language programming is covered in the context of the instructional
ARC (A RISC Computer), which is loosely based on the commercial SPARC
architecture. The instruction names, instruction formats, data formats, and the
Zgłoś jeśli naruszono regulamin