What would life be without arithmetic, but a scene of horrors?
Sydney Smith (1835)
CHAPTER
2
2.1
Data Representation in
Computer Systems
INTRODUCTION
he organization of any computer depends considerably on how it represents
Tnumbers, characters, and contr
For more information on Moores Law, we refer the reader to Schaller
(1997). For detailed descriptions of early computers as well as profiles and reminiscences of industry pioneers, you may wish to consult the IEEE Annals of the
History of Computing, which
Toole, Betty A. Ada, the Enchantress of Numbers: Prophet of the Computer Age. Mill Valley, CA:
Strawberry Press, 1998.
Waldrop, M. Mitchell. Quantum Computing. MIT Technology Review 103: 3 (May/June 2000),
pp. 6066.
REVIEW OF ESSENTIAL TERMS AND CONCEPTS
CPU
(ALU, Registers,
and Control)
Memory
Input
and
Output
Data Bus
Address Bus
Control Bus
FIGURE 1.5 The Modified von Neumann Architecture, Adding a System Bus
by the need to maintain compatibility with von Neumann systems are free to use
many different
ture is used. The underlying premise is that every algorithm has a sequential
part that ultimately limits the speedup that can be achieved by multiprocessor
implementation.
CHAPTER SUMMARY
I
n this chapter we have presented a brief overview of computer or
Central Processing Unit
Program Counter
Registers
Arithmetic Logic
Unit
Main
Memory
Control
Unit
Input/Output
System
FIGURE 1.4 The von Neumann Architecture
The ideas present in the von Neumann architecture have been extended so
that programs and data sto
Comparison of Computer Components
Clockwise, starting from the top:
1) Vacuum Tube
2) Transistor
3) Chip containing 3200 2-input NAND gates
4) Integrated circuit package (the small silver square in
the lower left-hand corner is an integrated circuit)
Cour
guages are first translated to assembly, which is then directly translated to
machine language. This is a one-to-one translation, meaning that one assembly language instruction is translated to exactly one machine language
instruction. By having separate
a computer was as much of a feat of electrical engineering as it was an exercise in
algorithm design. Before their work on the ENIAC was complete, John W.
Mauchly and J. Presper Eckert conceived of an easier way to change the behavior
of their calculating
Lev
el 6
Lev
el 5
Lev
el 4
Lev
el 3
Lev
el 2
Lev
el 1
Lev
el 0
Use
Hig
ms
gra
r
h-L
ro
le P
utab
c
eve
lL
Ass
emb
ly L
Sys
tem
Exe
ang
ang
uag
uag
e
Sof
twa
re
e
va,
, Ja
C+
ode
Ass
g
atin
per
Con
ru
Inst
Mic
ic
ure
chi
t Ar
e
nS
d
wire
ard
rH
de o
roco
L
A Look Inside a Computer
Have you even wondered what the inside of a computer really looks like? The
example computer described in this section gives a good overview of the components of a modern PC. However, opening a computer and attempting to find
and
10. Under the von Neumann architecture, a program and its data are both stored in memory. It is therefore possible for a program, thinking a memory location holds a piece
of data when it actually holds a program instruction, to accidentally (or on purpose
26. How does the fetch-decode-execute cycle work?
27. What is meant by parallel computing?
28. What is the underlying premise of Amdahls Law?
EXERCISES
1. In what ways are hardware and software different? In what ways are they the same?
2. a) How many mil
In signed magnitude, the sign bit is used only for the sign, so we cant carry
into it. If there is a carry emitting from the seventh bit, our result will be truncated as the seventh bit overflows, giving an incorrect sum. (Example 2.11 illustrates this ov
implies, a signed-magnitude number has a sign as its left-most bit (also referred
to as the high-order bit or the most significant bit) while the remaining bits represent the magnitude (or absolute value) of the numeric value. For example, in an
8-bit wor
2.3.3
Converting between Power-of-Two Radices
Binary numbers are often expressed in hexadecimaland sometimes octalto
improve their readability. Because 16 = 24, a group of 4 bits (called a hextet) is
easily recognized as a hexadecimal digit. Similarly, wi
vide a predictable degree of accuracy. For the sake of clarity, however, we will
simply discard (or truncate) our answer when the desired accuracy has been
achieved, as shown in Example 2.7.
EXAMPLE 2.7 Convert 0.3437510 to binary with 4 bits to the right
EXAMPLE 2.4 Convert 14710 to binary.
2 |147
2 |73
2 |36
2 |18
2 |9
2 |4
2 |2
2 |1
0
1
1
0
0
1
0
0
1
2 divides 147 73 times with a remainder of 1
2 divides 73 36 times with a remainder of 1
2 divides 36 18 times with a remainder of 0
2 divides 18 9 times w
EXAMPLE 2.5 Convert 0.430410 to base 5.
0.4304
0.4000 = 51 2
0.0304
0.0000 = 52 0
0.0304
0.0240 = 53 3
0.0064
0.0064 = 54 4
0.0000
(A placeholder)
Reading from top to bottom, we find 0.430410 = 0.20345.
Because the remainder method works with positive
2.2
POSITIONAL NUMBERING SYSTEMS
At some point during the middle of the sixteenth century, Europe embraced the
decimal (or base 10) numbering system that the Arabs and Hindus had been using
for nearly a millennium. Today, we take for granted that the numb
EXAMPLE 2.2 Convert 10410 to base 3 using subtraction.
104
81 = 34 1
23
0 = 33 0
23
18 = 32 2
5
3 = 31 1
2
2 = 30 2
0
10410 = 102123
The division-remainder method is faster and easier than the repeated subtraction
method. It employs the idea that successi
rent rate of miniaturization, it would take about 500 years to put the entire solar
system on a chip! Clearly, the limit lies somewhere between here and there. Cost
may be the ultimate constraint. Rocks Law, proposed by early Intel capitalist
Arthur Rock,
business. Also, thanks to the clone makers, large numbers of these systems soon
began finding true personal use in peoples homes.
IBM eventually lost its microcomputer market dominance, but the genie was
out of the bottle. For better or worse, the IBM arc
computer, including the CPU, and RAM and ROM memory, as well as an assortment of other essential components. The components on the motherboard
tend to be the most difficult to identify. Above you see an Intel D850 motherboard with the more important compo
outright) that this is a fairly fast drive. Usually disk speeds are stated in terms of
the number of milliseconds required (on average) to access data on the disk, in
addition to how fast the disk rotates.
Rotational speed is only one of the determining f
% -*- LaTeX -*-%
%
handout.sty - definitions for notes, class handouts, homeworks,
%
exams, and so forth.
%
% -% set one-inch margins all around, NOT counting the headers and footers
\RequirePackage[margin=1in]cfw_geometry
% Fonts and typesetting
\Require