Iiiiiiiiii: Verview OF Omputer Ystems
Iiiiiiiiii: Verview OF Omputer Ystems
S U P P L E M E N T
A
I
I
I
I
I
I
I
I
I
I
OVERVIEW
OF COMPUTER SYSTEMS
A.1 Introduction
This supplement introduces computer basics. Specifically, it discusses computer
hardware components, programming languages, and operating systems.
229
5670appa.qxd_lbI 10/2/03 4:00 PM Page 230
I
I
I
I
I
I
I
I
I
SUPPLEMENTS
Monitor
Motherboard
Graphics
CPU Cache Controller Keyboard
Printer
Hard disk
drive
Figure A.1 A computer system consists of a CPU, cache, memory, hard disk, floppy disk, monitor,
and printer.
A.2.2 Memory
Memory is used to store information and programs. A memory unit is an ordered se-
quence of storage cells, each capable of holding a piece of data. Every cell has a
unique address. The address is used to locate the cell for storing and retrieving data.
Figure A.2 shows data and instructions stored in memory.
230
5670appa.qxd_lbI 10/2/03 4:00 PM Page 231
I
I
I
I
I
I
I
I
I
SUPPLEMENT A OVERVIEW OF COMPUTER SYSTEMS
Figure A.2 Memory has a physical address for locating data and instructions in the memory.
Since we can access data at any location, the memory is also referred to as RAM
(random-access memory). Today’s personal computers usually have at least
64 megabyte of RAM. A byte is 8 bits. A bit is a binary digit (0 or 1). A megabyte
is about 1 million bytes. The data stored in computers are represented by patterns
of bits.
A program and its data must be brought to memory before they can be executed. A
memory cell is never empty, but its initial content may be meaningless to your pro-
gram. The current content of a memory cell is lost whenever new information is
placed in the cell.
Today’s computer memory, like the CPU, is built on silicon semiconductor chips
containing thousands of transistors embedded on their surface. Compared to the
CPU chips, memory chips are less complicated, slower, and less expensive.
In addition to regular memory chips, most current desktop computers have a spe-
cial type of RAM called cache memory. Cache memory is faster than the regular
memory. In consequence, the system can store the most frequently used instruc-
tions and data in the cache to improve system performance. Cache memory is more
expensive, so its storage size is usually small. Most new PCs have between 128K and
512K cache memory.
231
5670appa.qxd_lbI 10/2/03 4:00 PM Page 232
I
I
I
I
I
I
I
I
I
SUPPLEMENTS
A.2.3.1 Disks
There are two kinds of disks: hard disks and floppy disks. Personal computers usually
have a 3.5-inch floppy disk drive and a hard drive. A floppy disk has a fixed capac-
ity of about 1.44 MB. Hard disk capacities vary. The capacity of the hard disks of
the latest PCs is in the range of 10 to 30 gigabytes. Access speeds range from 175 to
300 milliseconds for floppy disks and 8 to 20 milliseconds for hard disks. Both disk
drives are often encased inside the computer. A floppy disk is easily movable. A hard
disk is mounted inside the case of the computer. Removable hard disks are also
available.
A.2.3.2 CD-ROMs
There are two types of CD-ROM drives: CD-R and CD-RW. A CD-R is read-only
permanent storage, and the user cannot modify its contents once they are recorded.
A CD-RW can be used like a floppy disk. A single CD can hold up to 650 MB.
Most software is distributed through CD-Rs. New PCs all come with a CD-RW
drive that can work with both CD-R and CD-W.
A.2.3.3 Tapes
Tapes are now mainly used for backup of data and programs. Unlike disks and CD-
ROMs, tapes store information sequentially. The computer must retrieve informa-
tion in the order it was stored. Tapes are very slow. It would take one to two hours
to back up a 1-gigabyte hard disk.
232
5670appa.qxd_lbI 10/2/03 4:00 PM Page 233
I
I
I
I
I
I
I
I
I
SUPPLEMENT A OVERVIEW OF COMPUTER SYSTEMS
233
5670appa.qxd_lbI 10/2/03 4:00 PM Page 234
I
I
I
I
I
I
I
I
I
SUPPLEMENTS
Assembly languages were developed to make programming easy. Since the computer
cannot understand assembly language, however, a program called assembler is used
to convert assembly language programs into machine code, as shown in Figure A.3.
Assembly
Macro Library
Source File
Assembler
Object File
234
5670appa.qxd_lbI 10/2/03 4:00 PM Page 235
I
I
I
I
I
I
I
I
I
SUPPLEMENT A OVERVIEW OF COMPUTER SYSTEMS
Compiler
Linker
Executable File
You can run a source program on any machine with appropriate compilers. The
source program must be recompiled, however, because the object program can only
run on a specific machine. Nowadays computers are networked to work together.
Java was designed to run object programs on any platform. With Java, you write the
program once and compile the source program into a special type of object code.
The object code can then run on any machine that can interpret it.
235
5670appa.qxd_lbI 10/2/03 4:00 PM Page 236
I
I
I
I
I
I
I
I
I
SUPPLEMENTS
User
Application Software
Operating System
Hardware
Figure A.5 The operating system is the software that controls and manages the system.
236