Vous êtes sur la page 1sur 74

CPSC 105

PC Security and Privacy


How Computers Work

The Digital Revolution


Where can you find computers?

Computers are everywhere


2

The Digital Revolution


What is computer literacy?

Knowledge and understanding of


computers and their uses

What Is a Computer?
How is a computer defined?
Electronic machine
operating under the
control of instructions
stored in its own
memory
Accepts data
Manipulates data
Produces results
Stores results
4

What Is a Computer?
What are data and information?
Data
Raw facts, figures,
and symbols

Information
Data that is
organized,
meaningful, and
useful
5

What Is a Computer?
Who is a user?
Person who
communicates
with a computer
or uses the
information it
generates

What Is a Computer?
What are hardware and software?
Hardware

Software

Electronic and
mechanical
equipment

Instructions that
tell hardware how
to perform tasks

Hardware and Software


Hardware
the physical, tangible parts of a computer
keyboard, monitor, disks, wires, chips, etc.
if you can physically touch it,

Software
programs and data
a program is a series of instructions

A computer requires both hardware and software


Each is essentially useless without the other
8

What Is a Computer?
The information
processing
cycle:

Input

Process

Output

Communica
tion
Storage
9

The Components of a Computer

Common computer hardware components


speaker

PC camera

system unit

printer
speaker
monitor
keyboard
modem
mouse

scanner

microphone

digital
camera
10

The Components of a Computer


The system unit:
CD-RW
drive

Box-like device
containing
electronic
components
connected to
motherboard
Also called a
chassis

CD-ROM
or DVDROM
drive

Zip
drive

floppy
disk
drive

hard
disk
drive
(inside
case)

11

The Components of a Computer


What are two main components on the
motherboard?
Central Processing Unit
(CPU)

Also called a processor


Carries out instructions that tell
computer what to do

Memory
Temporary holding place for
data and instructions
12

CPU and Main Memory


Central
Processing
Unit

Primary storage
area for
programs and
data that are in
active use

Chip that
executes
program
commands
Intel Pentium 4
or
Sun ultraSPARC
III Processor

Main
Memory

Synonymous with
RAM
13

The Central Processing Unit


The CPU continuously follows the fetch-decodeexecute cycle:
Retrieve an instruction from main memory

fetch
execute
Carry out the
instruction

decode
Determine what the
instruction is
14

The Central Processing Unit


The CPU contains:
Arithmetic / Logic Unit

Control Unit

Registers

Performs
calculations and
makes decisions
Coordinates
processing
steps
Small
storage
areas
15

The Components of a Computer


What is a chip?
Device with microscopic pathways that
carry electrical currents
Attaches to motherboard
memory
chip
processor
chip
packaging

16

The Components of a Computer


What is storage?
Holds data, instructions, and information for future use

Storage
Medium
Physical material
on which data,
instructions, and
information are
stored

Storage
Device
Records and retrieves
items to and from
a storage medium

17

The Components of a Computer


Common storage devices or drives:
CD-ROM or
DVD-ROM
drive

CD-RW drive

ZIP drive
floppy
disk
drive

hard disk
drive

18

The Components of a Computer


Floppy disk:

Thin, circular,
flexible disk
enclosed in
rigid plastic
A Zip disk is a
higher capacity disk
19

The Components of a Computer


Hard disk:

self-contained
hard disk

Provides much greater


storage capacity than
a floppy disk
removable
hard disk

20

The Components of a Computer


Compact disc:

Portable storage
media
CD-ROM
CD-RW
DVD-ROM
DVD+RW
21

The Components of a Computer


Miniature storage media:

Portable, thin, credit card size memory


Used in digital cameras and
handheld computers

Memory card
miniature
storage media

22

Secondary Memory Devices


Secondary memory Central
devices provide
Processing
long-term storage
Unit

Hard disks
Floppy
disks
ZIP disks
Writable
CDs
Tapes

Information is moved
between main memory
and secondary memory
as needed

Hard Disk
Main
Memory
Floppy Disk

23

The Components of a Computer


What is an input device?
Hardware
microphone

used to enter data and instructions


PC camera
keyboard
mouse

scanner

24

digital
camera

The Components of a Computer


What is an output device?
Hardware that conveys information to a user
monitor

speakers

printer

25

Input / Output Devices


Monitor

Keyboard

Monitor screen
Keyboard
Mouse
Joystick
Bar code scanner
Touch screen

I/O devices facilitate user


Central
Processing interaction
Unit

Hard Disk
Main
Memory
Floppy Disk

26

The Components of a Computer


What is a communications device?

Establishes a connection between two


computers using cable, telephone lines,
and satellites
One type is a modem

modem

27

Why Is a Computer So
Powerful?
Storage

Speed

Reliability

Accuracy

Communications
28

Buying Todays Computer

29

A Computer Specification
Consider the following specification for a personal
computer:
Intel Pentium Dual Core T4300 (2.1GHz/800Mhz FSB/1MB
cache)
250GB SATA Hard Drive (5400RPM)
3GB Shared Dual Channel DDR3 at 1066MHz (RAM)
CD-RW 24x / 10x / 40x
17.3 HD+ (900p) Bright LED Display with TrueLife and
Camera
56K modem

What does it all mean?


We use the term computer architecture to describe
how hardware is put together.
30

More on Memory

addresses

9278
9279
9280
9281
9282
9283
9284
9285
9286

Main memory is
divided into many
memory locations
(or cells)
Each memory cell
has a numeric
address, which
uniquely identifies
it

31

Storing Information
9278
9279
9280
9281
9282
9283
9284
9285
9286

10011010

Each memory cell


stores a set number
of bits (usually 8
bits, or one byte)
Large values are
stored in consecutive
memory locations

32

Storage Capacity
Every memory device has a storage capacity,
indicating the number of bytes it can hold
Capacities are expressed in various units:
Unit
Symbol
Number of
Bytes
KB
210 = 1024
kilobyte
megabyte MB
220 (over 1 million)
gigabyte GB
230 (over 1 billion)
terabyte TB
240 (over 1 trillion)

33

Memory
Main memory is volatile - stored information is
lost if the electric power is removed
Secondary memory devices are nonvolatile
Main memory and disks are direct access
devices - information can be reached directly
The terms direct access and random access
often are used interchangeably
A magnetic tape is a sequential access device
since its data is arranged in a linear order - you
must get by the intervening data in order to
access other information
34

RAM vs. ROM


RAM - Random Access Memory (direct access)
ROM - Read-Only Memory
The terms RAM and main memory are basically
interchangeable
ROM could be a set of memory chips, or a separate
device, such as a CD-ROM
Both RAM and ROM are random (direct) access devices!
RAM probably should be called Read-Write Memory
Our example machine had 3 GB RAM and a 250 GB
hard disk

35

Compact Discs
A CD-ROM is portable read-only memory
A microscopic pit on a CD represents a binary 1 and a
smooth area represents a binary 0
A low-intensity laser reflects strongly from a smooth area
and weakly from a pit
A CD-Recordable (CD-R) drive can be used to write
information to a CD once
A CD-Rewritable (CD-RW) can be erased and reused
The speed of a CD drive describes how fast it can write
information to a CD-R, a CD-RW, and how fast it can
read.
Our example machine had a CD-RW 24x / 10x / 40x .
Here x represents a standard speed of about 150 KB of
data per second.
36

DVDs
A DVD is the same size as a CD, but can store
much more information - the format of a DVD
stores more bits per square inch than a CD does
A CD can store 650 MB, while a standard DVD
can store 4.7 GB
A double sided DVD can store 9.4 GB
Other advanced techniques can bring the capacity up
to 17.0 GB

37

CPU Speed
The speed of a CPU is controlled by the system
clock
The system clock generates an electronic pulse
at regular intervals
The pulses coordinate the activities of the CPU
The speed is measured in megahertz (MHz) or
gigahertz (GHz) [Note: 1000 MHz = 1 GHz]
Our example machine worked at a speed of 2.1
GHz = 2100 MHz
38

Monitor
The size of a monitor (17.3") is measured diagonally, like
a television screen
Most monitors these days have multimedia capabilities:
text, graphics, video, etc.
A monitor has a certain maximum resolution , indicating
the number of picture elements, called pixels, that it can
display (such as 900p)
High resolution (more pixels) produces sharper pictures
Our example had a resolution of 900p meaning 900
vertical pixels. Based on the monitor size, this would
probably have 1600 pixels horizontally (a 16x9 ratio)
39

Modem
Data transfer devices allow information to be sent and
received between computers
Many computers include a modulator-demodulator or
modem, which allows information to be moved across a
telephone line. The modem translates the analog sound
signals into digital signals and vice versa.
A data transfer device has a maximum data transfer rate
A modem, for instance, may have a data transfer rate of
56,000 bits per second (bps)
Our example modem transferred data at 56 Kb/s

40

What is Computer Science?

41

Problem Solving
The fundamental role of computer science is to
solve problems
Computer Scientists solve problems by writing
computer programs
Computer programs are put together to make
computer software.

42

Computer Software
What is a computer program?
A series of instructions that tells the computer
what to do

43

Programming Example: Java


A programming language specifies the words
and symbols that we can use to write a program
A programming language employs a set of rules
that dictate how the words and symbols can be
put together to form valid program statements
For example, the Java programming language
was created by Sun Microsystems, Inc.
It was introduced in 1995 and it's popularity has
grown quickly. One reason may be that Java
programs can be executed using the WWW.
44

Language Levels
At the current time there are over 550 programming
language in use Java, C++, Fortran, Ada,
All languages fit into one of the four programming
language levels:
machine language
assembly language
high-level language

The higher levels were created to make it easier for a


human being to read and write programs
Each type of CPU has its own specific machine
language
This uses binary numbers to write out all instructions!

Assembly language is simpler to read than machine


language, but still difficult. It uses mnemonics to replace
the machine code
Example: sub is used to mean subtract.

45

Compiling
A program must be translated into machine
language before it can be executed on a
particular type of CPU. That is, each CPU only
understands its own machine code.
One way this translation occurs is with a
compiler
A compiler is a software tool which translates source
code into a specific target language. Often, that
target language is the machine language for a
particular CPU type. This translation occurs all at
once for an entire program.
46

Computer Software
What is system software?
Programs that control the operations of the
computer and its devices

Operating
System (OS)

Utility
Programs

47

Software Categories
Operating System

controls all machine activities


provides the user interface to the computer
manages resources such as the CPU and memory
Examples: Windows XP, Windows 2000, Unix, Linux,
Mac OS

Application program
generic term for any other kind of software
word processors, missile control systems, games,

Most operating systems and application


programs have a graphical user interface (GUI)
48

Computer Software
What is the user interface?

Controls how you


enter data and
commands and
how information
displays
49

Computer Software
What is a graphical user interface (GUI)?
Uses
Iconvisual
represents
images

program,
instruction, or
some other
object

such as icons
icons

icons

50

GUI Screen Elements


Windows
Icons
Pull-Down
Menus
Scroll Bars
Buttons

51

Computer Software
What is application software?
Programs that perform specific tasks for users
Suite
Word
processing

Popular software
applications
bundled together
as a single unit
Spreadsheet

Presentation
Presentatio
n graphics
graphics
software

Database

SpreadsheeOffice Database
07
t software
software

52

Computer Software
What are
shareware,
freeware,
public-domain
software?

Shareware
Copyrighted
software distributed
free for trial period

Send payment to

Freeware
Software provided
at no cost

Copyrighted
Cannot resell it
as your own

developer on honor
system

PublicDomain
Software

Freeware
donated for
public
use
53

Computer Software

What is an application service provider (ASP)?

You can run the


programs from
the Internet

Third-party company
that manages and
distributes software
and services
on the Internet

Both free
and paid
ASPs

54

Computer Software
Who designs and writes software?

Systems analyst
Programmer
55

Computers and Digital


Information

56

Computers and Digital Information


What exactly does digital mean?
Two basic ways to store and manage data:
Analog
continuous, in direct proportion to the data represented
music on a record album - a needle rides on ridges in the
grooves that are directly proportional to the voltages sent to
the speaker
think of this as a wave
Digital
the information is broken down into pieces, and each piece is
represented separately (discretely)
music on a compact disc - the disc stores numbers
representing specific voltage levels sampled at specific times
57

Digital Information
Computers store all information digitally:
numbers
text
graphics and images
video
audio
program instructions

In some way, all information is digitized broken down into pieces and represented
as numbers
58

Representing Text Digitally


For example, every character is stored as
a number, including spaces, digits, and
punctuation
Corresponding upper and lower case
letters are separate characters

72

105

44

Hi,

Heather.

32

101

72

97

116

104

101
59

114

46

Sampling
When information is originally in analog form (like
music) we use sampling to digitize the signal.
With sampling, we take frequent measurements
(perhaps 40,000 measurements per second) of
the analog signal and this makes our conversion
to discrete units.

16 19

16

13 12

60

Binary Numbers
Once information is digitized, it is represented
and stored in memory using the binary number
system
A single binary digit (0 or 1) is called a bit
Devices that store and move information are
cheaper and more reliable if they have to
represent only two states
A single bit can represent two possible states,
like a light bulb that is either on (1) or off (0)
Permutations of bits are used to store values
61

Bit Permutations
1 bit
0
1

Possibilities: 2

2 bits
00
01
10
11

3 bits
000
001
010
011
100
101
110
111
8

4 bits
0000 1000
0001 1001
0010 1010
0011 1011
0100 1100
0101 1101
0110 1110
0111 1111
16

Each additional bit doubles the number of possible permutations


62

Bit Permutations
Each permutation can represent a particular item
There are 2N permutations of N bits
Therefore, N bits are needed to represent 2N unique
items
1 bit ?
21 = 2 items
2 bits ?
How many
22 = 4 items
items can be
3 bits ?
3
2
= 8 items
represented by
4 bits ?
24 = 16 items
5 bits ?
25 = 32 items
63

Example with Permutations


If we use 8 bits, we can represent 28 = 256
different objects. (8 bits is usually called a byte.)
The characters that we use for typing are often
represented with 1 byte. In the ASCII system:

Control Characters from 0 to 64


A = 65
B = 66
C = 67
etc.
Last character = 255
64

Computer Types and Usage

65

Categories of Computers
Category

Physical Size

Number of
simultaneous users

Cost

Personal

Desk

Usually 1

Under 1000

Handheld

Hand

Usually 1

Several hundred

Internet Appliance

Countertop

Usually 1

Several hundred

Mid Sever

Small cabinet

two - thousands

$6000 - $850000

Mainframe

Partial Room

Hundreds to thousands

$300000 to millions

Supercomputer

Full Room

100s 1000s

Millions

66

Personal Computers

The two most popular series of personal computers:

Apple Macintosh uses


the Macintosh operating
system (Mac OS)
PC and compatibles use the
Windows operating system67

Personal Computers
Notebook computer:
Portable, small
enough to fit
on your lap
Also called a
laptop
Generally more
expensive than
a desktop
computer
68

Small
Handheld
Computers
computer
that fits incomputer:
Handheld
your hand
Also called a
palmtop or
pocket
computer

69

Handheld Computers
Input data with a handheld computer:
Keyboard
Stylus
Speech
recognition
Handwriting
recognition

70

Handheld Computers
Personal digital assistant (PDA):
Provides personal
organizer functions
Calendar
Appointment book
Address book
Calculator
Notepad
71

Handheld Computers
Web-enabled handheld computers:
Allow wireless Internet access
Web-enabled
cellular telephone
Web-enabled
two-way pager

Web-enabled
handheld
computer

72

Internet Appliances
Internet appliance:

Computer whose
main purpose is
to connect to
Internet from
home
Web TV is one
example
73

Questions?

74