Introduction to Computers
A PC Ad lists a computer for sale, with all this stuff:
-
300MHz Pentium II processor (CPU)
-
32-364MB RAM, 50ns
-
512K Cache
-
6.4-16GB disk
-
32x CDROM (optional DVD)
-
Monitor, keyboard, mouse,
But what is all this stuff?
CPU executes instructions, using data stored in memory
-
These instructions are very simple.
-
move a word of memory
-
add two words
-
turn a dot on the screen a certain color
-
The speed is how fast the CPU executes these instructions
Some numerical relations are not obivous, like processor speed and memory
speed (one in MHz, one in nanoseconds).
-
Hz are hertz, or cycles per second
-
KHz (kilo) is thousands of cycles per second, MHz (mega) are millions of
cycles per second
-
milli is thousandths (10e-3), micro is millionths (10e-6), nano is billionths
(10e-9)
-
ns is nanoseconds, or billionths of a second
-
For 300MHz, each cycle is 3.33 nanoseconds long
-
Memory takes 50 nanoseconds to access -- very slow!
-
So, the cache provides faster memory access (but is much smaller)
-
It just keeps copies of often-used portions of RAM
-
In memory, kilo is 1,024, not 1,000; and Mega is 1,048,576 (1024*1024),
not a million
-
RAM is primary storage -- you lose whatever is there when power
is turned off.
-
Disk, CD, Tape, floppy, are all secondary storage -- stays between
power cycles.
-
Giga is 10e9, whereas Mega is 10e6, so 1 GB = 1000MB
-
CD-ROMS contain about 660MB of data
-
DVD?
Now, how is all of this hardware used?
-
The operating system controls the resources (hardware) and interacts
with the user.
-
i.e., Windows(95,98,NT), Linux, Macintosh, etc.
-
Also the BIOS of the PC -- this is the first level of the OS
-
Operating system is software
-
just a set of instructions for the hardware
-
It controls the hardware; in other words, it manages the resources.
-
It lets the user interact with the computer; it provides a user interface.
In this course you'll learn how to solve problems using
a computer. Problem solving using a computer involves:
-
First figuring out an outline of the solution (Algorithm)
-
Next, communicating this algorithm to the computer so that
the computer can execute it.
Step 1 may involve a lot of THINKING, while Step 2 involves
being able to transcribe the algorithm in a formal notation
that the computer can understand.
The formal notation is called a computer programming language.
Reading Assignment: Chapter 1, Lewis+Loftus (the Java book).