Anda di halaman 1dari 148

Arsitektur Komputer Modern (1)

& ENIAC
(Electronic Numerical Integrator and Computer)
Giri Wahyu Wiriasto
giriwahyuwiriasto@gmail.com
Universitas Mataram
Manusia & Komputer
Kebutuhan Penghitungan Matematis. Ragam Kondisi yang terjadi :
- Penghitungan manual secara penuh yaitu penghitungan tanpa menggunakan peralatan
selain otak dan jari
- Penghitungan manual menggunakan peralatan sederhana seperti mistar geser,
abaccus
- Penghitungan otomatis dengan menggunakan mesin komputer

Tabel Perbandingan jenis-jenis penghitungan


No Parameter Penghitungan
Manual
Penghitungan
semimanual(
bantuan
alat sederhana)
Penghitungan
Otomatis
1 Kecepatan Rendah Sedang Tinggi
2 Keandalan Rendah;
berbeda setiap
individu
Sedang Tinggi
3 Kemungkinan
Kompleksitas
Masalah
Rendah Sedang Tinggi
Tabel Perbandingan jenis-jenis
penghitungan (contd)
No Parameter Penghitungan
Manual
Penghitungan
semimanual(
bantuan
alat sederhana)
Penghitungan
Otomatis
4 Peningkatan
upaya manusia
Sangat tinggi Sedang Sangat rendah
5 Konsistensi Rendah;
Karena
kelelahan atau
kebosanan
Sedang Sangat Tinggi
6 Pengaruh Banyak
masalah yang
tak dapat
diselesaikan
dalam waktu
yang layak
Sedikit lebih baik
dari
penghitungan
manual
Banyak
masalah yang
dapat
diselesaikan
Syahrul,”organisasi&arsitektur komputer”l
Proses Penyelesaian Masalah
menggunakan Komputer
Analisa Pengembangan
program
Pemrosesan
Komputer
Pemeriksaan
error
Masalah Metoda Program Hasil
Koreksi
program
Lapisan pada Komputer Modern
Hardware
BIOS
OS, Compiler
Program aplikasi
ARSITEKTUR VON NEUMANN (EDVAC-1946)
Menjadi Dasar Arsitektur Komputer Modern
Stored Program Concept
(J.V.Neumann)
“Program bahasa mesin disimpan didalam komputer
beserta data relevan lainnya, dan secara intrinsik
komputer mampu memanipulasi program dan data
tersebut, misalnya mengambil (load) data/program
dari disk ke memori, memindahkannya dari satu lokasi
memori ke lokasi memori lainnya, dan menyimpannya
kembali ke disk”
Unit
Input
Unit
Output
Memori
Unit Kontrol ALU
Register
Sinyal kontrol
Instruksi/data
Unit Fungsional Komputer
ENIAC
Unit Fungsional Mesin ENIAC
Representasi Bilangan
Komunikasi Data
Instruksi
Pemrograman
ENIAC
It consisted
of 40 panels,
standing in
the shape of
a big U
in a space of
170 m2
, contained
around
18 000
vacuum
tubes,
consumed
140 {174 kW
of electrical
power, and

UNIT FUNGSIONAL ENIAC


Arithmetic units: high-speed multipliplier
(dedicated hardware: multiplication function
tables) and a combinated divider/squarerooter.
Master programmer: used for coordinating the
operations of the accumulators and execution
of sequenced operations and nested loops.
ROM: fast-programmable, provided by three
function tables.
Constant transmitter: together with a card
reader works as the external input device.
Global Control Units: include Initiating and
Cycling units that master all other operations,
initiates computations through providing digits
and programs and resets pulses.

REPRESENTASI BILANGAN (ENIAC)


MESIN ENIAC Menggunakan Bilangan Desimal
sebagai konversi Sinyal Ke Digital.
Hal ini dikarenakan penggunaan Bilangan Desimal
lebih efisien menggunakan
Vacumm Tube (280 buah) dibanding menggunakan
bilangan Biner (450 buah) untuk mengirim sinyal
sebanyak 10 digit.
INSTRUKSI
Some of the operetions performed by the ENIAC, for example
addition, is built into the hardware, whereas others require several
steps and units. A table of computation and following times is
presented below:
- http://www.inf.fu-berlin.de/lehre/SS01/hc/eniac/
- Organisasi & Arsitektur Komputer, Syahrul.
Reference :
Arsitektur Komputer Modern (1b)
Giri Wahyu Wiriasto
giriwahyuwiriasto@gmail.com
Universitas Mataram
Memori utama & Memori
Sekunder
Memori
Utama
Memori
Sekunder
Perangkat
Input CPU Perangkat
Output
Memori Sekunder
Tipe Usang Tipe aktif
Magnetic
drum
Paper
tape
Punch
card
Floppy
disk
Hard
disk
Optical
disk
Magnetic
tape
CD DVD Blue
Ray
Pengontrol Perangkat
Sebuah perangkat peripheral terhubung (link) dengan inti sistem (CPU dan memori)
Oleh suatu pengontrol perangkat/komponen, biasa juga disebut pengontrol I/O Controller).
Pengontrol Divais
Keyboard
interface
CRT
controller
Printer
controller
Floppy disk
controller
Hard disk
controller
Fungsi utama I/O controller :
Mentransfer informasi (program dan data) antara inti sistem dengan perangkat.
controller dapat menangani lebih dari satu perangkat dalam jenis yang samq
CPU dan
Memori
sistem
System
Interface
logic
Register
Perintah
Penyangga
data
Register
status
Device
Interface
logic
Device
I/O
Antar
Muka
system
Antar
Muka
system
Interface Device dan Interface System
Signal Device Interface
Ada tiga macam sinyal antara perangkat dengan device controller ;
- Sinyal Kontrol
- Sinyal status
- Sinyal data
Device
Controller Device
Data
Sinyal Kontrol
Sinyal Status
Memori Utama
Memori menyimpan data dan hasil dari program yang dieksekusi oleh CPU
Secara fungsional mengorganisir lokasi.
Setiap lokasi menyimpan sejumlah bit tertentu yang tetap
Wordlength dari suatu memori menunjukkan jumlah bit pada setiap lokasi
Kapasitas total dari suatu memori mempunyai sebuah alamat yang unik dan
dinyatakan dalam notasi biner atau heksadesimal
Dua buah memori yang berbeda dengan kapasitas yang sama dapat memiliki
organisasi yaanlagm baetrbeda (gambar)
0000
0001
0010
Lokasi pertama
Lokasi kedua
Lokasi ketiga
1111 Lokasi terakhir (ke-16)
memori
16
bit
2K
lokasi
(a)2048x16
32
bit
1K
lokasi
(a)1024x32
Organisasi dan kapasitas memori
Contoh :
Sebuah komputer mempunyai memori utama dengan jumlah lokasi 1024 dan
Masing-masing lokasi 32 bit. Hitung kapasitas total memori.
Word length = 32 bit = 4 byte
Jumlah lokasi = 1024 = 1K
Kapasitas total memori = 1 K x 4 byte = 4KB
Komunikasi CPU - Memori
CPU melakukan pengalamatan atau mengalamati memori baik saat operasi
Pembacaan memori maupun saat operasi penulisan memori
CPU Memori
Alamat
Baca memori
Data
Operasi pembacaan memori Operasi penulisan memori
CPU Memori
Alamat
Tulis memori
Data
MAR
MBR
alamat
data
Memori
Register dalam CPU untuk pengaksesan memori
Jenis antarmuka CPU – Memori yang dimplementasikan dalam sistem komputer Antarmuka
sinkron (Synchronous interface).
CPU Memori
Alamat
Baca memori
Data
Tulis memori
Antarmuka asinkron (Asynchronous interface).
CPU Memori
Alamat
Baca memori
Data
Tulis memori
MPC
Adresibilitas Memori
Jumlah bit alamat memori menentukan jumlah maksimum lokasi memori yang
Dapat diakses oleh CPU. Anggap CPU mempunyai n bit alamat, maka lokasi
Memori maksimum yang dapat diakses oleh CPU adalah 2^n lokasi. Ini disebut
kemampuan pengalamatan memori :
CPU mempunyai saluran alamat 12 bit untuk mengalamati memori.
Berapa besar adresibilitas memori dari CPU tersebut. (b) jika memori mempunyai
Kapasitas total 16 KB, berapakah wordlength dari memori!
bit alamat = 12
Adresibilitas Memori = 2^12 = 4096 lokasi = 4K lokasi
Kapasitas memori = 16 KB
Wordlength = kapasitas memori/jumlah lokasi memori = 16 KB/4K = 4B
Tabel.1.2. Adresibilitas memori beberapa CPU populer
CPU Jumlah bit
alamat
Adresibilitas
memori
IBM System
360/40
24 16 mega
Intel 8080 16 64 kilo
Intel 8088 20 1 mega
Pentium 32 4 giga
Unkown 40 1 tera
OPERASI CPU
Pengambilan instruksi
Eksekusi instruksi
Fase siklus intruksi
Instruksi
berikutnya
The Computer Continuum 1-31
Chapter 1c:
Computers: A First Look
All Source : http://cs-people.bu.edu/smonica/usefull-stuff
How do computers affect us in our daily lives?
The Computer Continuum 1-32
Computers: A First Look
In this chapter:
• How do computers pervade our every day lives?
• What is considered a computer and what is not?
• Why do computers use the binary system?
• What are some characteristics of different types of
computers?
• How are computers commonly used today?
The Computer Continuum 1-33
Beyond the Computer
Invasion
6:15 AM - Timer in coffee maker turns on
6:30 AM - Computerized alarm clock rings
7:30 AM - Drive car/airbag,brakes,radio
8:00 AM - Check email at work
9:00 AM - Check in-coming voice mail
10:00 AM - Receive in-coming fax
12:00 PM - Buy gift. Electronic Kiosk
1:15 PM - Reserve airline ticket over Internet
3:00 PM - Pick up paycheck
5:15 PM - Stop off at ATM
6:30 PM - Grocery store /Checkout
11:30 PM - Microwave dinner
The Computer Continuum 1-34
Beyond the Computer
Invasion
The reason why computers are pervasive is that they
help us…
• perform tasks that are repetitive.
• perform tasks that involve calculation or manipulation of
numbers.
• perform tasks that involve storage of large quantities of
information.
The Computer Continuum 1-35
What Is (and Isn’t) a
Computer
Definition:
• A computer is a device that takes data in one form, uses it,
and produces a different form of information which is related
to (but not the same as) the original data.
The Computer Continuum 1-36
What Is (and Isn’t) a
Computer
The Abacus is not a computer by our definition.
• It is an early calculation device that only holds numbers for
the person using it.
The Computer Continuum 1-37
What Is (and Isn’t) a
Computer
Stonehenge is a computer by our definition.
• It takes the movement of the planets, sun and other heavenly
bodies and provides information concerning eclipses and
other astronomical events.
The Computer Continuum 1-38
What Is (and Isn’t) a
Computer
The bathroom scale is a
computer by our
definition.
• It takes in the amount of
gravitational pull between
a human body and the
earth and provides us with
the amount of pounds or
kilograms.
The Computer Continuum 1-39
What Is (and Isn’t) a
Computer
A calculator is a computer
by our definition.
• They range from doing
simple arithmetic to
powerful models that
produce graphic output.
The Computer Continuum 1-40
What Is (and Isn’t) a
Computer
Digital pagers and cell phones are also computers.
• These wireless communication devices provide instant
access to voice-mail, e-mail, and fax transmission.
• Some provide built-in Internet access.
The Computer Continuum 1-41
The Many Kinds of Computers
Computers can be classified by three sets of
characteristics:
Electronic
versus
Mechanical
General-purpose
versus
Special-purpose
Digital
versus
Analog
The Computer Continuum 1-42
The Many Kinds of Computers
Electronic Computer
• Constructed from transistors and electrical circuits.
• Needs an electrical source to function.
Mechanical Computer
• Constructed of a combination of gears, levers and/or springs.
• Produces its own intrinsic energy. (Does not need electricity
to function.)
The Computer Continuum 1-43
The Many Kinds of Computers
General-purpose Computer
• Was not manufactured to do any one thing.
• Changeable to do any task.
Special-purpose Computer
• Manufactured to perform a predetermined task or set of tasks.
The Computer Continuum 1-44
The Many Kinds of Computers
Digital Computer
• One that functions in discretely varying quantities.
• Produces or gives results that are also discretely varying.
Analog Computer
• One that functions in continuously varying quantities.
• Produces or gives results that are also continuously varying.
The Computer Continuum 1-45
The General-Purpose
Electronic Digital Computer
The General-purpose electronic digital computer
• General Purpose: Can be used in many different fields of
work.
• Electronic: Requires a source of electricity to function.
• Digital: Made up of binary circuitry. (Each can be set to one
of one two possible conditions.)
• Controlled by humans; Presents results in a way usable by
humans.
The Computer Continuum 1-46
The General-Purpose
Electronic Digital Computer
Digital computers are made up of four major
components:
• Input units - Humans interface with the computer through
devices like the mouse and keyboard.
• Memory - Stores programs and other data.
• Central Processing Unit - “Brain” controls all computer
operations, processes information, computes results.
• Output Units - The computer displays results to the human
through devices like the printer and monitor.
The Computer Continuum 1-47
The General-Purpose
Electronic Digital Computer
Computer Hardware
• The electronics and associated mechanical parts of the
computer.
Computer Software
• Consists of instructions that control the hardware and cause
the desired process to happen
• A Disk is considered hardware. A program ON the disk is
considered software!
The Computer Continuum 1-48
The General-Purpose
Electronic Digital Computer
Why do computers work in binary?
• Simply, because using the binary system is cheap and reliable.
• Building computers using any other system would be too
expensive and become less reliable.
01
2
3
654
89
7
1
0
The Computer Continuum 1-49
Applications: Making the
Computer Work for You
Applications (Application Programs)
• Sets of computer instructions designed to perform a particular
application or task.
Examples of popular application programs:
• Word or WordPerfect for word processing.
• Excel for keeping a ledger.
• Norton’s Utilities for checking disks for damage.
The Computer Continuum 1-50
Applications: Making the
Computer Work for You
Productivity Tools
• First designed for the business setting.
• Targeted increased speed and accuracy for office workers.
• Now used in homes, schools, and in offices.
Four types are included in this category:
• Word Processing; Electronic Spreadsheets; Database
Management Systems; Presentation Graphics.
The Computer Continuum 1-51
Applications: Making the
Computer Work for You
Word Processors
• Most commonly used computer application programs on the
market today.
• Have replaced the typewriter in the creation of text
documents.
• Can be used to create: (to name a few)
– Letters
– Reports
– Essays
– Brochures
– Advertising copy
– Books
The Computer Continuum 1-52
Applications: Making the
Computer Work for You
Electronic Spreadsheets
• Allows you to enter numeric information and formulas into
the computer in rows and columns.
• Performs calculations and recalculations immediately.
• Can be used for forecasting and what-if projections.
• Most have graphing capabilities.
The Computer Continuum 1-53
Applications: Making the
Computer Work for You
Database Management Systems (DBMS)
• DBMS are the computer programs that are used to organize
small to large amounts of information in a meaningful way.
• Allows entry, updating, and retrieval of information in a
meaningful format.
– Can add information.
– Modify information.
– Delete information.
– Print information in a variety of formats.
The Computer Continuum 1-54
Applications: Making the
Computer Work for You
Presentation Graphics
• A tool that combines the computer and a display system to
present multiple types of visual and audible information.
– Text
– Images and animation clips
– Charts
– Hyperlinks (text that can access pages on the WWW)
• Can be viewed one-by-one or as a continuous slide show.
• Animation can be added for affect (fade, dissolve, flash).
The Computer Continuum 1-55
Applications: Making the
Computer Work for You
Computer Control
• Tools used to make the computer run efficiently.
• Used to make the computer perform certain tasks.
Three types are listed in this category:
• Programming Languages, Operating Systems, and Utilities.
The Computer Continuum 1-56
Applications: Making the
Computer Work for You
Programming Languages
• Each programming language has its own vocabulary and
structural rules.
• Programmers use these languages to construct programs
containing lists of instructions for the computer to perform.
• Popular languages include:
– Ada
– Java
– Visual Basic
– C++
– PHP
– Phyton
– Matlab
The Computer Continuum 1-57
Applications: Making the
Computer Work for You
Operating Systems
• A collection of programs that manage and control all
operations and coordinate all hardware components of the
computer.
• Some functions include:
– Controlling the mouse pointer.
– Sending data to the printer and screen.
– Managing files.
– Formatting disks.
• Popular Operating Systems include Windows, Unix, MacOS,
VMS, Linux, OS/2.
The Computer Continuum 1-58
Applications: Making the
Computer Work for You
Utilities
• Help to keep the computer running properly by:
– Making adjustments in efficiency.
• Faster operation.
• More efficient memory and hard disk use.
• Better communication connections.
– Making repairs to damaged disks and files.
– Identifying and eliminating viruses.
The Computer Continuum 1-59
Applications: Making the
Computer Work for You
Internet and Web Tools
• Tools used to make easy access of the Internet possible.
• Tools used to create a web presence.
Three tools are listed in this category:
• Web Browsers, Search Services, Web Page Builders.
The Computer Continuum 1-60
Applications: Making the
Computer Work for You
Web Browsers
• Most commonly used tool to access the World Wide Web.
• These programs allow web pages to be displayed on the
computer screen that may include:
– Text
– Graphic images, animation and streamed video
– Sound
– Three-dimensional virtual reality environments
• The two most widely used web browsers today include
Microsoft Explorer and Netscape Navigator.
The Computer Continuum 1-61
Applications: Making the
Computer Work for You
Search Services
• Tools used to help search for specific information on the
WWW.
• Many free search services exist on the WWW.
– Type in a search criteria (key words to look for).
– The search service will then locate pages on the web that
contain that search criteria.
• A few popular web search services include HotBot, Alta Vista
, Excite, and DogPile.
The Computer Continuum 1-62
Applications: Making the
Computer Work for You
Web Page Builders
• Tools used to create web pages.
• Some word processors and presentation programs include
web page design capability.
– Type in the document as you wish it to look on the
WWW.
– Have the word processing program save it in the HTML
(special web document) format.
• Stand-alone web page builders allow you to design more
complex and sophisticated web sites.
The Computer Continuum 2-63
Chapter 2:
Metamorphosis of Information
How does the computer store information?
The Computer Continuum 2-64
Metamorphosis of Information
In this chapter:
• What are the common types of information that can be
manipulated by the computer?
• Why does the computer use binary numbers?
• How does the computer deal with numbers, text, pictures,
sound, and programs?
• What type of program manipulates text?
The Computer Continuum 2-65
What is Information?
The five types of information the computer commonly
manipulates:
• Numeric
• Character
• Visual
• Audio
• Instructional
First, the information must be transformed (converted)
into an acceptable representation that the computer
will accept.
The Computer Continuum 2-66
What is Information?
All modern computers work with a system of numbers
called binary numbers.
• Use only two symbols: 0 and 1.
Binary circuits: Electronic devices are cheapest and
function most reliably if they assume only two states.
Closed
circuit
Open
circuit
The Computer Continuum 2-67
Representation of Numbers
The three-light system:
• Has eight possible
combinations of
on and off.
Could be used to indicate the
numbers 0, 1, 2, 3, 4, 5, 6, 7.
0 = 000 4 = 100
1 = 001 5 = 101
2 = 010 6 = 110
3 = 011 7 = 111
The Computer Continuum 2-68
Representation of Numbers
Decimal numeration system:
• Uses 10 symbols: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9.
• The place values of each position are powers of ten.
• A number such as 1357 will be expanded as:
= (1 x 1000) + (3 x 100) + (5 x 10) + (7 x 1)
= 1357 in the decimal system
104 103 102 101 100
10000 1000 100 10 1
1357
The Computer Continuum 2-69
Representation of Numbers
Binary numeration system:
• Uses 2 symbols: 0, and 1. (Each is called a bit for binary
digit)
• The place values of each position are powers of two.
• A binary number such as 10110two will be expanded as:
= (1 x 16) + (0 x 8) + (1 x 4) + (1 x 2) + (0 x 1)
= Only 22 in the decimal system!
24 23 22 21 2 0
16 8 4 2 1
10110
The Computer Continuum 2-70
Representation of Numbers
Decimal
• Each number has a unique representation.
• Counting:
. When you run out of digits, make it a zero and increment the
next place value to the left.
. 99 becomes 100
Binary
. 11two becomes 100two
The Computer Continuum 2-71
Representation of Symbols
and Text
To store any kind of information in the computer’s
memory, it must first be transformed into a binary
numeric form.
Symbols and Text
• Includes characters, punctuation, symbols representing
numbers.
• Each symbol can be assigned a numeric value.
• Two standardized sets of codes for symbols:
– ASCII: American Standard Code for Information
Interchange.
– EBCDIC: Extended Binary Coded Decimal Interchange
Code.
The Computer Continuum 2-72
Representation of Symbols
and Text
A partial listing of the ASCII character set
The Computer Continuum 2-73
Representation of Images
Pictures:
• A picture must be transformed into numeric form before it
can be stored or manipulated by the computer.
• Each picture is subdivided into a grid of squares called pixels
(picture elements).
– If the squares are small enough, we will see a reasonably
good image.
The Computer Continuum 2-74
Representation of Images
In a picture with only
black and white pixels:
• 1 represents black.
• 0 represents white.
010101010101010101010110101101001001000111110000
011010101010101010101001011010010110010100000110
100101010101010101010110110001010000101001010100
101101101011011010110101100110010110100010001001
011010010110100101101010001001100100101101010010
100101101100101011010101110110011001010010101100
011010010011010110010010001001100110101010010001
010101101100101100100101110110011001010100100101
010101010101010011011010001001100010100001010100
101010101010101100010010110010001101001110100001
010101010101010001000101000101101000010000001101
110110101010010100110100011010010011100101101000
101001010100100010100101100101101100001010000010
101011010001001001001001011110101011010100101100
101010000100010010010111110101111100101001001001
010100101001000100101010101110101011010010010000
101001000010011001101111101011101010101000100101
010010010100100011011000011110111011010110101000
000100000001001100100111111111110110111000000010
101000101010010011011000010101011101000010101000
000010000100101101010011111111111111011101000101
001000101001101010100100011101111110100010010000
010010010110001001001001111011110101101100100101
100100100000111010010010010111111111011001001000
The Computer Continuum 2-75
Representation of Images
The baby's picture with
smaller pixels - more detail.
The baby's picture with 4
levels of gray.
The Computer Continuum 2-76
Representation of Images
Photographic quality images have
a gray-scale.
• Several shades between black and
white are used.
• 4 level gray-scale means 4 shades
are used.
– Each pixel needs 2 bits:
– 00 - represents white
– 01 - represents light gray
– 10 - represents dark gray
– 11 - represents black
• 256 level gray scale means
– 8 bits per pixel are needed for
256 shades of gray 256 levels of gray
The Computer Continuum 2-77
Representation of Images
Three approaches to display
color:
CMYK:
• Use of four standard colors: cyan,
magenta, yellow and black, in the
printing industry.
RGB:
• Uses three values per pixel
• One number is used for each of
the amounts of Red, Green and
Blue on the computer screen.
A “Modified” RGB:
• One number given per pixel to
represent all three colors. Full color image
The Computer Continuum 2-78
Representation of Images
Digitizer or Scanner
• A device that is used to convert an image to numbers
representing a pixel form of the image.
The Computer Continuum 2-79
Representation of Sounds,
Music and Speech
Sounds, Music and Speech:
• Each sound must be transformed into numeric form before it
can be stored or manipulated by the computer.
The Computer Continuum 2-80
Representation of Sounds,
Music and Speech
What can be given numerical values in a piece of
music?
• What notes are being played?
– What is the frequency of each note?
• Hertz is a unit of measurement that indicates the
number of cycles per second of a particular sound’s
vibration.
• As an example, the sound of middle C is 256 Hertz.
• The tempo of the music (beats per minute).
• Lengths of the notes (half note, whole note, quarter note…).
The Computer Continuum 2-81
Representation of Sounds,
Music and Speech
Representing Music using MIDI:
• MIDI (Musical Instrument Digital Interface)
• MIDI is a set of rules for connecting musical instruments and
computers.
• Musical information is sent over electronic paths called
channels to various instruments or computer.
– Tell what note to play and how long to play it.
– Consists of three numbers:
• 144,60,64 tells the device to play middle C on MIDI
channel 1 at a medium velocity.
• 128,60,00 turns off middle C.
– The messages are sent in binary.
The Computer Continuum 2-82
Representation of Sounds,
Music and Speech
Representation of any Sound by Digital Recording:
• The sounds were divided into tiny segments and stored as
binary numbers.
• The computer transforms these binary numbers and
reproduces the voltages.
• These voltages are sent down the speaker wires to produce
sound.
The Computer Continuum 2-83
Representation of Sounds,
Music and Speech
Representing Speech:
• Human speech can be digitized.
• Computers can create human speech.
– Speech synthesis: The process of producing human
speech by creating the right frequencies of sound in the
correct timing so as to mimic human speech.
– Problems with digitizing whole words:
• The rules of human speech require many different
versions of the same words (question, comma,
period).
The Computer Continuum 2-84
Representation of Sounds,
Music and Speech
Continuation of Representing Speech:
• Human language can be broken down into a smaller number
of sounds.
– Phonemes: The fundamental sounds of any given
language.
• The number of phonemes varies from language to language.
– Hawaiian: 12
– Some Pacific Northwest Indian languages: over 100
The Computer Continuum 2-85
Representation of Sounds,
Music and Speech
ee as in bee
i as in mitten
e as in make
eh as in led
ae as in had
ah as in father
aw as in small
o as in go
u as in put
oo as in tool
uh as in the
er as in anger
ai as in while
ou as in how
oi as in toy
iu as in fuse
p pea
t tea
k key
f fee
s see
sh sheep
tsh chest
r rate
y yet
w Wales
hw whales
h he
b bee
d Dee
g gone
v vee
z zip
zh vision
dzh jaw
m me
ëm chasm
n not
ën Eden
ng sing
l lee
ël cradle
Vowels Consonants
Phonemes of
American English
The Computer Continuum 2-86
Representation of Sounds,
Music and Speech
Constructing natural sounding words and phrases:
• Phonemes of a particular language are chosen.
• Binary numbers are assigned to each phoneme.
• Three additional factors have an affect on how a word or
phrase sounds:
– Inflection: Involves the rising or falling pattern of pitch
on an individual phoneme.
– Duration: Sound factor affecting the way a particular
word sounds.
– Elision: The connection of two or more phonemes sliced
together so that when one ends, the next begins.
The Computer Continuum 2-87
Representing the Instructions
of Programs
Instructions are imperative: they command action.
• Each instruction must be clearly understood by its intended
receiver.
• The information needed to process the instruction must be
readily available.
– Automobile’s fasten-seat-belt command.
– Highway patrol officer’s pull-over command.
– Cooking recipe’s mix-ingredients-thoroughly instruction.
The Computer Continuum 2-88
Representing the Instructions
of Programs
A computer’s instructions must be stored in binary
form within the computer before they can be used.
• Program: A collection or list of commands designed for a
computer to follow, which gives some desired result.
The Computer Continuum 2-89
Representing the Instructions
of Programs
Word Hunt
• Purpose: To understand how a series of instructions can be
stored in the computer as a group of binary numbers.
• Instruction set: The pre-determined list of commands that
comprise all of the possible instructions needed to perform a
particular task.
• Syntax (format) of all Word Hunt instructions:
ACTION - OBJECT
ACTION: The “verb” that tells you what to do
OBJECT: The “object” modifies the verb telling you where,
how much, or what the verb requires.
The Computer Continuum 2-90
Representing the Instructions
of Programs
The Word Hunt Instruction Set:
1 GOTO # Turn to page number designated.
2 SELECT # Counting down from line 1, count down to
the designated line number (line 1 is 1,
blank lines don’t count).
3 FORWARD # Count the number of words designated to
the right (the first word is word 1).
4 BACKUP # Beginning with the word immediately to
the left of your current position, count
backwards the number designated.
5 WRITE word Write a copy of the word on a piece of
paper.
0 STOP The message is complete.
The Computer Continuum 2-91
Representing the Instructions
of Programs
A Word Hunt program puzzle:
GOTO#
SELECT #
FORWARD #
WRITE word
GOTO#
SELECT #
FORWARD #
WRITE word
GOTO#
SELECT #
FORWARD #
WRITE word
STOP
Get page
numbers and
message from
text.
The Computer Continuum 2-92
Representing the Instructions
of Programs
1 GOTO #
2 SELECT #
3 FORWARD #
4 BACKUP #
5 WRITE word
0 STOP
GOTO #
SELECT #
FORWARD #
WRITE word
GOTO #
SELECT #
FORWARD #
WRITE word
GOTO #
SELECT #
FORWARD #
WRITE word
STOP
1#
2#
3#
5 word
1#
2#
3#
5 word
1#
2#
3#
5 word
0
001 #
010 #
011 #
101
001 #
010 #
011 #
101
001 #
010 #
011 #
101
000
Word Hunt Word Hunt Program Program
Instruction Set: Program in decimal in binary
Get page
numbers and
message from
text.
The Computer Continuum 2-93
Representing the Instructions
of Programs
Two main differences between our Word Hunt
program and a computer program:
• The computer’s program would have originally been written
in a programming language, then be translated into binary
code for the computer.
• Each instruction in the instruction set would have to be
something that the computer was capable of doing.
The Computer Continuum 2-94
Representing the Instructions
of Programs
Even though instruction sets differ, they all contain
these classes of instructions:
• Arithmetic Instructions
• Data Movement Instructions
• Logical or Comparison Instructions
• Control Instructions
• Input/Output Instructions
The Computer Continuum 2-95
Representing the Instructions
of Programs
All instructions must have:
• Opcode (Operation Code): The part of the instructions that
tells the computer what to do.
• Operand: The “object” of the operation to be performed.
– Example: If the operation is to add a number, then the
operand will tell where to find the number that is to be
added.
01011010
Code for
addition
Address of the
number to be added
The Computer Continuum 2-96
Representing the Instructions
of Programs
How can the computer tell what this string of binary
numbers is used for?
01011010two
• An instruction?
• A number?
• A sound’s frequency?
• The value of a pixel in a gray-scale image?
• An ASCII character?
It is the program that is active that determines the
interpretation of the string of binary numbers!
The Computer Continuum 2-97
Software Application:
Word Processing
Word Processing Programs
• Have replaced traditional typewriters in the creation of text
documents.
– Letters, reports, essays, stories and books, brochures and
advertising copy, etc.
• Have two major categories of functions:
– Text-entry: Allows you to type and edit your document.
– Document-formatting: Allows you to determine the
appearance of your document.
The Computer Continuum 2-98
Software Application:
Word Processing
Text-entry Features:
• Word wrap: Automatic return that causes text input
to go to the next line when it reaches the
right margin.
• Cut and/or Paste: Highlighted text can be cut out and
possibly pasted in somewhere else.
• Selecting Word/Document/Paragraph: Selecting text by
highlighting it.
• Undo/Redo Typing: Errors can be removed using Undo or
Redo functions.
• Find and Replace: Changes text with a single command.
• Spelling and Grammar Checking: Highlights mistakes and
gives suggested corrections.
The Computer Continuum 2-99
Software Application:
Word Processing
Formatting Features:
Fonts -Serifs: “hooks” - Garamond, Courier
-Sans Serif: “without serifs” - Helvetica
Styles -Bold, Underline, italic, sub/superscripts
Margins and Tabs
Justifying Text -Aligning: Left, Right, Centering, Full
Footers and Headers -On all or all but first
Multiple Columns -1, 2, 3, or more
Bulleted and Numbered Lists
Tables -Text is arranged in boxes. Each will
expand to fit text.
The Computer Continuum 2-100
Software Application:
Word Processing
Why are word processors needed?
• Much of what we do is committed to paper or electronic
form.
• The appearance of your document is often the “first
impression” of you!
• Multiple copies can be created easily.
The Computer Continuum 2-101
Software Application:
Word Processing
What minimal functions must a word processor have?
• Easy text entry, correction, deletions, and insertions.
• Moving segments of text and to import text from another
document.
• Converting a document written in another word processor to
one your word processor can use.
• Setting margins, tabs, and vertical spacing.
• Changing styles.
• Aligning text.
All functions should be intuitive.
The Computer Continuum 2-102
Software Application:
Word Processing
What types of support programs are available to
enhance a word processor’s use?
• Two of the most powerful are spelling and grammar checkers.
• Idea organizer or Outliner: Helps organize thoughts.
• Desktop-publishing program: Allows more flexible
arrangement of text and graphics as well as font manipulation.
• Type managers: Expands use of decorative and display fonts.
• Clip-art: Provides computerized images.
• Talker programs.
• Document review.
The Computer Continuum 2-103
Software Application:
Word Processing
Is special support hardware available?
• Printer
– Laser: Crisp, smooth-edged print that is easy to read.
– Inkjet: Less-expensive, lower end.
• Large monitors
– Helpful to see side-by side full pages.
The Computer Continuum 1-104
Chapter 3:
Computer Hardware
Components:
CPU, Memory, and I/O
What is the typical configuration of a computer
sold today?
The Computer Continuum 3-105
Computer Hardware
Components
In this chapter:
• How did the computer become known as the stored-program
computer?
– Do they all have the same characteristics?
• Memory on chips and memory on magnetic media, how do
they differ?
• What do you look for when comparing memory devices?
• How is information moved around within the computer?
• How can you help your computer run better?
The Computer Continuum 3-106
Basic Concepts of
Computer Hardware
This model of the typical digital computer is often called the
von Neumann computer.
• Programs and data are stored in the same memory: primary
memory.
• The computer can only perform one instruction at a time.
CPU
(Central Processing Unit)
Input
Units
Output
Units
Primary Memory
The Computer Continuum 3-107
Basic Concepts of
Computer Hardware
Input/Output (I/O): Refers to the process of getting
information into and out of the computer.
• Input: Those parts of the computer receiving information to
programs.
• Output: Those parts of the computer that provide results of
computation to the person using the computer.
The Computer Continuum 3-108
Sources of Data
for the Computer
Two types of data stored within a computer:
• Original data or information: Data being introduced to a
computing system for the first time.
– Computers can deal directly with printed text, pictures,
sound, and other common types of information.
• Previously stored data or information: Data that has already
been processed by a computer and is being stored for later use.
– These are forms of binary data useful only to the computer.
– Examples: Floppy disks, DVD disks, and music CDs.
The Computer Continuum 3-109
Input Devices
Two categories of input hardware:
• Those that deal with original data.
• Those that handle previously stored data.
The Computer Continuum 3-110
Input Devices
Input hardware: Those that deal with original data.
• Keyboard
• Mouse
• Voice recognition hardware
• Scanner
• Digital camera
Digitizing: The process of taking a visual image, or
audio recording and converting it to a binary form for
the computer.
• Used as data for programs to display, play or manipulate the
digitized data.
The Computer Continuum 3-111
Input Devices
Connecting Hardware to the computer:
• Hardware needs access through some general input/output
connection.
– Port: The pathway for data to go into and out of the
computer from external devices such as keyboards.
• There are many standard ports as well as custom
electronic ports designed for special purposes.
• Ports follow standards that define their use.
. SCSI, USB: Multiple peripheral devices (chain).
. RS-232, IDE: Individual peripheral devices.
– Peripheral device: A piece of hardware like a printer or
disk drive, that is outside the main computer.
The Computer Continuum 3-112
Input Devices
Connecting Hardware to the computer: (continued)
• Hardware needs software on the computer that can service the
device.
– Device driver: Software addition to the operating system
that will allow the computer to communicate with a
particular device.
The Computer Continuum 3-113
Input Devices
Common Basic Technologies for Storing Binary
Information:
• Electronic
• Magnetic
• Optical
The Computer Continuum 3-114
Input Devices
Electronic Circuits
• Most expensive of the three forms for storing binary
information.
• A flip-flop circuit has either one electronic status or the other.
It is said to flip-flop from one to the other.
• Electronic circuits come in two forms:
– Permanent
– Non-permanent
The Computer Continuum 3-115
Input Devices
Magnetic Technology
• Two parts to most of the magnetic forms of information
storage:
– The medium that stores the magnetic information.
• Example: Floppy disk. Tiny spots on the disk are
magnetized to represent 0s and 1s.
– The device that can “read” that information from the
medium.
• The drive spins the disk.
• It has a magnetic sensing arm that moves over the
disk.
• Performs nondestructive reading.
The Computer Continuum 3-116
Input Devices
Optical
• Uses lasers to “read” the binary information from the
medium, usually a disc.
– Millions of tiny holes are “burned” into the surface of the
disc.
– The holes are interpreted as 1s. The absence of holes are
interpreted as 0s.
The Computer Continuum 3-117
Input Devices
Secondary Memory Input Devices
• These input devices are used by a computer to store
information and then to retrieve that information as needed.
– External to the computer.
– Commonly consists of floppy disks, hard disk drives, or
CD-ROMs.
• Secondary memory uses binary.
– The usual measurement is the byte.
• A byte consists of 8 binary digits (bits). The byte is a
standard unit.
The Computer Continuum 3-118
Input Devices
The four most important characteristics of storage
devices:
• Speed and access time
• Cost / Removable versus non-removable
• Capacity
• Type of access
The Computer Continuum 3-119
Input Devices
Speed (Access time) - How fast information can be
taken from or stored onto the computer memory
device’s medium.
• Electronic circuits: Fastest to access.
– 40 billionths of a second.
• Floppy disks: Very slow in comparison.
– Takes up to 1/2 second to reach full speed before access is
even possible.
The Computer Continuum 3-120
Input Devices
Cost
• Megabyte: A Million bytes.
• Gigabyte: A billion bytes.
• Two parts to a removable secondary storage device:
– The cost of the medium. (Cheaper if bought in quantity)
– The cost of the drive.
Examples: Cost for drive Cost for medium
Floppy drive (1.4MB)59.00 .50
Zip 100 (100 MB) 99.00 10.00
CD-WR (650 MB) 360.00 and up 1.00
The Computer Continuum 3-121
Input Devices
Capacity - The amount of information that can be
stored on the medium.
Unit Description Approximate Size
1 bit 1 binary digit
1 nibble 4 bits
1 byte 8 bits 1 character
1 kilobyte 1,024 bytes 1/2 page, double spaced
1 megabyte 1,048,576 bytes 500,000 pages
1 million bytes
1 gigabyte 1,073,741,824 bytes 5 million pages
1 billion bytes
1 terabyte 1 trillion bytes 5 billion pages
The Computer Continuum 3-122
Input Devices
Type of Access
– Sequential - Obtained by proceeding through the storage
medium from the beginning until the designated area is
reached (as in magnetic tape).
– Random Access - Direct access (as in floppy and hard
disks).
The Computer Continuum 3-123
Primary Memory
Primary storage or memory: Is where the data and program that
are currently in operation or being accessed are stored during use.
• Consists of electronic circuits: Extremely fast and expensive.
• Two types:
– RAM (non-permanent)
• Programs and data can be stored here for the
computer’s use.
• Volatile: All information will be lost once the
computer shuts down.
– ROM (permanent)
• Contents do not change.
The Computer Continuum 3-124
The Central Processing Unit
The Central Processing Unit ( CPU)
• Often referred to as the “brain” of the computer.
• Responsible for controlling all activities of the computer system.
• The three major components of the CPU are:
1. Arithmetic Unit (Computations performed)
Accumulator (Results of computations kept here)
2. Control Unit (Has two locations where numbers are kept)
Instruction Register (Instruction placed here for analysis)
Program Counter (Which instruction will be performed next?)
3. Instruction Decoding Unit (Decodes the instruction)
• Motherboard: The place where most of the electronics
including the CPU are mounted.
The Computer Continuum 3-125
Output Devices
Output units store and display information (calculated
results and other messages) for us to see and use.
• Floppy disk drives and Hard disk drives.
• Display monitors: Hi-resolution monitors come in two types:
– Cathode ray tube (CRT) - Streams of electrons make
phosphors glow on a large vacuum tube.
– Liquid crystal display (LCD) - A flat panel display that
uses crystals to let varying amounts of different colored
light to pass through it.
• Developed primarily for portable computers.
The Computer Continuum 3-126
Output Devices
Audio Output Devices
• Windows machines need special audio card for audio output.
• Macintosh has audio playback built in.
• Audio output is useful for:
– Music
• CD player is a computer.
• Most personal computers have CD players that can
access both music CDs and CD-ROMs.
– Voice synthesis (becoming more human sounding.)
– Multimedia
– Specialized tasks (i.e.: elevator’s floor announcements)
The Computer Continuum 3-127
Output Devices
Optical Disks: CD-ROM and DVD
• CD-ROM (Compact Disk - Read Only Memory)
– By its definition, CD-ROM is Read Only.
– Special CD drives “burn” information into blank CDs.
• Burn: A laser is used to “burn” craters into the
surface to represent a binary 1.
• Two main types of CDs:
. CD-R (Compact Disk - Recordable)
. CD-WR (Compact Disk - ReWritable)
– It takes longer to write to a CD-R than a hard drive.
– Special software is needed to record.
The Computer Continuum 3-128
Output Devices
DVD (Digital Versatile Disk)
• Allows up to 17 gigabytes of storage (from 4.7 GB to 17 GB).
• Compatible with older CD-ROM technology.
• The four versions of the DVD:
The Computer Continuum 3-129
Output Devices
Storage Requirements: How much storage capacity is
needed for…
• One keystroke on a keyboard. 1 byte
(8 bits)
• One page single-spaced document. 4.0 K
• Nineteen pages formatted text. 75 K
• One second of high-fidelity sound. 95-110
K
• Complete word processing program. 8.4 MG
Storage Capacity: How much data can be stored on…
• One inch of 1/2 in. wide magnetic tape. 4 K
• One 3 1/2” floppy disk, high density. 1.4 MG
• One Compact Disk. 650 MG
• One DVD. up to 17
GB
The Computer Continuum 3-130
Moving Information
Within the Computer
How do binary numerals move into, out of, and within
the computer?
• Information is moved about in bytes, or multiple bytes called
words.
– Words are the fundamental units of information.
– The number of bits per word may vary per computer.
– A word length for most large IBM computers is 32 bits:
The Computer Continuum 3-131
Moving Information
Within the Computer
Bits that compose a word are
passed in parallel from place
to place.
• Ribbon cables:
– Consist of several
wires, molded together.
– One wire for each bit of
the word or byte.
– Additional wires
coordinate the activity
of moving information.
– Each wire sends
information in the form
of a voltage pulse.
The Computer Continuum 3-132
Moving Information
Within the Computer
Example of sending
the word WOW over
the ribbon cable
• Voltage pulses
corresponding to
the ASCII codes
would pass
through the cable.
The Computer Continuum 3-133
Packaging the Computer
The many physical forms of the
general purpose computer:
• All follow general
organization:
– Primary memory
– Input units
– Output units
– Central Processing Unit
• Grouped according to speed,
cost, size, and complexity.
Super Computers
Mainframe Computers
Minicomputers
Microcomputer
Palmtop Computer
Calculator
Fast Expensive Complex Large
Slow Cheap Simple Small
The Computer Continuum 3-134
Software Tools for Maintaining
Your Computer Hardware
Utility Programs exist that can help diagnose and solve
computer hardware problems.
• Four major problem areas where utility programs are helpful:
– Finding and fixing problems.
• Testing Input/Output peripherals.
• Testing RAM, motherboard, video cards.
• Recovering deleted files or fixing damaged disks.
– Improving computer performance.
• De-fragmenting a disk (Packs all files closer together).
– Preventative maintenance.
– Troubleshooting.
• Locates incompatible programs.
Basic Computer
Hardware and Software.
Guilford County SciVis
V103.01
Input Devices
• Input Devices: devices that
input information into the
computer such as a keyboard,
mouse, scanner, and digital
camera.
Output Devices
• Output: devices that output
information from the
computer such as a printer
and monitor.
Central Processing Unit
• CPU (Central Processing Unit) also called the Microprocessor or
“The Brain” of the Computer.
• Processor speed: The speed at which a microprocessor executes
instructions. This is usually measured in megahertz (MHz).
• Brands of Processors include:
– Pentium
– Celeron
–MAC
– AMD
– Cyrix
Central Processing Unit
• Computer chip: also called the
microprocessor may contain an entire
processing unit.
• Computer chips contain millions of
transistors. They are small pieces of semiconducting
material (silicon).
• An integrated circuit is embedded in the
silicon. Computers are made of many chips
on a circuit board.
Data Storage Devices
• The hard-drive is a mechanical storage
device typically located internally.
– Fast recording and recovery of
data
– Large storage capacity
–Magnetic
– Primary storage device for data
and programs
– Speed is measured in R.P.M.’s
Data Storage Devices (cont’d)
• CD-ROM (compact disk read only
memory)
– Approximately 600 to 700
megabyte of storage
– An optical device read by
a diode laser
Data Storage Devices (cont’d)
Floppy diskette is
magnetic storage device
for small amounts of
data (1.44MB).
FLASH drive is a
compact and portable
electronic storage
device.
USB (plug and play)
supported
Computer Memory
• Computer memory is binary (0 or 1) (on or off).
• The byte is the standard unit of measurement.
• A byte is composed of 8 bits (binary digits).
• Typical units of measurement:
– 1 KB (kilobyte) = 1000 bytes
– 1 MB (megabyte) =1000 kilobytes or 1 million bytes
– 1 GB (gigabyte) =1000 megabytes or 1 billion bytes
Computer Memory
• RAM (random access memory) stores
data that is processing. This type of
memory is erased when the computer is
turned off.
• ROM (read only memory) contains
special instructions for the computer to
operate.
• Cache memory increases the speed of
the processor by recording and
anticipating instructions.
Graphic User Interface (GUI)
• GUI (Graphic User Interface) is a set of images and icons
seen on the desktop used to operate a program.
– The GUI makes the programs loaded on the
computer easier to access and use. Basic
Windows GUI
– Icons are small pictures that represent files,
commands, or windows.
–Windows is a GUI operating system unlike
UNIX, which uses text commands.
Video Cards
• Video cards plug into the motherboard
and are used to display video.
• VRAM is video memory that enhances
the refreshment rate of the image.
• Video cards have chipsets that can
increase the speed of video display.
Ports and Peripherals
Ports are an interface between the computer and another peripheral
device such as a disk drive, mouse, printer, modem, monitor,
camera, FLASH drive or keyboard.
Examples:
Serial
Parallel
hot-wire
USB
Ports and Peripherals
Peripherals are devices that
plug into a computer and are
not housed internally.
Examples:
Printers
Scanners
Cameras
Resolution
• Resolution refers to the number of
pixels (picture elements) in the
monitor image.
• Increased resolution uses more
computer resources but increases the
visual clarity of the display.
Resolution
• Screen resolution is measured in pixel per inch (ppi),
and printer resolution is measured in dots per inch (dpi).
• Computer screen resolution is approximately 72 ppi.
Width x Height (Pixels) Video Display
640 x 480 Low Resolution
800 x 600 Medium Resolution
1600 x 1200 High Resolution
LAN and WAN
• LAN: are networks usually in the same
company or building. The Local Area
Network is connected via telephone
lines or radio waves. Most LANs
connect workstations.
• WAN: are systems of LANs that are
connected. (Wide-area network)
Bandwidth and Baud Rate
• Bandwidth is how much information
can be carried in a given time period
(usually a second) over a wired or
wireless communications link.
• Baud rate is the rate at which
information is transferred in a
communication channel.
Multitasking and
Multiprocessing
• Multitasking is the ability to execute
more than one task (program) at the
same time. Only one CPU is used but
switches from one program to another.
• In multiprocessing, more than one CPU
is used to complete a task. Example:
network rendering.
Multimedia
• Multimedia software programs
include sound, pictures, video, text,
and hypertext to create presentations.
Software includes:
PowerPoint
Macromedia Director
FLASH
File Management
• Different programs have different file extensions.
• Naming files - avoid the following characters in naming files:
Examples:
•@
•*
•.
• Understand the parts of a path name.
Example: C:\SciVis\movie.avi
Drive designator Directory or folder File name File extension
File Management
• Saving files - know the difference between “save”
and “save as”. “Save” will save the open document
over the saved document while “save as” creates a
new document if you rename the document. Save
often so work will not be lost.
• Exporting – converts a native format to a nonnative
file format used in various software
programs. In vector programs, file types may be
exported.
File Management
• Merging files - in 3D graphics,
bringing an outside file into an
open file (another name for this
may be loading or replacing
objects in the workspace).
• Importing files - bringing a
converted non-native format file
into an open file.
The End
The Computer Continuum 4-159
Chapter 4:
Computer Languages,
Algorithms and Program
Development
How do computers know what
we want them to do?
The Computer Continuum 4-160
Computer Languages, Algorithms
and Program Development
In this chapter:
• What makes up a language and how do we use language to
communicate with each other and with computers?
• How did computer programming languages evolve?
• How do computers understand what we are telling them to
do?
• What are the steps involved in building a program?
• How can we create something that would be visible on the
WWW?
The Computer Continuum 4-161
Communicating with
a Computer
Communication cycle
• One complete unit of communication.
– An idea to be sent.
– An encoder.
– A sender.
– A medium.
– A receiver.
– A decoder.
– A response.
Speaker encodes
information
Listener decodes
information
Listener returns
feedback to speaker
The Computer Continuum 4-162
Communicating with
a Computer
Substituting a computer
for one of the people in
the communication
process.
• Process is basically
the same.
– Response may be
symbols on the
monitor.
User encodes
information Computer decodes
information
Computer
returns results
to user
The Computer Continuum 4-163
Communicating with
a Computer
Between two people:
• The person can’t hear you.
• The phone connection is
broken in mid-call.
• One person speaks only
French, while the other only
Japanese.
Between a person and a
computer:
• The power was suddenly
interrupted.
• An internal wire became
disconnected.
• A keyboard malfunctioned.
A breakdown can occur any place along the cycle...
When communicating instructions to a computer, areas
of difficulty are often part of the encoding and decoding
process.
The Computer Continuum 4-164
Communicating with
a Computer
Programming languages bridge the gap between
human thought processes and computer binary
circuitry.
• Programming language: A series of specifically defined
commands designed by human programmers to give
directions to digital computers.
– Commands are written as sets of instructions, called
programs.
– All programming language instructions must be expressed
in binary code before the computer can perform them.
The Computer Continuum 4-165
The Role of Languages
in Communication
Three fundamental elements of language that
contribute to the success or failure of the
communication cycle:
• Semantics
• Syntax
• Participants
The Computer Continuum 4-166
The Role of Languages
in Communication
Human language:
• Refers to the meaning of
what is being said.
• Words often pick up
multiple meanings.
• Phrases sometimes have
idiomatic meanings:
– let sleeping dogs lie
(don’t aggravate the
situation by “putting in
your two cents”)
Computer language:
• Refers to the specific
command you wish the
computer to perform.
– Input, Output, Print
– Each command has a
very specific meaning.
– Computers associate
one meaning with one
computer command.
Semantics: Refers to meaning.
The Computer Continuum 4-167
The Role of Languages
in Communication
Human language:
• Refers to rules governing
grammatical structure.
– Pluralization, tense,
agreement of subject and
verb, pronunciation, and
gender.
• Humans tolerate the use of
language.
– How many ways can you
say no? Do they have the
same meaning?
Computer language:
• Refers to rules governing
exact spelling and
punctuation, plus:
– Formatting, repetition,
subdivision of tasks,
identification of
variables, definition of
memory spaces.
• Computers do not tolerate
syntax errors.
Syntax: Refers to form, or structure.
The Computer Continuum 4-168
The Role of Languages
in Communication
Human language:
• In the communication cycle,
humans can respond in more
than one way.
– Body language
– Facial expressions
– Laughter
– human speech
Computer language:
• People use programming
languages.
• Programs must be
translated into binary code.
• Computers respond by
performing the task or not!
Participants:
• Human languages are used by people to communicate with
each other.
• Programming languages are used by people to communicate
with machines.
The Computer Continuum 4-169
The Programming
Language Continuum
In the Beginning...Early computers consisted of
special-purpose computing hardware.
• Each computer was designed to perform a particular
arithmetic task or set of tasks.
• Skilled engineers had to manipulate parts of the computer’s
hardware directly.
– Some computers required “fat-fingering”.
• Fat-fingering: Engineer needed to position electrical relay
switches manually.
– Others required programs to be hardwired.
• Hardwiring: Using solder to create circuit boards with
connections needed to perform a specific task.
The Computer Continuum 4-170
The Programming
Language Continuum
ENIAC
• Used programs to complete a
number of different
mathematical tasks.
– Programs were entered by
plugging connector cables
directly into sockets on a
plug-in board.
• Set-up could take hours.
• A program would
generally be used for
weeks at a time.
The Computer Continuum 4-171
The Programming
Language Continuum
In the beginning… To use a computer, you needed to know how
to program it.
Today… People no longer need to know how to program in order
to use the computer.
To see how this was accomplished, lets investigate how
programming languages evolved.
• First Generation - Machine Language (code)
• Second Generation - Assembly Language
• Third Generation - People-Oriented Programming Languages
• Fourth Generation - Non-Procedural Languages
• Fifth Generation - Natural Languages
The Computer Continuum 4-172
The Programming
Language Continuum
First Generation - Machine Language (code)
• Machine language programs were made up of instructions
written in binary code.
– This is the “native” language of the computer.
– Each instruction had two parts: Operation code, Operand
• Operation code (Opcode): The command part of a
computer instruction.
• Operand: The address of a specific location in the
computer’s memory.
– Hardware dependent: Could be performed by only one
type of computer with a particular CPU.
The Computer Continuum 4-173
The Programming
Language Continuum
Second Generation - Assembly Language
• Assembly language programs are made up of instructions
written in mnemonics.
• Mnemonics: Uses convenient alphabetic
abbreviations to represent operation codes, and
abstract symbols to represent operands.
• Each instruction had two parts: Operation code,
Operand
• Hardware dependent.
• Because programs are not written in 1s and 0s, the
computer must first translate the program before it
can be executed.
READ num1
READ num2
LOAD num1
ADD num2
STORE sum
PRINT sum
STOP
The Computer Continuum 4-174
The Programming
Language Continuum
Third Generation - People-Oriented Programs
• Instructions in these languages are called statements.
– High-level languages: Use statements that resemble
English phrases combined with mathematical terms
needed to express the problem or task being programmed.
– Transportable: NOT-Hardware dependent.
– Because programs are not written in 1s and 0s, the
computer must first translate the program before it can be
executed.
The Computer Continuum 4-175
The Programming
Language Continuum
Pascal Example: Read in two numbers, add them, and
print them out.
Program sum2(input,output);
var
num1,num2,sum : integer;
begin
read(num1,num2);
sum:=num1+num2;
writeln(sum)
end.
The Computer Continuum 4-176
The Programming
Language Continuum
Fourth Generation - Non-Procedural Languages
• Programming-like systems aimed at simplifying the
programmers task of imparting instructions to a computer.
• Many are associated with specific application packages.
– Query Languages:
– Report Writers:
– Application Generators:
The Computer Continuum 4-177
The Programming
Language Continuum
• Query Languages:
– Enables a person to specify exactly what information they
require from the database.
– Usually embedded within database management
programs.
• Report Writers:
– Takes information retrieved from databases and formats
into attractive, usable output.
• Application Generators:
– A person can specify a problem, and describe the desired
results.
– Included with many micro-computer programs (macros).
The Computer Continuum 4-178
The Programming
Language Continuum
Fourth Generation - Non-Procedural Languages (cont.)
• Object-Oriented Languages: A language that expresses a
computer problem as a series of objects a system contains, the
behaviors of those objects, and how the objects interact with
each other.
– Object: Any entity contained within a system.
• Examples:
. A window on your screen.
. A list of names you wish to organize.
. An entity that is made up of individual parts.
– Some popular examples: C++, Java, Smalltalk, Eiffel.
The Computer Continuum 4-179
The Programming
Language Continuum
Fifth Generation - Natural Languages
• Natural-Language: Languages that use ordinary
conversation in one’s own language.
– Research and experimentation toward this goal is being
done.
• Intelligent compilers are now being developed to
translate natural language (spoken) programs into
structured machine-coded instructions that can be
executed by computers.
• Effortless, error-free natural language programs are
still some distance into the future.
The Computer Continuum 4-180
Assembled, Compiled, or
Interpreted Languages
All programs must be translated before their
instructions can be executed.
Computer languages can be grouped according to
which translation process is used to convert the
instructions into binary code:
• Assemblers
• Interpreters
• Compilers
The Computer Continuum 4-181
Assembled, Compiled, or
Interpreted Languages
Assembled languages:
• Assembler: a program used to translate Assembly language
programs.
• Produces one line of binary code per original program
statement.
– The entire program is assembled before the program is
sent to the computer for execution.
The Computer Continuum 4-182
Assembled, Compiled, or
Interpreted Languages
Interpreted Languages:
• Interpreter: A program used to translate high-level
programs.
• Translates one line of the program into binary code at a time:
– An instruction is fetched from the original source code.
– The Interpreter checks the single instruction for errors. (If
an error is found, translation and execution ceases.
Otherwise…)
– The instruction is translated into binary code.
– The binary coded instruction is executed.
– The fetch and execute process repeats for the entire
program.
The Computer Continuum 4-183
Assembled, Compiled, or
Interpreted Languages
Compiled languages:
• Compiler: a program used to translate high-level programs.
• Translates the entire program into binary code before
anything is sent to the CPU for execution.
– The translation process for a compiled program:
• First, the Compiler checks the entire program for syntax
errors in the original source code.
• Next, it translates all of the instructions into binary code.
. Two versions of the same program exist: the original
source code version, and the binary code version (object
code).
• Last, the CPU attempts execution only after the programmer
requests that the program be executed.
The Computer Continuum 4-184
Programming for Everyone
Several ways to control what your computer does or
the way it accomplishes a particular task:
• Using Macros
• Using HTML to create Web Pages
• Scripting
Each allows customization of current applications.
The Computer Continuum 4-185
Programming for Everyone
Using Macros
• Macro: Set of operations within the computer application that
have been recorded for later execution.
– Once recorded, the macro can be used repeatedly on any
document within that application.
– In word processors, macros are commonly used to speed
up repetitive tasks.
• Example: SIG can be stored as a macro that includes
a signature message at the end of a document.
James R. Emmelsohn
Director of Public Relations,
Martin Electronics, Detroit Division
The Computer Continuum 4-186
Programming for Everyone
Using HTML to create Web Pages
• HTML (HyperText Markup Language): A computer language
consisting of special codes intended to design the layout (or
markup) of a Web page.
– Web browsers interpret the HTML code and display the
resulting Web pages.
– Web browser: A program that displays information from
the WWW.
– Each line of HTML is called a tag (formatting
instruction).
The Computer Continuum 4-187
Programming for Everyone
<HTML>
<HEAD>
<TITLE> Title of Web Page </TITLE>
</HEAD>
<BODY bgcolor=#ffffff text=#000000 >
<BODY>
<H1>
<CENTER> Sample Web Page
</CENTER> </H1>
<HR>
<A HREF=“http://www.dogpile.com”>
dogpile search engine </A>
</BODY>
</HTML>
Designates an HTML document
Beginning of Header section
Contents of Title bar
End of Header section
Background=white, text=black
Top of the body of the document
H1=largest text size, H6 is smallest
CENTER turns on centering
Turns off centering and large text
Displays a horizontal rule: thin line
Links to the dogpile search engine
</BODY> and </HTML>designate
the bottom of the document
The Computer Continuum 4-188
Programming for Everyone
Scripting
• Scripting: A series of commands, written to accomplish some
task.
– Very similar to the concept of a program.
– Extends the capabilities of the application where it is
being used.
– Examples of scripting languages:
• Perl, C++, VBScript, JavaScript
• JavaScript: A scripting language that allows the Web
page designer to add functional features to a
formatted web page created in HTML.
The Computer Continuum 4-189
Building a Program
Whatever type of problem needs to be solved, a careful thought
out plan of attack, called an algorithm, is needed before a
computer solution can be determined.
1) Developing the algorithm.
2) Writing the program.
3) Documenting the program.
4) Testing and debugging the program.
The Computer Continuum 4-190
Building a Program
1) Developing the algorithm.
• Algorithm: A detailed description of the exact methods used
for solving a particular problem.
• To develop the algorithm, the programmer needs to ask:
– What data has to be fed into the computer?
– What information do I want to get out of the computer?
– Logic: Planning the processing of the program. It contains
the instructions that cause the input data to be turned into
the desired output data.
The Computer Continuum 4-191
Building a Program
A step-by-step program plan is created during the
planning stage.
The three major notations for planning detailed
algorithms:
• Flowchart: Series of visual symbols representing the logical
flow of a program.
• Nassi-Schneidermann charts: Uses specific shapes and
symbols to represent different types of program statements.
• Pseudocode: A verbal shorthand method that closely
resembles a programming language, but does not have to
follow a rigid syntax structure.
The Computer Continuum 4-192
Building a Program
Start
Count Money
Do you
have more than
$10.00?
Go out
Go home
End
No
Yes
Repeat until
money < $10.00
Go out
Y If money > $10.00 N
Go home
1. If money < $10.00 then go home
Else Go out
2. Count money
3. Go to number 1
Nassi-Schneidermann chart:
Pseudocode:
Flow chart:
Stop
The Computer Continuum 4-193
Building a Program
2) Writing the Program
• If analysis and planning have been thoroughly done,
translating the plan into a programming language should be a
quick and easy task.
3) Documenting the Program
• During both the algorithm development and program writing
stages, explanations called documentation are added to the
code.
– Helps users as well as programmers understand the exact
processes to be performed.
The Computer Continuum 4-194
Building a Program
4) Testing and Debugging the Program.
• The program must be free of syntax errors.
• The program must be free of logic errors.
• The program must be reliable. (produces correct results)
• The program must be robust. (able to detect execution errors)
• Alpha testing: Testing within the company.
• Beta testing: Testing under a wider set of conditions using
“sophisticated” users from outside the company.
The Computer Continuum 4-195
Software Development:
A Broader View
Type of program Number of Lines
The compiler for a language with a
limited instruction set. Tens of thousands of lines
A full-featured word processor. Hundreds of thousands of lines
A microcomputer operating system. Approximately 2,000,000 lines
A military weapon management program.
(controlling missiles, for example) Several million lines
Measures of effort spent on real-life programs:
Comparing programs by size:
The Computer Continuum 4-196
Software Development:
A Broader View
Measures of effort spent on real-life programs:
Comparing programs by time:
• Commercial software is seldom written by individuals.
– Person-months - equivalent to one person working forty
hours a week for four weeks.
– Person-years - equivalent to one person working for
twelve months.
– Team of 5 working 40 hours for 8 weeks = ten personmonths.
The Computer Continuum 4-197
Web Page Design Software:
Dreamweaver
What is Web page design software?
• The programs that help create pages and their associated
HTML.
• Dreamweaver: A visual Web page editor primarily for use by
Web design professionals.
Why is it needed?
• Allows creation of Web pages without knowledge of HTML .
The Computer Continuum 4-198
Web Page Design Software:
Dreamweaver
What minimal functions must it have?
• WYSIWIG: “What you see is what you get.”
– Web page designers see exactly what it will look like.
• Allows selection of color scheme. (Background and text)
• Allows text manipulation. (Typing text where you want it,
changing the size, color or style)
• Allows importation and layout of images.
The Computer Continuum 4-199
Web Page Design Software:
Dreamweaver
What types of support are available to enhance its use?
• Applets extend the capabilities of HTML.
– Applet: A short application program, usually written in
Java, which adds enhancement and/or functionality to a
Web page.
Is special support hardware available?
• Creating audio/visual materials for the WWW:
– Photo digitizers or scanners, video digitizer, and audio
digitizer.
– Once these are in a standard digital format, they can be
imported to Web development programs.
The Computer Continuum 4-200
Web Page Design Software:
Dreamweaver
One final note:
• Dreamweaver and other Web page design software create
Web pages. You still need a place to keep your Web page.
– ISP (Internet Service Provider): A company or
organization that is used as an access point to the WWW.
• The ISP will put your Web page on its server.
• You will be given an address where you or others can
access your Web page.
The Computer Continuum 5-201
Chapter 5:
Two Computers and Their
Programs
How do programs, written by programmers, work
with the computer’s hardware components to
manipulate the information in the computer’s
memory, producing a desired outcome?
The Computer Continuum 5-202
Two Computers
and Their Programs
In this chapter:
• How do computer programs enable computer hardware to
perform tasks?
• How does the stored-program computer store both programs
and the information the programs need?
• How does the instruction set define the computer’s uses and
capabilities?
• How does the CPU function?
• How does the CPU fetch and execute programs?
• What are some special features of electronic spreadsheet
software?
The Computer Continuum 5-203
Reviewing Key Concepts
Review of a few important concepts from earlier
chapters:
• Computers are not able to do anything with the data they have
stored until they are given instructions for processing it.
• All data that computers contain and manipulate must be in
binary form.
• Computer instructions must be performed sequentially, in the
order presented.
• Every instruction in a program must have one meaning.
The Computer Continuum 5-204
Reviewing Key Concepts
Review continued:
• Computer instructions are divided into two parts: operation
code (opcode) and operand.
• In every language, there are commands that make no use of
the operand part of an instruction. (Write, Stop in Word Hunt)
• Programs, written in any language, are translated into binary
form by assigning a numeric form to each instruction, then
converting each numeric value to its binary equivalent.
• Once a program is expressed in binary form, the computer
can use it directly. (Machine language program)
Opcode Operand
The Computer Continuum 5-205
Two Conceptual Computers
In this chapter, we will examine two conceptual
computers:
• A robot.
• A simplified mathematical computer.
Why choose imaginary computers to examine how a
computer works?
• Today’s real computers are incredibly complex machines.
– Huge memories, Large instruction sets, Nearly limitless
options and flexibility.
• Using conceptual computers allows us to strip away the
complexity, revealing the underlying simplicity of operation.
The Computer Continuum 5-206
Two Conceptual Computers
How is each conceptual computer similar?
• Each is a stored-program computer (von Neumann computer)
– Each contains a minimal configuration of:
• Input units
• Memory
• Central processing unit
• Output units
• Each stores a program and the data it needs in its own memory.
• Each executes instructions sequentially.
• Each is designed with very limited capabilities. (small memory
and instruction set.)
The Computer Continuum 5-207
The ROBOT Computer:
Programs and Algorithms
Our first example of the computer: The ROBOT
computer.
The ROBOT’s domain
• The room is empty.
• The room is rectangular.
• There may be one or more open doorways in the walls.
• The floor is paved with square tiles with lines between them. The lines
are easy to see.
• The size of the room is unknown to us at any given time.
• The size of the room does not change during the execution of a program.
• Doorways will never be located in corners.
The Computer Continuum 5-208
The ROBOT Computer:
Programs and Algorithms
Hardware: Defining ROBOT Capabilities
• ROBOT’s capabilities are defined by its hardware:
– Limitations:
• The ROBOT has no eyes: Can’t see its surroundings.
• The ROBOT has no numerical capacity: Can’t count
the number of squares before it reaches a wall.
The Computer Continuum 5-209
The ROBOT Computer:
Programs and Algorithms
Hardware Features:
• Locomotion:
– Forward motion from one square to an adjacent square within its
domain (STEP).
– Pivot: Only to the right, 90 degrees (TURN).
• Arms (two - one at each side)
– Can be raised (RAISE) and lowered (LOWER).
– Extension: arms reach to the far side of the next square.
– Sensors:
• At tips of arms: Can sense if a wall is in front of it if arms
are raised and a SENSE command is given.
• ROBOT also senses a wall if instructed to RAISE its arms
and a wall is directly in front of the ROBOT.
The Computer Continuum 5-210
The ROBOT Computer:
Programs and Algorithms
Hardware: ROBOT’s
Memory:
• Located on the ROBOT’s
torso.
• 32 memory locations
numbered 0 to 31.
• Each memory location is a
set of 8 toggle switches.
On = 1 Off = 0
• Each location is capable of
storing one ROBOT
instruction.
• Loading a program: setting
the switches.
The Computer Continuum 5-211
The ROBOT Computer:
Programs and Algorithms
ROBOT Hardware:
• Fetch: Electronic circuits cause it to fetch (or retrieve)
instructions from memory one at a time, and usually in the
order in which they are stored.
• Decode: An Instruction Decoder is a set of circuits which
causes the appropriate actions to be taken based on the
particular binary number instruction that is received as input.
– ROBOT instructions are split into two parts.
Opcode
(Command)
Operand
(Address)
The Computer Continuum 5-212
The ROBOT Computer:
Programs and Algorithms
Software: The ROBOT’s Language.
• The ROBOT has no intelligence. It cannot think on its own.
Any instruction must come in the form of a program.
– To “Program the ROBOT”: Devise a sequence of
instructions designed to accomplish some particular task.
• The ROBOT’s language consists of eight different
commands. These make up the ROBOT’s Instruction Set.
STEP RAISE SENSE LIGHT
TURN LOWERGOTO STOP
– These commands are used to form instructions.
– The ROBOT can store 32 instructions in its memory.
The Computer Continuum 5-213
The ROBOT Computer:
Programs and Algorithms
The ROBOT’s Instruction Set
Opcode The action taken by the ROBOT, in English:
000 STEP The ROBOT takes one STEP forward if possible.
001 TURN The ROBOT pivots 90 degrees to the right.
010 RAISE The ROBOT raises its arms if possible. If can’t RAISE: There MUST be
a wall directly in front of the ROBOT. The ROBOT’s warning light comes
on. No other commands will be recognized until the light is turned off.
011 LOWERThe ROBOT lowers its arms if they are raised.
100 SENSE The ROBOT, with its arms in raised position, can detect if it is one step
away from the wall it is facing. IF IT IS, the warning light will turn on.
Recognizes no other commands until the light is turned off.
101 GOTO The ROBOT takes the next command out of normal order. The Operand,
the last 5 bits of the instruction, tells which memory location is to be
performed next.
110 LIGHT IF the light is turned on, this command turns it off. The ROBOT will again
recognize instructions in the program.
111 STOP The ROBOT shuts off its own power.
The Computer Continuum 5-214
The ROBOT Computer:
Programs and Algorithms
Problem: Cause the ROBOT to walk to the wall it is initially
facing and then stop with its arms lowered and facing against the
wall. Assume the ROBOT is not initially facing an open doorway.
– Remember: We have NO IDEA how big the room is!
• We CAN’T just tell it to STEP X-number of times!
First, find the Algorithm:
• An algorithm is a step-by-step process used to solve a
problem.
• The solution to the problem must be general.
– Raise arms
– See if a wall is in front of the ROBOT.
– Take a step.
– Repeat until a wall is found.
The Computer Continuum 5-215
The ROBOT Computer:
Programs and Algorithms
Why isn’t this a “good enough” solution to the
problem of finding the wall in front of the ROBOT?
0 RAISE
1 SENSE
2 STEP
3 GOTO 1
4 LIGHT
5 STOP
The Computer Continuum 5-216
The ROBOT Computer:
Programs and Algorithms
Why is this a better solution to the problem of finding
the wall in front of the ROBOT?
0 RAISE
1 LOWER
2 STEP
3 GOTO 0
4 LIGHT
5 STOP
The Computer Continuum 5-217
The ROBOT Computer:
Programs and Algorithms
Programming the ROBOT - Taking the “English” steps
and writing them in the language the ROBOT
understands (Machine Language).
• Machine Language - Written in binary code, the program is
in the form the computer understands.
“English” Version Machine Language Version
0 RAISE 01000000
1 LOWER 01100000
2 STEP 00000000
3 GOTO 0 10100000
4 LIGHT 11000000
5 STOP 11100000
The Computer Continuum 5-218
The ROBOT Computer:
Programs and Algorithms
Loop - A sequence of instructions which is repeated
one or more times when a program is executed.
Infinite loop - A set of instructions which causes the
program to repeat the same commands over and over
with no possible way of stopping.
The Computer Continuum 5-219
The ROBOT Computer:
Programs and Algorithms
Cause the ROBOT to walk around the perimeter of the
room.
0 RAISE
1 LOWER
2 STEP
3 GOTO 0
4 LIGHT
5 TURN
6 GOTO 0
7 STOP
Does the program ever stop? What kind of loop does this program
contain?
The Computer Continuum 5-220
The Pencil and Paper
Computer
Parts of a typical General-purpose Computer:
CPU (Central Processing Unit)
1. Arithmetic Unit (Computations performed)
Accumulator (Results of computations
accumulated here)
2. Control Unit
Instruction Register (Instruction placed
here for analysis)
Program Counter (Which instruction will
be performed next?)
3. Instruction Decoding Unit (Decodes the instruction)
Input
Units Output
Units
Memory Devices
The Computer Continuum 5-221
The Pencil and Paper
Computer
Parts of the Pencil & Paper Computer (a conceptual
computer):
CPU (Central Processing Unit)
1. Arithmetic Unit (Computations performed)
Accumulator
-14 bits long (largest number is 4095)
2. Control Unit (Analyzes and performs instructions)
Instruction Register
Program Counter - Next instruction found
where?
3. Instruction Decoding Unit (Decodes the instruction)
Input
Unit:
Pencil
Output
Unit:
Paper
Memory Devices
The Computer Continuum 5-222
The Pencil and Paper
Computer
The Pencil & Paper Instruction Format:
• Operation Code (Opcode) - Dictates action by Pencil &
Paper Computer.
• Operand (Argument) - The address of a position in memory.
Pencil & Paper Instruction
Operation Code
(3 BITS)
Operand
(5 BITS)
The Computer Continuum 5-223
The Pencil and Paper
Computer
The Pencil & Paper Instruction Set:
• A unique set of commands to be used only when
programming the Pencil & Paper Computer.
Opcode English Action taken by command
001 ADDAdd the contents of the referenced memory location to the value
in the accumulator.
010 SUB Subtract the contents of the referenced memory location from
the value found in the accumulator.
011 LOAD Load a copy of the value of the referenced memory
location into the accumulator.
100 STORE Store a copy of the contents of the accumulator into the
referenced memory location.
101 READ Read a value from the keyboard and store it at the
referenced memory location.
110 PRINT Print the value found at the referenced memory location.
111 PJUMP Jump to the referenced memory location if the value of the
accumulator is a positive nonzero number.
000 STOP This causes the computer to stop execution of the program.
The Computer Continuum 5-224
The Pencil and Paper
Computer
Process for writing Pencil & Paper Computer
programs:
1. Read the problem.
2. Determine the algorithm.
– Break the problem down into steps.
– What will be needed as input?
– What will be needed to be computed?
– What is the desired output?
3. Write an outline of the steps.
4. Write the program.
5. Trace through the program.
The Computer Continuum 5-225
The Pencil and Paper
Computer
Problem: Write a program that sums 2 numbers read in
from the “user.”
2. Determine the algorithm.
• Input: Read in 2 numbers.
• Computations: Add the two numbers together.
• Output: Print out the sum of the 2 numbers.
3. Outline:
• Read in 2 numbers.
• Add the 2 numbers.
• Print the Sum.
4. Write the program.
The Computer Continuum 5-226
The Pencil and Paper
Computer
Problem: Write a program that sums 2 numbers read in
from the “user.”
Program:
READ NUM1
READ NUM2
LOAD NUM1
ADD NUM2
STORE SUM
PRINT SUM
STOP
Memory:
Accumulator:
Output:
Num1 Num2 Sum
Trace the program.
The Computer Continuum 5-227
The Pencil and Paper
Computer
Problem: Write a program that prints the counting
numbers from 5 down to 1.
ONE: 1
COUNT: 5
START: PRINT COUNT
LOAD COUNT
SUB ONE
STORE COUNT
PJUMP START
STOP
Memory:
Accumulator:
Output:
Count One
The Computer Continuum 5-228
The Pencil and Paper
Computer
The fetch and
execute cycle:
Start Program at
the desired location.
Fetch an instruction from program memory
at current program counter location
Increment counter to next location
in the program memory.
Execute the instruction which
was just fetched.
Stop
Is the
Instruction the STOP
Instruction?
YES NO
The Computer Continuum 5-229
Using an Electronic
Spreadsheet - Microsoft Excel
Electronic spreadsheet:
• A computerized ledger page (larger and more flexible).
• Arranged in columns and rows.
• Functions:
– Performs calculations using any values entered on the
spreadsheet.
– Performs instant recalculation if any values are changed
throughout the spreadsheet.
– Shows numeric relationships in visual form.
Visicalc - by Bob Frankston and Dan Brickland (1979)
• First electronic spreadsheet.
• Did pretty much everything but graph relationships.
The Computer Continuum 5-230
Using an Electronic
Spreadsheet - Microsoft Excel
Why are electronic spreadsheets needed?
• Number crunching -
– The manipulation of numeric data into useful calculated
results.
– Includes mathematical operations (addition, subtraction,
multiplication, and division).
– Also includes statistical and scientific calculations of
complex formulae.
• What-if-forecasting -
– Examines the effects of current policies and events on the
future.
The Computer Continuum 5-231
Using an Electronic
Spreadsheet - Microsoft Excel
What minimal functions must an electronic
spreadsheet have?
• Allow the user to:
– Enter numeric values, labels (such as column headings),
and formulas into specific locations on the page.
– Perform mathematical calculations on demand.
– Make changes (instant recalculation).
– Print out all or part of the spreadsheet.
The Computer Continuum 5-232
Using an Electronic
Spreadsheet - Microsoft Excel
What types of support programs are available to
enhance the use of electronic spreadsheets?
• Presentation programs -
– Allows spreadsheet to be converted into a variety of
different graphic forms.
– Can present the results of the spreadsheet in color with
enhanced visual design.
The Computer Continuum 5-233
Using an Electronic
Spreadsheet - Microsoft Excel
Is special support hardware available for electronic
spreadsheets?
• Math co-processor (accelerator board)-
– A second microchip that speeds up intricate calculations,
data searches, and printing operations.
The Computer Continuum 6-234
Chapter 6:
Operating Systems:
The Genie in the Computer
What do you have left on your computer after you
strip away all of the games and application
programs you bought and installed?
The Computer Continuum 6-235
Operating Systems:
The Genie in the Computer
In this chapter:
• What is an operating system and what does it do?
• Where can the operating system be found before, during and
after a computer has been turned on?
• What are some major interface differences in operating
systems?
• What are some memory constraints dealing with the amount
of RAM memory and the size of programs to be stored there?
• How does an operating system control information over a
network?
• What do operating systems have in common?
The Computer Continuum 6-236
What is an operating system?
The operating system: A collection of programs that
manages and controls applications and other software, and
coordinates the various hardware components to perform tasks
requested by the user.
• Allows use of (partial list!)
– the keyboard
– the mouse
– printing to a printer of your choice
– viewing information on a monitor
– saving or retrieving files
– formatting a disk
– running programs
– controlling any external device attached to the computer
The Computer Continuum 6-237
What is an operating system?
Altair 8800: One of the first
microcomputers (1975)
• Had NO operating system
• Switches had to be “fat
fingered” - manually
switched by hand - to enter
instructions into RAM to
start up the computer.
• The first program “fatfingered”:
allowed the
computer to recognize a
paper-tape reader:
– Keyboard
– BASIC program
The Computer Continuum 6-238
What is an operating system?
BIOS (Basic Input Output System)
• Small unchangeable part of the operating system in the ROM.
• BIOS:
– A collection of programs that have the capability of
communicating with peripheral devices.
• Keyboards, Disk drives, printers, display/monitors,
and other devices.
– BIOS most important task: Loads the operating system
into RAM and turns control of the computer over to it.
The Computer Continuum 6-239
Booting the Computer
“Booting up”(Starting) the computer:
• The computer invokes a stripped-down version of the operating
system found in ROM. (Makes the computer recognize the
keyboard, floppy and the hard disk drives.)
• Diagnostics are run on RAM and any cards residing in the computer.
• The programs in ROM make the computer look for the rest of the
operating system on the floppy disk.
– If it can’t find the floppy disk, it will look for rest of the
operating system on the hard disk.
• The operating system (found on the floppy or hard disk drive) is
loaded into RAM.
• The programs residing in RAM now control the computer.
The Computer Continuum 6-240
Booting the Computer
Cold boot:
• Starting up the computer by turning the power on.
• Operating system in ROM looks for and loads the remaining
operating system into RAM.
Warm boot:
• Reloads the operating system into RAM without disrupting
the power to the disk drives or power supply.
The Computer Continuum 6-241
Booting the Computer
Booting with Multiple Operating Systems
• Common when you need to run programs recognized by older
operating systems.
– Example: MS DOS and Windows
• Common when you need two different operating systems and
have only one machine.
– Example: Macintosh X and Windows
• Partitioning: Dividing a hard drive so that it appears to the
computer to be two (or more) separate disk drives.
The Computer Continuum 6-242
User Interface
User interface: The part of the operating system that
the user sees and communicates with.
• Two basic ways the operating system is presented to the user:
– Command line - Commands are typed in using the
keyboard.
• Example: >copy c:paper.txt a:*.*
– GUI (Graphical User Interface) - Icons (graphical
representation of command choices) are selected using an
input device, usually a mouse.
• Takes advantage of drag and drop.
The Computer Continuum 6-243
User Interface
Version number: The number given to a program that
is used for identification.
• Indicates the variant of the program being considered.
• Release and modification numbers give even more specific
information about the program variant.
Why is knowing the version number of the operating
system important?
• Programs such as word processors, spreadsheets and others
are written for a particular version of the operating system.
• They use parts of the operating system to function.
The Computer Continuum 6-244
User Interface
UNIX:
• Used by professional high-powered computer users in
business, science, engineering and networking.
– Flexible in doing computing jobs.
– Doesn’t fail or crash very often.
• Some versions are free. Example: Linux.
– Open-source software: The original program is
available. Changes can be made to suit computing needs.
• Can use either command line or GUI type user interface.
– Popular command line: Korn shell, C shell, Bourne shell.
– Example of GUI to UNIX: X Window.
– Examples of GUI to Linux: Gnome and KDE
The Computer Continuum 6-245
Files and File Management
File: the name given to any program or chunk of data
that is stored on floppy, hard disk. CD ROM, or other
storage.
• Naming files:
– Early operating systems allowed 8-letter names.
– Modern operating systems allow as many as 256 letters.
• Extensions:
– A 3-letter extension is added to the file name separated by
a period.
• Helps the operating system identify the type of file.
• Example: index.htm identifies a document called
index that is made up of HTML code.
The Computer Continuum 6-246
Files and File Management
Two types of file systems:
• Flat File system: stores the files in a single list.
• Hierarchical File system organizes files in a treelike
structure or hierarchy.
– Organizes files into groupings.
• Folders: A grouping of files or other folders under a
single name.
The Computer Continuum 6-247
Input & Output of Information -
Device Control
What makes binary information of these types
different to the computer?
• Numbers
• Text or Characters
• Visual information
• Audio information
• Instruction
• The computer has no way of “knowing” which of the five
types of information are in a file unless the person or
application supplies its type in the proper form.
The Computer Continuum 6-248
Input & Output of Information -
Device Control
Compatibility problem:
• Files created by the same type of program are not always
interchangeable.
– Example: Can’t always interchange files created by one
word processor to another. Also, same word processors
with different versions are not always compatible.
The Computer Continuum 6-249
Input & Output of Information -
Device Control
Installing a new device:
• A physical connection must be made to the peripheral.
• The proper software drivers must be added to the operating
system’s collection of programs.
– Device Driver: A program that will allow communication
between the operating system and another part of the
computer, usually a peripheral device like a printer or
scanner. It is an addition to the operating system.
The Computer Continuum 6-250
Memory Concerns:
Cache and Virtual Memory
VRAM or Video RAM: Very fast memory that is used
by the operating system to house video display data
that allows quicker, better video display.
• RAM isn’t fast enough to make quick changes in the display.
• By putting the image data into this faster video RAM, delays
can be made minimal.
The Computer Continuum 6-251
Memory Concerns:
Cache and Virtual Memory
Virtual Memory - addresses the problem of a program
being too big to fit into the available RAM.
• The operating system divides the program into pieces.
• The pieces are stored on the hard disk as if it were additional
RAM memory needed by the program.
• The pieces are retrieved into RAM as needed.
• Disadvantage: This slows the system down, because retrieval
of information from the disk is time consuming.
The Computer Continuum 6-252
Context Switching and
Multitasking
Context Switching: Allows several application
programs to be in RAM memory at one time.
• Allows switching from one program to another such as from a
word processor to a spreadsheet and back again (both reside
in RAM).
• Limitation: The only active program is the one just switched
to, the others are inactive.
The Computer Continuum 6-253
Context Switching and
Multitasking
Multitasking: Allows several application programs to
be in RAM memory at one time.
• Allows the operating system to control more than one
program simultaneously.
• Each program “stealing” CPU time.
– Such as playing a game while a large document is being
printed.
• (von Neumann) Bottleneck: Microcomputers having only
one program counter can run only one program at a time.
– The CPU can only process a single instruction at any one
time, no matter how many tasks there are.
The Computer Continuum 6-254
Operating Systems
for the Networked World
Two categories of operating systems:
• The single CPU.
• The multiprocessor system that has many CPUs (such as a
supercomputer).
Parallel processing (Multiprocessing):
• Programs are divided into pieces.
• Each of the pieces get processed by one of many processors.
• Several processors or CPUs are simultaneously computing a
program.
The Computer Continuum 6-255
Operating Systems
for the Networked World
Distributive processing:
• Makes use of a network.
• Decentralizes and distributes the computing needs over
several interconnected computers.
Operating Systems designed for networks:
• Handles all of the single-computer chores.
• Communicates with other computers in the network.
• One computer on the network can act as a shared storage unit.
– Server: A computer that provides data and programs on
request from multiple clients.
The Computer Continuum 6-256
Operating Systems
for the Networked World
Real-time processing:
• Involves human interaction with the computer.
• Requires quick or timely return of results.
• Referred to in the engineering and manufacturing world as
Controlling processes.
– ATM: Customer wants cash now, not tomorrow! Bank
wants to know how much money you have (even if after
hours) before you are able to make a withdrawal from
your account.
– Airline ticket reservation system: Travel agent needs to
know how many seats are still available. (Immediately)
The Computer Continuum 6-257
Operating Systems
for the Networked World
Process Control:
• Refers to the control of some process by a computer in real
time.
• Computer needs to accept information, then manage the
process on the basis of these calculations.
– Robotics: Maneuvering a robot’s arm.
– Automobiles: Computerized traffic signals at intersections
control traffic flow through a city.
The Computer Continuum 6-258
Three Cutting Edge
Operating Systems
Comparing:
• Windows 2000
• Macintosh X
• Linux
Computer Start-up Requirements
• The majority of all operating systems reside on the hard drive
of the computer.
– Operating system must be loaded into RAM.
– Time to boot up:
• Depends on how many features have been added to
the operating system.
• All three boot up in less than one minute.
The Computer Continuum 6-259
Three Cutting Edge
Operating Systems
Running Applications
• Compatibility: Before you purchase software, examine the
box. It will tell you which operating system and which
version of the operating system is required.
• Compatibility problems may arise if an operating system is
updated. One of two things might happen after updating:
1. The operating system may be compatible with older
software so that more users will purchase it.
2. The operating system was optimized with the latest
software technology. Many applications won’t run. The
hope is that manufacturers will rewrite the software so
that it will become compatible with the new operating
system.
The Computer Continuum 6-260
Three Cutting Edge
Operating Systems
Access to Previously Stored Information
• Operating systems
– Assist in creating new documents with various
applications.
– Allow the retrieval of files already created by some
application.
The Computer Continuum 6-261
Three Cutting Edge
Operating Systems
Controlling and Communicating with Peripheral
Devices
• One major responsibility of the operating system is
communicating and controlling peripheral devices.
• Modern operating systems have a feature called: plug & play.
– Just attach a new peripheral to your computer and start
using it.
– Problem: A new peripheral needs a device driver installed
in the operating system. (An older peripheral’s technology
may have already been included as a part of the operating
system.)
The Computer Continuum 6-262
Three Cutting Edge
Operating Systems
Connecting a computer to a network
• Computers connected on a network need to be able to share
files and communicate with other computers.
• Operating system must be configured to network
specifications.
The Computer Continuum 6-263
Three Cutting Edge
Operating Systems
Manage and Add to Capability
• All operating systems are built to be extended.
– By adding software to the operating system, new features
can be added.
• Operating system: Managing “housekeeping chores”:
– A fragmented disk: As files become scattered on the hard
disk, small chunks of space not large enough to hold an
entire file develop.
• A single file stored on such a disk can take up several
of these chunks.
– Defragmenting a hard drive is the process of moving the
scattered files together. (Performed by software.)
Introduction to windows
operating system i
Introduction & History of Windows OS
CMPF112 Computing Skills for Engineers
264
What is operating system?
Interface between
hardware and user.
Handle technical details
without user intervention.
A Collection of programs
Operating system
Systems software
Kernel
Utilities
Device drivers
Language translators
CMPF112 Computing Skills for
Engineers
265
What is operating system?
Responsible for the management and coordination of
activities and the sharing of the resources of a computer
Acts as a host for computing applications run on the
machine.
Determines which applications should run in what order
and how much time should be allowed for each
application before giving another application a turn (in
multitasking OS).
CMPF112 Computing Skills for
Engineers
266
What is operating system?
Handle the resource allocation and access protection of
the hardware.
Relieves the application programmers from having to
manage these details.
CMPF112 Computing Skills for
Engineers
267
Kernel
Is the central component of most computer operating
systems; it is a bridge between applications and the
actual data processing done at the hardware level.
Responsibilities include managing the system's
resources (the communication between hardware and
software components).
CMPF112 Computing Skills for
Engineers
268
Function of OS
It handles input and output process
It sends messages to each application or interactive user
about the status of operation and any errors
It can off load the management of what are called batch
jobs so that the initiating application is freed from this
work (i.e. print spool)
It can manage how to divide the program (in parallel
processing)
CMPF112 Computing Skills for
Engineers
269
Categories of operating
System
Embedded OS
• Used in handheld computers, Stored within device in Read-
Only Memory (ROM)
• Windows CE, Palm OS
Network OS
• Controls and coordinates linked computers (Network)
• Novell NetWare, Windows NT Server, UNIX
Stand-alone Desktop/ Personal Computer OS
• Controls a single desktop or laptop computer
• Client operating system
• MS-DOS, Windows 2000, XP, Mac OS X, Linux
CMPF112 Computing Skills for
Engineers
270
MS-DOS
Uses a command-line interface
Screen provides prompts for user
User types commands
Largely replaced by graphical user interfaces
Not user-friendly
CMPF112 Computing Skills for
Engineers
271
Microsoft Windows
Most popular OS for
microcomputers
Designed for Intel processors
Active Desktop
Graphical user interface (GUI) to OS
Windows XP, Windows 2003,
Vista
Windows CE
Embedded Compact
for minimalistic computers and
embedded systems
WinCE
Series of software operating systems and graphical user
interfaces produced by Microsoft
CMPF112 Computing Skills for
Engineers
272
Apple Mac OS
Series of graphical user
interface-based operating
systems.
Runs on Macintosh
computers
Designed for PowerPC
microprocessors
OS X
Latest version OS
compatible with both PowerPC
and Intel processors through
version 10.5 ("Leopard").
First commercially
successful GUI
Has served as the model
for Windows and other
GUI products developed
since then.
CMPF112 Computing Skills for
Engineers
273
UNIX
Originally ran on
mainframe and
minicomputers
Used for large
servers on the Web
Popular alternative
to Windows
Several versions
available
• Solaris 8
• Linux
CMPF112 Computing Skills for
Engineers
274
Windows 98 & Windows XP
Window 98
Window XP
CMPF112 Computing Skills for
Engineers
275
Windows Vista
Windows Vista is the latest operating system by
Microsoft designed for home and office use.
It contains new updates on the GUI and visual style and
also an improvement in the search function.
Even though Windows Vista has been around for quite
sometime, there is some resistance in the uptake of Vista
mainly due to the steep system requirements needed to run
the system reliably.
Also, some applications that run in Win XP are not
compatible with Vista, requiring some software companies
to rework their applications to be Vista compatible,
i.e. Photoshop CS2 in XP but Vista Photoshop CS3.
CMPF112 Computing Skills for
Engineers
276
Windows Vista
Intended to have enhanced
security by introducing a new
restricted user mode called User
Account Control.
One major difference between
Vista and earlier versions of
Windows, Windows 95 and
later, is that the original start
button was replaced with just
the Windows icon.
Vista also features new graphics
features, the Windows Aero
GUI, new applications
CMPF112 Computing Skills for
Engineers
277
Windows features
Long file names (up
to 255 characters)
Plug and Play
Makes installing
hardware
components easier
Object Linking and
Embedding (OLE)
• Allows user to
embed or link one
document to another
Word
Document
Excel Data
CMPF112 Computing Skills for
Engineers
278
Windows Family
Windows 9x
Windows 95
Windows 98
Windows Millennium Edition (ME)
Corporate Market
Windows NT (“New technology”)
• Windows 2000
• Windows 2003
Windows XP
Windows CE
Windows VISTA
CMPF112 Computing Skills for
Engineers
279
The Computer Continuum 7-280
Chapter 7:
Network Concepts and
Communications
Going online to do everything from banking to
buying groceries, just a fad or is it here to stay?
The Computer Continuum 7-281
Network Concepts
and Communication
In this chapter:
• What can be done online?
• How are computers connected?
• What are the physical properties of networks?
• How does a computer know how to communicate with a
network?
• Can all computers talk to each other?
The Computer Continuum 7-282
Introduction: “Everything is
Connected to Everything”
Going online: Connecting to a collection of
interconnected computers on a network.
• Do banking.
• Pay bills.
• Buy groceries.
• Book vacation travel.
• Send messages.
• Participate in discussions.
• Do research.
• Play games.
Network: A collection of computers, display terminals, printers,
and other devices linked either by physical or wireless means.
The Computer Continuum 7-283
Introduction: “Everything is
Connected to Everything”
Seeds of Networking
• 1966: ARPA (Advanced Research Projects Agency) State
Defense Department’s research organization.
– Focused major development effort on computer
networking.
– ARPA’s Goal: To promote research in advanced future
technologies by funding university and industry research
proposals.
– Result: Thousands of databases became available to the
public.
The Computer Continuum 7-284
Introduction: “Everything is
Connected to Everything”
Computer Networking
• Internet: A world-wide network connecting millions of
computer networks for the purpose of exchanging data and
communications using special rules of communication.
• internet: (lower case i) Any network connecting two or more
computer networks.
• The human need to communicate has motivated mankind’s
creativity:
– Cave dwellers drew pictures on walls.
– Smoke signals, drum rhythms passed messages.
– American pioneers: Pony express, Wells Fargo.
– Alexander Graham Bell: invented the telephone.
The Computer Continuum 7-285
Communication Basics
of Networks
Types of connections of computers into networks:
Physical versus Wireless connections
• The first type: The Physical Connection.
– Physically connect computers together.
• Use of wires or optical cables.
• The connections are called network links.
– Three most common physical links:
• Twisted pair
• Coaxial cable
• Fiber-optic cable
The Computer Continuum 7-286
Communication Basics
of Networks
Twisted pair
• Two wires twisted together.
– Makes them less susceptible to acting like an antenna
and picking up radio frequency information or appliance
noise.
• Telephone company uses twisted-pair copper wires to link
telephones.
The Computer Continuum 7-287
Communication Basics
of Networks
Coaxial cable
• Also two wires:
– One of the wires is woven of fine strands of copper
forming a tube.
– The wire mesh surrounds a solid copper wire that runs
down the center.
– Space between has a non-conducting material.
– Makes them more impervious to outside noise.
The Computer Continuum 7-288
Communication Basics
of Networks
Fiber-optic cable
• Light is electromagnetic.
• Can transmit more
information down a single
strand.
– It can send a wider set
of frequencies.
• Each cable can send several
thousand phone
conversations or computer
communications.
The Computer Continuum 7-289
Communication Basics
of Networks
Second type of connections of computers into
networks: Wireless connections
• The link is made using electromagnetic energy that goes
through space instead of along wires or cables.
• Three types of wireless communications commonly used in
networking:
– Infrared
– Radio frequency
– Microwave
The Computer Continuum 7-290
Communication Basics
of Networks
Infrared
• Commonly used in TV and VCR remote controls.
• Use infrared frequencies of electromagnetic radiation that
behave much like visible light.
• Must be in the line of sight.
• Often used to connect
keyboards, mice,
and printers.
The Computer Continuum 7-291
Communication Basics
of Networks
Radio frequency
• Uses radio frequencies.
– Function even though line
of sight is interrupted.
• Not commonly used because of
the possible interference from
other sources of
electromagnetic radiation such
as old electric drills and furnace
motors.
The Computer Continuum 7-292
Communication Basics
of Networks
Microwave
• Often used to communicate
with distant locations.
• Must be line of sight.
• Satellite communications use
microwaves.
The Computer Continuum 7-293
Communication Basics
of Networks
Properties of Transmission
Five basic properties of both the physical and wireless links:
1. Type of signal communicated (analog or digital).
2. The speed at which the signal is transmitted (how fast the data
travels).
3. The type of data movement allowed on the channel (one-way,
two-way taking turns, two-way simultaneously).
4. The method used to transport the data (asynchronous or
synchronous transmission).
5. Single channel (baseband) and multichannel (broadband)
transmission.
The Computer Continuum 7-294
Communication Basics
of Networks
1. Type of signal communicated (analog or digital).
• Analog: Those signals that vary with smooth continuous
changes.
– A continuously changing signal similar to that found on
the speaker wires of a high-fidelity stereo system.
• Digital: Those signals that vary in steps or jumps from value
to value. They are usually in the form of pulses of electrical
energy (represent 0s or 1s).
The Computer Continuum 7-295
Communication Basics
of Networks
2. The speed at which the signal is transmitted (how fast
the data travels).
• In digital systems: Speed is measured in...
– Bits per second (bps).
• The number of bits (0’s and 1’s) that travel down the
channel per second.
– Baud rate
• The number of bits that travel down the channel in a
given interval.
• The number is given in signal changes per second,
not necessarily bits per second.
The Computer Continuum 7-296
Communication Basics
of Networks
MODEM - MOdulator
DEModulator
• Outgoing: Converts binary data from
computer (digital) into telephone
compatible signals (analog).
• Incoming: Converts telephone signal
(analog) into binary data for the
computer (digital).
• Can be an external or internal device
(usually a “card”).
The Computer Continuum 7-297
Communication Basics
of Networks
Speed of Signal: Sample bps and baud rate speeds.
300 bps (=300 baud) Painfully slow to the college-level reader
1200 bps (=1200 baud) Good reader can keep up
2400 bps (=2400 baud) A speed reader would get the general idea
9600 bps (=9600 baud) Impossible to read
14.4 K bps (not measured in baud) 14,400 bps - 10 to 20 sec. wait for graphics
28.8 K bps Minimum desired for WWW
(5 to 10 sec. wait for graphics)
56 K bps Efficient speed for WWW.
These speeds are restricted to the maximum speed of the modem at the
other end of the connection.
The Computer Continuum 7-298
Communication Basics
of Networks
3. The type of data movement allowed on the channel.
• Simplex transmission - One way transmission.
• Half-duplex transmission - Flows only one way at a time.
• Full-duplex transmission - Two-way transmission at the same
time.
The Computer Continuum 7-299
Communication Basics
of Networks
4. The method used to transport the data.
• Two types of data transmission, each requiring a different
modem.
• Asynchronous transmission -
– Information is sent byte by byte.
– Cheaper and more commonly used.
• Synchronous transmission -
– Data is sent in large blocks rather than in small pieces.
– Preceded by special information, concerning error
detection and block size.
– These modems are expensive but very fast.
The Computer Continuum 7-300
Communication Basics
of Networks
5. Single channel versus multichannel transmission
• Channel - A path of a signal.
• Single channel - Capable of only sending/receiving one
signal at a time.
– Phone line: Single line = single phone call at a time.
• Multichannel - Capable of more than one channel at a time.
– Fiber-optic cable, microwaves, Satellite transmissions.
The Computer Continuum 7-301
Communication Basics
of Networks
How is it possible to measure the capacity of
communications links?
• Bandwidth: Digital
– Number of bits per second (bps) that can be sent over a link.
– The wider the bandwidth, the more diverse kinds of information
can be sent.
– Simplest is voice, most sophisticated is moving videos.
• Bandwidth: Analog
– The difference between the highest and lowest frequencies that
can be sent over an analog link (like phone lines).
– Measurement is given in hertz (Hz).
• For both: The wider the bandwidth, the more information can flow
over the channel.
The Computer Continuum 7-302
Communication Basics
of Networks
Mbps = megabytes per sec. (millions) Gbps=Gigabytes per sec. (billions)
Typical cable bandwidths used in local area networks.
Cable: Typical Bandwidth:
Twisted Pair 10 to 100 Mbps
Coaxial Cable 10 to 100 Mbps
Fiber-optic cable 100 to 200 Mbps
The bandwidths of different services offered by a telephone company:
Service: Bandwidth
ISDN 64 Kbps/channel
T1 1.544 Mbps
T3 44.736 Mbps
STS-1 51.840 Mbps
STS-3 155.250 Mbps
STS-12 622.080 Mbps
STS-24 1.244160 Gbps
STS-48 2.488320 Gbps
The Computer Continuum 7-303
The Physical Organization
of Networks
Two parts to connect computers to networks
• The hardware needed to connect the computer to the network.
• The software needed to control the hardware.
– (Software standards will be discussed in the next section.)
The Computer Continuum 7-304
The Physical Organization
of Networks
Node: The generic name given to all devices hooked
up to a network.
• Each node must have a unique address assigned to them by
the network.
• Networks are either direct-connected or those that are not
directly linked.
– Direct-connected network: Those whose nodes have
direct connections through either physical or wireless
links.
• Point-to-point: Simplest version of direct-connected
network. Connecting two computing systems.
. Example of point to point: Home to ISP.
– Example of a network that is not directly linked: Internet.
The Computer Continuum 7-305
The Physical Organization
of Networks
The bus network -
• A continuous coaxial cable
to which all the devices are
attached.
• All nodes can detect all
messages sent along the bus.
The ring network -
• Nodes linked together to
form a circle.
• A message sent out from
one node is passed along to
each node in between until
the target node receives the
message.
Linking nodes:
The Computer Continuum 7-306
The Physical Organization
of Networks
The star network -
• Each node is linked to a
central node.
• All messages are routed
through the central node,
who delivers it to the proper
node.
The tree network -
(hierarchical network)
• Looks like an upside-down
tree where end nodes are
linked to interior nodes that
allow linking through to
another end node.
Linking nodes:
The Computer Continuum 7-307
The Physical Organization
of Networks
The fully connected
network -
• All nodes are connected to
all other nodes.
Internetworking -
• Connecting together any
number of direct-connected
networks.
• The largest: Internet.
Linking nodes:
The Computer Continuum 7-308
The Physical Organization
of Networks
Categorizing networks according to size:
• DAN (Desk Area Network)
• LAN (Local Area Network)
• MAN (Metropolitan Area Network)
• WAN (Wide Area Network)
The Computer Continuum 7-309
The Physical Organization
of Networks
DAN (Desk Area Network)
• Making all components of a desktop computer available to
other computers on the network.
– CPU - Unused computing power can be used by other
computers on the network.
– Hard Disk - Items stored can be accessed by others or
items may be placed on the hard drive from other
computers.
– Video Display - Alert messages can be sent to the
computer’s display.
– Other items - Other devices connected to the computer
might be needed by others connected to the network.
The Computer Continuum 7-310
The Physical Organization
of Networks
LAN (Local Area Network)
• A collection of nodes within a small area.
• The nodes are linked in a bus, ring, star, tree, or fully
connected topology network configuration.
• Benefits of LANs:
– Sharing of hardware resources.
– Sharing of software and data.
– Consolidated wiring/cabling.
– Simultaneous distribution of information.
– More efficient person-to-person communication.
The Computer Continuum 7-311
The Physical Organization
of Networks
MAN (Metropolitan Area Network)
• Consists of many local area networks linked together.
• Span the distance of just a few miles.
WAN (Wide Area Network)
• Consists of a number of computer networks including LANs.
• Connected by many types of links.
The Computer Continuum 7-312
The Physical Organization
of Networks
Security of a Network
• Enterprise and intranet networks: Corporations, government
agencies, and other organizations have created their own
internal networks.
– Firewall: A set of programs that monitor all
communication passing into and out of a corporation’s
intranet.
• Helps prevent, but doesn’t eliminate, unauthorized
access.
The Computer Continuum 7-313
Software Architecture
of Networks
Problem:
• Connect several different machines running different
operating systems (Windows, OS/2, MacOS, UNIX, VMS...)
• Now, try to: send email, data or files between them.
Solution:
• Create a standardized set of rules, or protocols, that, when
followed, will allow an orderly exchange of information.
• A collection of these programs is called a protocol suite.
– Must be on all computers or nodes in the network.
– In order to send data over the network, the necessary
programs must be executed.
• Network’s architecture: The protocol suite and the general
scheme that guides the network’s rules.
The Computer Continuum 7-314
Software Architecture
of Networks
Problem: Collisions of information are caused by two computers
simultaneously attempting to send information to the network.
Solution: Different networks have different protocol suites:
• Apple Computer’s LocalTalk Protocol - Permission must be
granted before information can be sent along the network.
• Token-Ring Protocol (IBM and others) - A token is “picked
up” by a node signifying that a message is about to be sent,
the computer sends the message, then, replaces the token so
that others can use the network.
• Ethernet Protocol (Xerox and others) - Collisions are not
avoided. When they occur, both detect the others’ presence,
stop sending, wait a random amount of time, and send again.
The Computer Continuum 7-315
Software Architecture
of Networks
The Architecture of the Internet
• Four-layer architecture:
FTP HTTP NV TFTP
TCP UDP
IP
Network #1 Network #2 Network N
The Computer Continuum 7-316
Software Architecture
of Networks
The Internet is referred to as a packet-switching network.
• Packet: A unit of information created by the Transfer Control
Protocol (TCP) software for transmission over the Internet.
– Once a file is requested, it is split into packets.
• Each packet is assigned a number.
• Each packet contains information regarding content, where
it came from, where it is supposed to go.
– As the packet travels through the Internet from network to
network:
• Each packet may not travel through the same path through
the Internet to its destination.
• Each network has its own “packet-limiting” size.
• Packets are often “packaged” and “repackaged.”
– They are reconstructed in order when they reach the destination.
The Computer Continuum 7-317
Software Architecture
of Networks
Problem: If someone wants his own WWW site, he must find a
home for it.
Solution: Find a Server willing to store your homepage.
• Server: A dedicated computer that is part of a network.
– The hard drive contains files that are “served” to whatever
requests them.
– Could be data, programs, or home pages for the WWW.
– The server normally runs the networking software.
• Client/server model: One computer, the client, requests
information from another computer, the server.
– Client computers can run any type of operating system as
long as they have the ability to use Internet protocols.
The Computer Continuum 7-318
Software Architecture
of Networks
Types of nodes important to networks.
Hub A device that repeats or broadcasts the network stream of information to
individual nodes ( usually personal computers)
Switch A device that receives packets from its input link, and then sorts them and
transmits them over the proper link that connects to the node addressed.
Bridge A link between two networks that have identical rules of communication.
Gateway A link between two different networks that have different rules of
communication.
Router A node that sends network packets in one of many possible directions to
get them to their destination.
The Computer Continuum 7-319
Traceroute
Traceroute: A program that allows the the tracing of
packets over the Internet or any network using TCP/IP
protocol.
• Uses a special number - TTL (Time to Live) - contained in a
place at the beginning of each packet sent over the network.
– The number is originally set to 255.
– Each time it is received by a router, it decrements by 1.
– If the TTL number becomes 0 before reaching its
destination, the router where this happened sends back an
error message (time exceeded) with the address of the
router.
• Stops messages from circulating forever.
The Computer Continuum 8-320
Chapter 8:
The Internet and the Web:
World Wide Transformation
The Internet grew from a grass-roots society into a
global community. Keeping this in mind, whose
rules will we need to follow when we make use of
the World Wide Web?
The Computer Continuum 8-321
The Internet and the Web:
World Wide Transformation
In this chapter:
• How has the Internet and the WWW been used as a tool of
influence and persuasion?
• How did the Internet evolve into what it is today?
• What are some popular services, past and present?
• Who owns the Web?
• How can you access the Internet from home?
• What can be downloaded for free, and what for a fee?
• How are web pages created?
• What kinds of search services are out there?
The Computer Continuum 8-322
A Powerful Voice
The Internet and Web continue to emerge as powerful
tools of influence and persuasion.
• After the 1989 Tiananmen Square massacre, Chinese students
in the U.S. used email as a vehicle to lobby for support from
Congress for protective legislation.
• Fall of 1993 - Russian President Boris Yeltsin suspended
parliament. Three Russian labor leaders were arrested. Vassily
Balog, the deputy head of Russia’s major labor confederation
began an email campaign. After phone calls came in from
around the world, the three were released.
• During the U.S. Primaries from 1999-2000, John S. McCain
raised over $750,000 because of a letter he posted on his
campaign’s WWW home site.
The Computer Continuum 8-323
The Internet:
Struggling to Maturity
Early 1960’s
• Packet-switching envisioned (Baran and Davies)
• Provided the foundation for what became the Internet.
1966: ARPAnet (Advanced Research Projects Agency
NETwork)
• Funded by ARPA (Advanced Research Projects Agency).
• Pooled computer scientists and resources from several
universities.
• In 1969, linked 4 nodes at UCLA, UC Santa Barbara, SRI
(Stanford Research Institute) and U of Utah.
• By mid-1970’s, linked several military sites and about 20
universities.
The Computer Continuum 8-324
The Internet:
Struggling to Maturity
ARPA intended to sell off the ARPAnet to an academic
or corporate consortium.
• Before the sale, federal rules required the Defense
Department to determine if ARPAnet was needed for national
defense.
• ARPAnet was transferred to the Defense Communications
Agency in 1975.
• Only about 15 universities were given access to the network.
1980: National Science Foundation started CSnet
• Purpose: To provide a resource-sharing network opportunity
to computer science research at all universities.
• Used TCP/IP protocol.
The Computer Continuum 8-325
The Internet:
Struggling to Maturity
CSnet fueled interest in creating a more
comprehensive network to link all scientific
communities (not just CS)
• NSF couldn’t fund such an expensive project.
– Backbone: NSF built a very fast connection between 5
supercomputing centers linking them all together.
– Each region surrounding each center would develop its
own community network.
– NSF allowed the regional community networks exclusive
use of the backbone.
The Computer Continuum 8-326
The Internet:
Struggling to Maturity
1983: ARPAnet split.
• Converted from Network protocol to TCP/IP protocol.
• Part remained ARPAnet: universities, research institutes.
• Part became Milnet: non-classified military information.
• By 1989, ARPAnet was costing $14 million per year to keep
up and running.
1989: majority of ARPAnet switched to NSF’s
backbone.
• ARPAnet sites were connected to the NSF backbone through
the regional community networks.
NSFnet became what is known as the Internet.
Early 1995: “Information Superhighway.”
The Computer Continuum 8-327
Internet Services
Four examples of popular Internet functions illustrate
the diversity of Internet use:
• University sites provide class and faculty information, books,
and periodicals from the library, and lists of governmental
documents.
• Employment offices provide vacancy notices and job
descriptions.
• Various governmental agencies provide informational
documents. (jobs, how-to documents, forms)
• Students and academic researchers could find bibliographies.
The Computer Continuum 8-328
Internet Services
Internet owes its critical mass to the wide distribution
of computers running the UNIX operating system.
• Original access to the Internet had a UNIX “feel.”
• Exact addresses were needed to access information.
– Addresses were given as strings of numbers.
– Address for UCSD: 128.54.16.1
• In the early days of the Internet, people who could navigate
the Internet were considered specialists and were well paid
for the use of their skills.
The Computer Continuum 8-329
Internet Services
Internet needed improvements in user-friendliness.
Three early creations satisfied the need:
• Gopher
• Veronica
• Archie
Gopher (University of Minnesota):
• Land of the “Golden gophers.”
• Introduced first improvement to accessing the Internet.
• Menu-driven system gave access to databases of information.
• Were once over 5,000 gopher servers.
The Computer Continuum 8-330
Internet Services
Internet Gopher Information Client v2.1.3
Home Gopher server: gopher.tc.umn.edu
1. Information About Gopher/
2. Computer Information/
3. Discussion Groups/
4. Fun & Games/
5. Internet file server (ftp) sites/
6. Libraries/
7. News/
8. Other Gopher and Information Servers/
9. Phone books/
10. Search Gopher Titles at the University of Minnesota <?>
11. Search lots of places at the university of Minnesota <?>
12. University of Minnesota Campus Information/
Press ? For Help, q to Quit, u to go up a menu
The Computer Continuum 8-331
Internet Services
Searching for information on the Internet from
Gopher:
• Veronica:
– Very Easy Rodent-Oriented Netwide Index to Computerized
Archives.
– Finds only sites related specifically to the topic of interest.
– Updated about twice weekly.
• Archie: One of the oldest search systems
– Original purpose: Used to find data files on the Internet.
– Designed to search ftp archive sites.
– FTP files could then be downloaded using the Internet FTP
program.
– Expanded to include resource listings and online directories.
– Currently accessible through the WWW.
The Computer Continuum 8-332
Using the Internet
Email (Electronic mail)
• The most prevalent use of network applications.
• Not as private as regular mail.
– Partially because it hasn’t been around long enough to
develop privacy laws or security systems.
– Computers make it easy to copy and snoop into
unprotected files.
The Computer Continuum 8-333
Using the Internet
Bulletin Board System (BBS)
• Provides a messenger service.
• Used as a repository for software and documents that may be
copied.
• Provides a place for people to converse.
• This type system is quickly being replaced by the World Wide
Web.
– BBS’s are still in existence.
The Computer Continuum 8-334
Using the Internet
Conferences Online
• Computer conference (electronic conference): An electronic
meeting that can take place at the convenience of the
participants.
– Conference participants can type in questions or
comments so that other members can see them and
respond.
• WELL (Whole Earth ‘Lectronic Link)
. Has thousands of users accessing more than 100
public conferences (topics).
• Usenet (Users’ Network)
. Hundreds of conferences organized by topic.
The Computer Continuum 8-335
Using the Internet
IRC (Internet Relay Chat)
• Developed in 1988 by Jarkko Oikarinen in Finland.
– The original was a text-based Internet version.
• “Real-time” online chat facilities: chat rooms.
• Communication is accomplished via typing text over a
“channel”
– Participants can occupy one of the many public chat
rooms where everyone can read and respond, or go into
“private rooms” or “celebrity” chat rooms.
The Computer Continuum 8-336
And Then Came the Web
World Wide Web (WWW or the Web)
• A computer communications system that allows multimedia
information to be accessed and transmitted via the Internet.
– Multimedia: Producing different types of information
(text, sound, graphics, and/or video) simultaneously.
• The Web follows the Hypertext Transfer Protocol.
– 1989: Tim Berners-Lee created the HTTP.
– HTTP: A set of rules implemented in a program.
– Allows an individual computer to participate with other
computers through the Internet.
– Converts text, visual and audio information into packets
to traverse the Internet.
The Computer Continuum 8-337
And Then Came the Web
Who owns the Web?
• No one owns the web.
• Access is the key issue on the Web.
– The Web is made up of a network of computers and other
networks.
– Each entry point to the Web is controlled by an organization that
provides the service. They “own their own piece” of the Web.
– Mutually accepted protocols, TCP/IP and HTTP, are used by all
who access the WWW.
– Organizations allow read-only access to certain files and
documents on their computer’s storage device. (These are the
pages one sees and the files that can be retrieved.)
The Computer Continuum 8-338
Navigating the Web
The World Wide Web uses point and click navigation
accomplished by the use of:
• Hypertext - Refers to any word or phrase in an electronic
document, which can be used as a pointer to a related text
passage.
• Hypertext link - Any text or image that has been designated
as a means of accessing related material.
The Computer Continuum 8-339
Navigating the Web
In hypertext, one
follows the links to
related information.
Columbus sailed west
under the auspices of
Queen Isabella of Spain.
She commissioned...
Queen Isabella’s
husband was King
Ferdinand...
A biography of
King Ferdinand,
he reigned from...
The Computer Continuum 8-340
Navigating the Web
When setting up links, the creator of a Web page
would follow these steps:
• Identify the specific words that will be useful as links.
• Search for and locate the related text or additional
information the hypertext will access. (Could be another web
page.)
• Set pointers containing information on how to find the
document containing the related information.
• Have the selected words printed in a special color and
underlined so that the reader can recognize them as hypertext.
The Computer Continuum 8-341
Navigating the Web
Hypermedia: Hypertext linking with other communications
mediums, such as pictures, animations, and sound.
• Hypermedia links are often called hyperlinks.
The Computer Continuum 8-342
Understanding Web
Addresses (URLs)
Surfing the Web
• The slang term used to
describe the free-form
navigation from place to
place on the Internet by
following hyperlinks.
The Computer Continuum 8-343
Understanding Web
Addresses (URLs)
A Web Page
• A document especially created for Web viewing.
• Contains at least some of the following: text, images,
graphics, sound, animation, hyperlinks.
Links:
• Appear in Web pages.
• Clicking on a link may send you to another Web page.
• Links need two types of information:
– The instruction to locate and display the second page.
– The location, or address, of where to find it.
• Technical name: Uniform Resource Locator (URL)
The Computer Continuum 8-344
Understanding Web
Addresses (URLs)
A Uniform Resource Locator (URL) has 3 parts:
1) Type of connection (specifies protocol used at that location):
Name Definition Description
HTTP HyperText Transport Mode through which WWW uses the Internet.
Protocol
FTP File Transfer Protocol Used for transferring files between
computers.
SMTP Email Protocol Used to send/create an email link.
FILE Local file access Used to view HTML files.
Gopher Name of Internet Transfer type used by Gopher systems.
access system
WAIS Wide area info. Service Tool for searching information databases.
Telnet Telephone Networking Service for logging on to remote computers.
The Computer Continuum 8-345
Understanding Web
Addresses (URLs)
2) The Internet address (domain name) of the computer you are
trying to access: (Locates the specific computer on the Internet.)
http://www.eds.com/home/eds_home.html
Top-level Domain
Domain name: Identifies the
Internet address
Sub-domains: Includes the
Server name and Top-level
Domain which identifies the
type of organization.
com Commercial site
edu Educational Institution
gov Government organization
mil Military organization
net Networking organization
org Nonprofit organization
1 Type of connection
2 Domain
3a Path or Directory
3b File name
The Computer Continuum 8-346
Understanding Web
Addresses (URLs)
3) The path and name of the file:
• Identifies the location of the file and the name of the file to be
displayed on your screen.
• If the path (folder or subdirectory) or name of file have been
changed:
– An error message will appear on your screen!
The Computer Continuum 8-347
The Web and You
Accessing the Web (What you need to get connected!)
• A computer:
– The faster and the bigger, the better.
– Minimal setup recommended: 300 MHz, 64 MB RAM, 2
GB hard disk space.
• A modem:
– Minimal setup: 28.8 Kbps; 56 Kbps will enhance
performance.
• An Internet Service Provider: Your dial-up entry point to
the web.
– Usually charge a fee to access their system.
– They have servers linked to the Internet.
The Computer Continuum 8-348
The Web and You
Web browser:
• A program that allows you to access all of the multimedia
components of Web pages. (support HTTP protocol)
• Two major products: Netscape Navigator and Microsoft
Internet Explorer.
• With Web Browsers, you can:
– “Read” the contents of Web documents.
– Print out a paper copy of the Web document.
– Copy text into a word processing document.
– Save and use pictures and animations.
– Read email, Chat with others, Transfer files.
– Keep an address book of favorite sites.
The Computer Continuum 8-349
The Web and You
Downloading software:
• The process of receiving a program, document, or file via a
network, from another computer.
• Always comes electronically from an outside source to your
computer.
The Computer Continuum 8-350
The Web and You
Free Downloads
• Search the WWW for the free file you want.
• Click on the name of the file to be downloaded.
– May require the use of FTP (File Transfer Protocol
software).
– Provided with most browsers and is done “invisibly.”
• Wait until the file is downloaded.
• You may need to “de-compress” the file.
– Run WinZip on Windows, StuffIt Expander on Macintosh
• Read the “Readme” file.
• Read the limitations of use on the license.
The Computer Continuum 8-351
The Web and You
Shareware:
• Not all software found on the Internet is free, some request
that a fee be paid if the software is used.
• Sometimes, the fee includes:
– Documentation
– Phone support
– Notice of software updates
• Shareware comes with no guarantee of quality.
• Many viruses have been spread by shareware.
The Computer Continuum 8-352
The Web and You
Creating a Web presence:
• Web pages are normally created in any word processing
program using a special formatting language called HTML
(Hypertext Markup Language).
– HTML: A series of codes, or tags, which are used to
format materials used on Web pages.
• Once the coded version of the page is uploaded (sent to) the
Internet Service Provider’s computer, it can be viewed by
anyone with a browser and the address of your page.
The Computer Continuum 8-353
The Web in Business:
The Growth of E-Commerce
Potential benefits of having a “Web presence” for a
business: an accessible, online place to do business.
• Original main purpose: To give the company an electronic
presence.
• Electronic Commerce is sweeping the country: Made up of
online advertising, buying, and selling of goods and services.
• Three main drivers behind the power of E-commerce:
1. Lower transaction costs for both business and client.
2. Larger purchases per transaction and more
transactions per client.
3. Integration of Internet activities into the business
cycle: from the time it is ordered, to the time it
reaches the consumer’s hands.
The Computer Continuum 8-354
The Web in Business:
The Growth of E-Commerce
E-commerce encourages potential customers to visit
their sites and return to buy additional items.
• Web sites must be easy to find.
– Many companies include links on some of the more
popular web sites.
• Web services like Excite and Yahoo sell add space.
• Adds take the form of an icon, banner, or border.
The Computer Continuum 8-355
The Web in Business:
The Growth of E-Commerce
Paying for E-commerce Purchases
• Credit card:
– Fears: Victim of electronic theft.
– Losses: Credit card companies cover losses after the first
fifty dollars.
– Credit rating: Although the loss is covered, delaying the
payment may result as a bad debt.
– Secure channels: Prevent electronic theft.
• Charging to another account: Charging to your telephone bill.
• Electronic wallet: Allows prepayment to a service company.
• E-money: eCash™ service uses a special encrypted scheme
that does not allow the seller to trace where an electronic
payment originated.
The Computer Continuum 8-356
The Web in Business:
The Growth of E-Commerce
Privacy and Consumer Profiling
• Consumer profiling: The business practice of collecting
consumer information from online-based activities and using
that information to create targeted marketing efforts.
• E-commerce business can collect very extensive information
about their customers in attempt to closely define consumer
needs and desires.
– Poll conducted in February 2000 of online customers:
• 93% - Profiling is a potential threat to privacy.
• 80% - Would like to specify how information about
them is to be used.
The Computer Continuum 8-357
Search Engines
Searching the Web:
• Problem: How to find specific information from the
seemingly random mass of pages on the Internet?
• Search Engine: A program available through WWW
browsers that enables the user to search the Internet for
information on specific topics.
– Free search services provided on the Web.
– Many exist including; Lycos, HotBot, Excite, Yahoo,
Webcrawler.
– Search engines search by subject, topic, keyword,
concepts, text analysis, image content.
The Computer Continuum 8-358
Search Engines
The underlying technology of the search engine: the
spider.
• Spider: A piece of Web software that constantly searches for
new Web pages and follows any links found on them.
– A spider searches from site to site, perpetually, looking
for its intended object.
– Spiders search for titles of new web pages.
The Computer Continuum 8-359
Search Engines
To perform a search, you simply type a query:
• Query: A request specifying what information is to be sought
in a search operation.
• Most often made up of one or more keywords (Criteria
selected to identify and narrow the specific information
desired in a search.)
Refining a Web search query:
Use more than one word to make your query more specific.
Use quotation marks to match an exact phrase.
Use a plus sign to indicate that one or more specific words must be in
all items found.
Use a minus sign to indicate a word must not be in any items found.
Introduction To Information
Technology
Defining Information
What is Information?
Information is any knowledge that comes to our attention.
That could be voice, image, text and video
What is data?
Data is information when dealing with the machine
What Counts as information
Methods for conveying
information
Defining Information Technology
Information Technologies are systems
of hardware and/or software that
capture, process, exchange, store
and/or present information using
electrical, magnetic and/or
electromagnetic energy.
IT Example: Cellular Telephony
IT Example: Wireless Internet
IT in Society (people)
Personal Communication
• Conversations (phone, cell)
• Messaging (E-mail, SMS)
• Video Coms
Entertainment
• Web surfing
• Downloading video and audio files
• Interactive gaming
Day-to-Day living
• Buying airline tecket
• Ordering books
• Electronic banking/ stock market
IT in Society (business)
Internal Communication
• Computer network
• Corporate website
• Video teleconferencing
• Messaging (SMS, email)
Electronic Commerce
• Call Centres
• Electronic transactions
• Online sales
Business operations
• Factory operation systems
• Databases
Examples on IT Careers
Information Security Jobs
• Address information security
IT Analyst
• Translate business requirement into technical specification
Network Administration
• Configure and operate computer network
Management Consulting
• Provide consulting for government and organizations
Database Administration
• Managing corporate database
Computer Forensics Expert
• Extracts computer evidence for detecting/preventing /prosecuting crimes
IT Sales:
• people on frontline to sell products
Software development:
• develop software solutions
The Computer Continuum 9-370
Chapter 9:
Multimedia
Most of the outside information entering our
brains, enters through our eyes or our ears. They
are, indeed, input devices through which our
world communicates with us.
The Computer Continuum 9-371
Multimedia
In this chapter:
• What is multimedia?
• How are pictures stored within the computer?
• What can be done with digitized pictures?
• How can pictures be created using a computer and software?
• What is the importance of vocal communication?
• How is speech stored and played back by the computer?
• What are some problems the computer has when analyzing
speech?
• What areas are computers used in audio communication?
The Computer Continuum 9-372
What is Multimedia?
Multimedia has become interactive
• Interactive multimedia: The use of media such as text,
graphics, animation, video, and audio in an interactive way
that allows a participant to control it.
• To understand the value of interactive multimedia, we will
examine visual and audio concepts in detail.
The Computer Continuum 9-373
Visual Media:
Manipulating Images
Previously created images (Modifying or processing
images that already exist)
• Three types of techniques used to manipulate images:
– Minor Processing Techniques
– Enhancement
– Restoration
The Computer Continuum 9-374
Visual Media:
Manipulating Images
Common example of
digitized images: Satellite
weather maps.
• GEOS-7 satellite picture
taken on Aug. 24, 1992.
• Outlines created by a
computer program.
• Program color coded the
picture to give information
about the hurricane’s wind
speed.
The Computer Continuum 9-375
Visual Media:
Manipulating Images
Landsat 4 Satellite:
• Uses 3 of the 7 frequencies
available from the Thematic
Mapper of the satellite.
• Like having a camera with
different filters, each letting
a different frequency
through (including infrared).
The Computer Continuum 9-376
Visual Media:
Manipulating Images
Image enhancement
• A type of digital image
processing whose goal is to
highlight or enhance
particular aspects of an
image or change an image’s
structure.
• Common example of image
enhancement: Falsecoloring:
An image
enhancement technique that
consists of changing the
colors of an image or
assigning colors to various
parts of an image.
The Computer Continuum 9-377
Visual Media:
Manipulating Images
Image restoration
• A type of digital image
processing whose goal is to
eliminate known, but
unwanted image flaws or
degradations.
The Computer Continuum 9-378
Visual Media:
Manipulating Images
Image enhancement example:
• It makes you wonder if
photographs can be trusted.
The Computer Continuum 9-379
Visual Media:
Creating Images
Artists follow rules (or intentionally don’t follow
rules) to create original images:
• Hiding parts of things that wouldn’t normally be visible.
• Sources of light that illuminate the objects.
Creating images using the computer
• Line images.
• Solid forms to 3D.
• Animation and video.
The Computer Continuum 9-380
Visual Media:
Creating Images
Creating Line Images
• What are some uses of line drawings?
– Map making.
– Architectural drawings.
– Business graphs.
– Plans for building machinery, aircraft, furniture-in-a-box.
– City population density maps.
• How can line images be created?
– Using drawing programs such as Adobe Illustrator.
• Have drawing related features including geometric
shapes, free-hand tools, fills, patterns, text.
The Computer Continuum 9-381
Visual Media:
Creating Images
Bit-mapped or Raster graphical
images
• Constructed of individual pixels.
• Only crude manipulation can be
done (modification of each pixel).
• Retains “bit-mapped” appearance.
Object-oriented or Vector graphic images
• Stored in the computer as lines, curves, or geometric shapes.
• Formulas are used to draw (circles, twice the size, are still circles!)
• Objects can be moved or modified easily.
The Computer Continuum 9-382
Visual Media:
Creating Images
______________Designing 3-dimensional pictures drawn in 2-
dimensions
• Curved surfaces
• Color
• Texture
• Shading
The Computer Continuum 9-383
Visual Media:
Creating Images
One of the classic problems in computer
graphics:
• Hidden-line problem: Concerns
itself with how to hide the outlines
or surfaces of a solid object that
shouldn’t be seen from the direction
of the observation.
• Example: Studies of an airline
pilot in action.
The Computer Continuum 9-384
Visual Media:
Creating Images
Perspective: The quality that allows 3-dimensional images to be
drawn on 2-dimensional surfaces and yet retain the look of a 3-
dimensional image.
The Computer Continuum 9-385
Visual Media:
Creating Images
Shading: A technique used to give the appearance of illumination
by some combination of light sources.
The architecture program used to draw this building has a 3D description
of the building It can produce pictures from any angle.
The Computer Continuum 9-386
Visual Media:
Creating Images
Shading flat surfaces of the head (as in b) then blending the
surfaces to give a more natural look (as in c).
abc
The Computer Continuum 9-387
Visual Media:
Creating Images
Texture: A property of a surface. It is observed and identified
through the reflection of the light off the surface.
The Computer Continuum 9-388
Visual Media:
Animation and Video
Animation:
• Early animation started with pictures flipping hand-cranked
players.
• Animation 30 years ago:
– Cartoons had to have the figures drawn by artists.
– The animator would make them move while taking pictures,
frame by frame.
• Animation now:
– Computers are used to create full length feature cartoons.
• Toy Story
• Individual frames stored on the computer.
• Special player programs can be used to view them on the
computer screen or recorded on videotape using special
hardware and software.
The Computer Continuum 9-389
Visual Media:
Animation and Video
Jurassic Park dinosaurs
• Wire frames were created in the computer to depict dinosaurs.
• Each wire frame is moved by the computer which calculates
positions of each part viewed from a certain angle and
distance.
• The computer covered the surfaces of the wire frames with a
texture layer.
– Computer takes into account sources of light illuminating
the figure.
The Computer Continuum 9-390
Visual Media:
Animation and Video
Morphing: A
graphics technique
used in animation
• A beginning image
will distort and
change in a
predetermined
number of frames
into a final image.
The Computer Continuum 9-391
Visual Media:
Animation and Video
Digitizing and Manipulating Video
• Digital video hardware systems: Systems capable of capturing
and manipulating video.
• Analog video uses standards developed over 50 years ago.
– Each differs in the number of horizontal lines that make
up a single video frame and in the number of frames per
second that are displayed on the TV set.
• European broadcast standards (PAL).
• United States broadcast standards (NTSC).
. 30 frames per second.
. VHS.
The Computer Continuum 9-392
Visual Media:
Animation and Video
Video capture: The process of digitizing an analog TV signal.
• Done using hardware that produces a digital form of the
analog TV signal.
– Uses the VCR to feed the video signal into a digital
hardware card that plugs into the computer.
– Each frame is converted into a bitmapped image.
– The digital video signal is compressed.
• Eliminates data that our eye doesn’t see or that is
hardly noticed.
• Codec: A scheme for coding & decoding large
amounts of data. (The data is economical and
uncomplicated to store.)
The Computer Continuum 9-393
Visual Media:
Animation and Video
Common codecs:
• Motion Picture Experts Group (MPEG)
– MPEG-1
• Developed to handle slower media such as videoCDs.
• Deteriorates when high-speed action occurs.
• Roughly the quality of VHS.
• 70 minutes with sound fits on a CD-ROM disc.
– MPEG-2
• Full-screen codec standard that brings twice the resolution
of VHS.
• Four times the resolution of MPEG-1.
• Optimized for higher demands of broadcast, satellite, and
DVD.
The Computer Continuum 9-394
Visual Media:
Animation and Video
Common codecs: (continued)
• Motion Picture Experts Group (MPEG)
– M-JPEG
• Requires more memory space than MPEG-2
• Each frame is digitized separately using JPEG
compression.
. Makes it easier to edit.
• As we move from analog to digital broadcast, coding and decoding
will become unnecessary. (Everything will already be digital!)
The Computer Continuum 9-395
Visual Media:
Animation and Video
DVD: The Digital Versatile Disc
• DVD: An optical disk storage technology that looks like the
standard CD, but is faster and has a much larger storage
capacity.
– Two forms:
• DVD-Video Discs: Intended as a replacement of
VHS.
• DVD-ROM: Intended as a computer storage medium.
– Digital Video Players:
• Software products are available that will play back
video coded with one of these codec systems.
. QuickTime, ActiveMovie
The Computer Continuum 9-396
Visual Media:
Animation and Video
Streaming media: Information in one of many different visual or
audio forms that is sent from a server in packets to the requesting
computer.
• Contains parts of the medium that may be a recording or an
actual live event.
• The information is played back in the order sent, starting soon
after a few packets arrive, but before all of them have been
sent.
The Computer Continuum 9-397
Audio Media:
Human Speech
The importance of vocal communication:
• It is the fastest method of communication.
• Most communication is vocal.
• Researchers believe that human intelligence is closely linked
to the development of vocal communication and language.
The Computer Continuum 9-398
Audio Media:
Human Speech
Creating Speech: Recorded Speech
• Recording and digitizing individual words and phrases.
– Common uses:
• Talking cash registers.
• Automated national telephone information service.
– Problems with recorded speech:
• Creating whole sentences of human speech would
take a huge amount of computer memory.
• Several versions of each word would need to be
digitized to account for pitch and volume levels (for
punctuation and variations of the same word).
The Computer Continuum 9-399
Audio Media:
Human Speech
Creating Speech: Speech Synthesis
• Speech synthesis: The electronic production of sounds and
sound patterns that closely resemble human speech.
– Uses phonemes: The fundamental sounds of any given
human language.
– Three additional factors that have an affect on how a word
or phrase sounds:
• Inflection - The rising and falling pattern of pitch.
• Duration - The time spent on or the time between
individual phonemes.
• Elision - Splicing phonemes together so that when
one ends, the other begins. The connection will sound
natural.
The Computer Continuum 9-400
Audio Media:
Human Speech
Creating Speech: Speech Synthesis
• The sounds produced are electronically generated.
– The sounds simulate those produced by the human vocal
tract.
• Can produce both major types of human sounds:
. Voiced sounds: Sounds produced by the
vibration of vocal cords in conjunction with
specific positioning of teeth, tongue, and lips.
Include all vowels and some consonants.(d, g, b)
. Voiceless sounds: Characterized by the lack of
vibration of the vocal cords. (s, k, t)
The Computer Continuum 9-401
Audio Media:
Human Speech
Recognizing Spoken Words
• More difficult for the computer than speech synthesis.
• Voiceprint: A visual plot of frequency versus time of sound
produced by a human speaker.
– No two voiceprints are completely identical.
• Human voice is determined at least by:
. Pitch: The number of cycles per second of a particular
sound’s vibration.
. Resonance: The reverberation or amplification of the
voice in the cavities of the vocal tract.
• Problem: Because each individual has uniquely shaped vocal
cords and resonating chambers, each has a uniquely
individual voice.
The Computer Continuum 9-402
Audio Media:
Human Speech
Recognizing Speech
• Disjointed speech: Words spoken one at a time with silence
between words.
– Software programs are available for home use.
– Each person goes through a recording session to train it.
– Total vocabulary to fewer than 1000 words spoken by an
individual.
• Problems:
– Speaking in a disjointed manner is unnatural.
– Any changes in the person’s voice (head cold, sinus
infection) may make the speech unrecognizable.
The Computer Continuum 9-403
Audio Media:
Human Speech
Recognizing Speech
• Continuous speech: Words spoken in a continuous stream of
sounds, usually with no pauses between words.
– More difficult for the computer to understand. Computer
has difficulty when one word ends and next begins.
The Computer Continuum 9-404
Audio Media:
Music
The Computer and Recorded
Music
• Compact Disc Technology
– CDs don’t wear out like
records and magnetic tape.
• After numbers are
recorded, they don’t
change.
• Scratching the surface
can affect quality of
sound.
– Compact discs can be
produced from a master
disc very inexpensively.
The Computer Continuum 9-405
Audio Media:
Music
The Computer and Recorded Music
• DAT (Digital Audio Tape) technology
– Advantages of DAT:
• Binary information is recorded onto magnetic tape.
• DAT can easily record sound information.
• Perfect duplication of CDs can be made onto tape.
The Computer Continuum 9-406
Audio Media:
Music
Recorded Audio Files and Formats
• Individual standards have been developed for special
purposes or for specific computers.
– Sound files can be huge. Sound quality affects size.
– The four most common sound file formats:
WAV: Originally developed with Windows 3.1
AU: Developed by SunAudio for UNIX systems but
now supported by Windows and Macintosh.
AIFF: Originated on the Macintosh computer.
MP3: (MPEG - level 3) Can be played on Windows,
Macintosh, and UNIX systems.
The Computer Continuum 9-407
Audio Media:
Music
Hardware and Software Needs
• Playing back Web sound
– Need a sound card.
• Newer “multimedia” computers have sound cards
included.
– Need external speakers.
• Receiving sound files from the Web.
– Must be a type of file your browser recognizes.
• Most new browsers handle Web sound.
The Computer Continuum 9-408
Audio Media:
Music
MIDI: A Revolution in Music
• MIDI (Musical Instrument Digital Interface): Musical
standard created in 1982 that makes possible communication
of audio information
– Between keyboards, drum pads, etc.
– To a computer-controlled mixer.
– Each instrument connected to a MIDI bus usually has a
small special-purpose computer with some memory.
• MIDI bus: The main communications channel for
MIDI information that can consist of signals sent to
as many as 16 different instruments or groups of
instruments.
The Computer Continuum 9-409
Audio Media:
Music
All MIDI instruments have three-pronged connectors
that are used to connect other MIDI instruments or
computers.
• Thru port: Sends MIDI signals obtained from the IN port on to other
MIDI instruments.
• OUT port: Sends out MIDI signals.
• IN port: Receives MIDI signals.
• The three connectors necessary for a MIDI interface:
The Computer Continuum 9-410
Audio Media:
Music
Several ways to use a MIDI instrument:
• By itself.
– A MIDI synthesizer can connect to an amplifier with
speakers.
• Using one MIDI instrument as a master to a second, acting as
a slave.
– Can not only play its own notes, but can also control the
slave’s notes.
• In conjunction with a MIDI sequencer.
– MIDI sequencer: A device, usually a computer, that
records and plays back MIDI signals.
– Can be either a computer with sequencing software or a
dedicated sequencer.
The Computer Continuum 9-411
Internet Music and Audio Net
Three techniques for both downloading sound to your
computer and listening to live audio over the WWW.
1. Streaming audio: A request to hear music is made by clicking
on a button. The Website sends back the sound which you
hear immediately. You don’t receive a copy of the sound.
(You may need to add a plug-in to hear the sound.)
– Plug-in: A piece of software that is added to your browser
to give it desired capability.
2. Sound file is sent over the WWW. It allows you to store the
sound file on your computer.
3. MIDI files: Created by a performer on a MIDI instrument.
Needs a MIDI player (available on the Internet.)
The Computer Continuum 10-412
Chapter 10:
Databases: Controlling
the Information
Every week, we have the capacity to double
our current store of information.
The Computer Continuum 10-413
Databases:
Controlling the Information
In this chapter:
• Why has the last third of the 20th century been dubbed “The
Information Age”?
• What computer readable media are used to collect data?
• How are statistical methods used to transform data into
information?
• What are the elements of a database?
• How are Database Management Systems used to organize
data?
• What are some advantages and disadvantages of databases?
• What are some advantages of Web-based databases?
The Computer Continuum 10-414
Introduction:
Information Overload
The last third of the 20th century was dubbed “The
Information Age”.
• We are inundated with information: facts, figures, opinions,
stories, pictures, records, predictions, etc.
• Internet users generate a terabyte of information daily = 70
million 300 page books per month.
• No longer store the bulk on paper:
– Computer technology provides many types of storage
medial that are economical, longer-lasting, and easier to
access.
The Computer Continuum 10-415
Introduction:
Information Overload
We will examine the role computers play performing:
• Collecting and manipulating large amounts of data.
• Accessing that data in a timely fashion.
• Analyzing and formatting it for easy understanding.
Data and information are generally used
interchangeably. However, here they have a specific
use:
• Data: A given thing or fact. (Computers process data.)
• Information: Data repackaged into a meaningful form that
we can understand and use.
The Computer Continuum 10-416
Introduction:
Information Overload
In order to include whatever data might be needed, a
database must be carefully designed.
• Database programmers and the users of the databases must
answer the following questions:
– How can we efficiently collect large amounts of relevant
data?
– How can we reliably store that data for later use?
– Who will use the data?
– How often will they need to access the data?
– What format will they need the data in (text, numerical,
visual)?
– How will they use the data?
The Computer Continuum 10-417
The Technology of
Data Collection
Early computers provided no means to collect data or
to store it from one program execution to the next.
• Each piece of data needed for a calculation had to be input
during the actual execution of the program.
• Earliest form of computer data was collected and stored on
paper.
– Hollerith card: Used for external storage of data.
• Each card consisted of 80 columns of digits from 0-9
(each column represented one character.)
• Data was entered using a keypunch machine, and
read with a card reader.
The Computer Continuum 10-418
The Technology of
Data Collection
Paper collected in a form that the
computer could read directly:
• Mark-Sensor Data Collection
Sheets: A sheet of paper used to
collect responses to multiple
choice questions.
– Using a graphite pencil, the
responder fills in small
spaces indicating answers.
– A computer scans forms to
read marks.
The Computer Continuum 10-419
The Technology of
Data Collection
Remote electronic data sensing:
• Uses a remote sensing device
such as a satellite to collect
information.
• Satellites collect millions of times
more data in one day than an
entire 10 year census.
• Hubble Space Telescope collects
85 million bytes per second.
• Right: Satellite image of
Washington D.C.
The Computer Continuum 10-420
The Technology of
Data Collection
Bar codes:
• Used for data collection.
• Uses a combination of thick and
thin lines to identify a specific
item in an inventory.
The Computer Continuum 10-421
The Technology of
Data Collection
Data probe tools:
• A key-like instrument which, when inserted into a meter, will
electronically read and record the meter location and usage
numbers into a computer.
Voice recognition data entry:
• The collector of information speaks into a microphone of a
portable terminal. The receiving computer accepts the voice
transmission, and transcribes it into a form the computer can
store.
– A laptop can be used as a remote terminal.
The Computer Continuum 10-422
The Technology of
Data Collection
Online Interactive Data Entry:
• New data can be entered into a database from a Web browser
screen.
• A company provides a user with an on-screen form in a
secure environment.
– Secure environment: A Web site that protects the
security of the data being entered or displayed, and the
privacy of the user to whom the data belongs.
– Most common use is in electronic commerce.
• Order taken, payment made, shipment made,
confirmation sent.
The Computer Continuum 10-423
Retrieving Data
Effective data retrieval is affected by how well the
files were organized.
• FBI Fingerprint Processing - A Study in Data Collection,
Storage, and Retrieval.
– FBI maintains a database of over 270 million sets of
fingerprints.
– The FBI fingerprint collection process:
• Fingertips are inked then are collected onto a card.
• Completed cards, including personal information, are
sent to the FBI.
• 800+ technicians determine each print’s Henry
classification. (classifies according to ridge patterns)
The Computer Continuum 10-424
Retrieving Data
• The FBI fingerprint storage process:
– The information and images on the cards are scanned into
the computer’s memory.
• The computer operator:
. Adjusts for location and orientation.
. Computes the center points.
. The computer scans and determines
classification.
– Until the mid-1970’s, all fingerprint data was stored in
file cabinets on cards.
The Computer Continuum 10-425
Retrieving Data
• The FBI fingerprint retrieval process:
– After the information and images on the cards are scanned
into the computer’s memory and has been classified:
• The set is compared to others of the same classification.
• If sufficient points of identification are found, a match is
declared.
• A final check is performed by a human technician to verify
the match.
• Before computers: 1400 fingerprint technicians processed
24,000 requests per day.
• After computers: Over 30,000 sets are processed with less
than half the technicians.
The Computer Continuum 10-426
Retrieving Data
Visualization of Information
• Uses many different
techniques to transform any
form of data into a visual
image.
Population densities in 1979.
The Computer Continuum 10-427
Retrieving Data
Ultrasound Imaging: A medical diagnostic technique that
provides visual images constructed from the sounds that
reflect off various organs of the body.
The Computer Continuum 10-428
The Role of Statistics:
Transforming Data/Information
The retrieval process involves the examination,
summarization, and manipulation of data into
information.
• Most commonly used method of transforming data is
statistical analysis.
– Some important statistical concepts include:
• Percents
• Probability
• Selecting data for statistical analysis (Sampling)
• Normal distribution
• Correlation
The Computer Continuum 10-429
The Role of Statistics:
Transforming Data/Information
Percents: A special type of fraction. It is the number
of parts out of the total of 100 parts that are in
question.
• 25% of 100 people would be 25 people.
• 20% of 10 dogs would be 2 dogs (20/100 of 10).
Probability: Deals with our ability to predict whether
certain events will occur or not.
• “50% chance of showers this evening”: This prediction is
based on the probability that certain patterns of observed
weather will continue.
The Computer Continuum 10-430
The Role of Statistics:
Transforming Data/Information
Gathering data on a particular topic:
• Sample: A small group used to represent the much larger
group.
• Sampling: The technique of predicting a total situation using
a comparative few isolated representatives.
** A sample must be carefully selected to avoid
predetermined statistical results. **
• Skewed sample: Selection of the group participating in a
survey supports some predetermined outcome.
– If a sample is randomly chosen, we can expect some
semblance of a normal distribution.
• Normal distribution: 68% of all data values fall within a
limited range near the center of the distribution.
The Computer Continuum 10-431
The Role of Statistics:
Transforming Data/Information
Performing Statistical Analyses on data:
• Correlation: A connection or relation linking two or more
pieces of information.
• Example: There is a correlation between index finger length
and whether a person is male or female.
– Measurements of 100 male and 100 female index finger
measurements:
Gender Mean Index Finger Length
Male 72 Centimeters
Female 68 Centimeters
The Computer Continuum 10-432
The Role of Statistics:
Transforming Data/Information
Performing Statistical Analyses on data:
• False Correlation or False Relevance: Involves the creation
of a cause and effect relationship between two facts that seem
to be related but are not. (The facts might be true, but the
relationship is not!)
– Fact 1: All human beings breath oxygen.
– Fact 2: All human beings must die sometime.
– False relevance: Oxygen must be toxic, because 100% of
those breathing oxygen today will die in the future.
The Computer Continuum 10-433
Creating a Custom Database
Database: An organized collection of information.
• The arrangement of a typical database:
– Field: A location which contains one specific piece of
information.
– Record: A collection of related data items.
– File: A group of records, all of the same type.
Last:
First:
ID:
Phone#:
DOB:
The Computer Continuum 10-434
Creating a Custom Database
DBMS (Database Management System): A software
application that allows you to store, organize and
retrieve data from one or more databases.
• Combines (into a complete package):
– Structural elements of a database (fields, records, files).
– A query language.
– Programs for data modification.
– Programs for statistical analysis.
– Report writing.
The Computer Continuum 10-435
Creating a Custom Database
Using a Relational Database System
• Relational Database: A commonly used DBMS based on the
relational model.
– Uses two-dimensional tables, called relations, to store
data.
• Relations are linked to each other by common fields.
– The relational model has two important features:
• Its structure is simple and direct. (data is stored in tables)
• Its structure is well suited to the client/server environment.
. Involves two computers connected by a network.
Database resides on one (server), and the software
needed to access the data resides on the other (client).
The Computer Continuum 10-436
Creating a Custom Database
Steps to create a new database using a DBMS:
1. Decide what information you might need about the subject.
2. Define the structure of your database. (Setting up the fields)
3. Enter the information about each item.
4. Select exactly the information you wish to extract.
5. Update the database.
6. Print out all or any part of the database in a format of your
choice.
The Computer Continuum 10-437
Creating a Custom Database
Using information to enhance targeted marketing in
the business world.
• Data warehouses or data marts: The collection and
consolidation of data from many individual sources into
centralized “warehouses”.
– Can apply the data to:
• Provide better customer service.
• Do better marketing analysis.
• Spot problems or opportunities.
• Data mining: Searching collections of databases to discover
relationships and global patterns that exist among them, and
applying these patterns to assist in management decisions.
The Computer Continuum 10-438
Creating a Custom Database
Database Advantages
• Space saver. - Only need one copy.
• Increase accuracy. - Less chance of human error.
• Multiple use of data.
• Data integrity. - Securing data is easier.
• Time saver due to search abilities.
• Easier to use the data. - Different questions can be asked of
the data.
The Computer Continuum 10-439
Creating a Custom Database
Ethical Hazards of Database Systems:
• Misrepresentation of data. - Can you “trust” the source of the
statistical analyses?
• Invasion of privacy
– Large databases hold personal information about each of
us.
– UID (Universal Identifier) The collection of all citizens’
data obtained from a single source.
The Computer Continuum 10-440
Web-Database Connectivity
Dynamically generated Web sites
• Web-database connectivity: The interaction between one or
more web pages and the contents of a specific database.
– The Web pages are designed as templates.
• Image areas and text boxes to be filled in with data
from the database.
• Separates the design and layout from of the Web page
from the content to be displayed on the screen.
• Query-based programming: Uses 4th generation
query language to select Web content from a database
and display it on a dynamically generated Web page.
The Computer Continuum 10-441
Web-Database Connectivity
Key Advantages of Web-Database Connectivity
• Database information is universally available. - Access
requires a Web browser and Internet connection.
• Web site design and development are easier and faster.
• Web site maintenance is easier and more efficient. - Changes
on the template updates all pages.
• Adjustments can be made by any authorized person rather
than a Web developer.
• Web site can display updated calculations and multimedia
information.
The Computer Continuum 10-442
Web-Database Connectivity
Getting Started: Connecting a database to the Web
• You need Middleware: Software that acts as an intermediary
between a Web server and a database. (i.e. ColdFusion, Java)
– Middleware accesses most databases by using ODBC
• ODBC (Open Database Connectivity): A set of standards
allowing information to be passed from a database to a
dynamic Web page.
• The use of a query language: The language that the database
can understand.
– Example: SQL (Structured Query Language) supported by most
database software.
– Query Wizard: Like other wizards, this tool helps frame
requests for retrieving specific data from a database.
• And, an appropriate database program.
The Computer Continuum 10-443
Web-Database Connectivity
Oracle WebDB: An integrated Solution
• A complete, integrated software solution (high-end database
program) for building, loading and monitoring Web database
applications and content-driven Web sites.
– Can help:
• Create and manage database objects.
• Develop HTML components.
• Build and maintain content-driven Web sites.
• Track Web site and database connectivity
performance.
• Manage database security.
The Computer Continuum 12-444
Chapter 11:
Artificial Intelligence and
Modeling the Human State
Are computers smart enough to replace people?
The Computer Continuum 12-445
Artificial Intelligence and
Modeling the Human State
In this chapter:
• Does “looking intelligent” mean that intelligence is present?
• How does the human brain differ from a computer?
• How does a computer gain and retrieve knowledge as
compared to how a human gains and retrieves knowledge?
• How is it that a computer can recognize text, speech, or a
human face?
• How are computer scientists making computers “smarter?”
The Computer Continuum 14-446
Chapter 12:
Ethics, Spies and Privacy
At what point does storage of personal data
become an invasion of privacy?
The Computer Continuum 14-447
Ethics, Spies and Privacy
In this chapter:
• In what ways is the computer used as a criminal tool?
• What are the affects of software piracy?
• To what lengths do people go in order to break into computer
systems?
• How do computer viruses spread?
• How can you prevent viruses from spreading?
• Does invasion of privacy need to be a deliberate act?
• Does filtering infringe on our freedom of speech or just an act
of protection against sensitive material?
The Computer Continuum 14-448
Vulnerability and
Technological Abuse
Technology has permeated our society. Without
technology, our society would grind to a halt.
• Jan. 15, 1990: AT&T’s long distance network went dead for
almost 9 hours.
– Due to a single line of code that had never executed
before, therefore it was never tested.
• 1985-1986: Therac-25 radiation machine gave overdoses of
radiation injuring many and killing one due to a software
error.
The Computer Continuum 14-449
High Tech Crime: The
Computer as a Criminal Tool
Computers and networks have provided both law
enforcement professionals and criminals with
opportunities:
• FBI: Uses its homepage on the WWW as a weapon against
crime and criminals.
– Web pages contain:
• Information about the bureau.
• List of persons wanted for suspected criminal
activities.
• Information telling readers how to protect themselves
from some types of computer crimes.
The Computer Continuum 14-450
High Tech Crime: The
Computer as a Criminal Tool
Every new technological
advancement leads to criminals
developing a new type of crime.
• New platforms for theft and fraud:
– ATM (Automated Teller
Machine)
– EFT (Electronic Fund
Transfers)
– Cellular phones
The Computer Continuum 14-451
High Tech Crime: The
Computer as a Criminal Tool
What is a Computer Crime?
• Any criminal act that has been committed using a computer as
the principal tool.
• An illegal activity that could not take place without a
computer
• Any illegal activity using computer software, data, or access
as the object, subject, or instrument of the crime.
The Computer Continuum 14-452
High Tech Crime: The
Computer as a Criminal Tool
High-tech heists:
• Theft of money: EFT (Electronic Funds-transfer system)
– Example: SWIFT, an international EFT system was
used to divert two large corporate bank deposits to
Switzerland one Christmas Eve. A malfunction in the
system during transfer alerted security. The thief was
arrested and sent to a federal prison.
• Theft of goods: Tracking and altering inventories or
redirecting goods to a safe location.
The Computer Continuum 14-453
High Tech Crime: The
Computer as a Criminal Tool
Two techniques used to for thefts of goods and money:
Trojan horse and the Salami.
• Trojan horse - The insertion of false information into a
program to profit from the outcome.
– Example: The previous EFT scenario used a Trojan horse.
• Salami - Spreading the haul over large number of trivial
transactions.
– Example: A bank clerk had a job of updating customer accounts
by running a program that adds daily interest to all savings.
Each amount was rounded to the nearest decimal point. The
clerk inserted a line that would divert the round-off amount to an
account of his own resulting in the attempted theft of several
millions of dollars.
The Computer Continuum 14-454
High Tech Crime: The
Computer as a Criminal Tool
High-tech heists:
• Theft of Information or Services: Piggybacking and Data
diddling.
– Piggybacking: Involves invading a communication
system by riding in behind a legitimate user with a
password.
– Data diddling: Involves swapping one piece of
information for another of the same type.
• Example: In 1997, 18 people were arrested for
stealing mobile communication services. They had
reprogrammed the microchips in their cell-phones so
that calls could be made at no charge.
The Computer Continuum 14-455
High Tech Crime: The
Computer as a Criminal Tool
Protect Yourself from High-tech Theft
• Protect all data and programs, and all system access, by
password.
• Issue passwords to as few people as possible, and no
outsiders.
• Make passwords less obvious and less memorable.
• Change passwords frequently.
The Computer Continuum 14-456
Electronic Piracy
Computers have become prevalent in our society.
• Prices have spiraled downward.
• Total world market for software is around $500 billion.
• Software piracy has become a major growth industry.
– Software piracy: The unauthorized copying or use of
software for which you have not paid the appropriate
licensing fee.
The Computer Continuum 14-457
Electronic Piracy
Software License
• Ownership of the software is retained by the company that
wrote it.
• A license allows you to copy the software from the storage
media to your hard disk and to use it.
• U.S. Computer Software Copyright Act of 1980
acknowledged software as “intellectual works.”
– Same class as books and magazines.
– It is illegal to use or copy software without the copyright
holder’s written permission.
• Unsure of your rights? Read the copyright information!
The Computer Continuum 14-458
Electronic Piracy
How Big is the Piracy Problem?
• ENORMOUS.
• The US Software Publishing Association (SPA) estimated that
in 1990 its members lose $4 - $6 billion a year due to
software theft.
• Lotus, Inc., claims that over half of its potential sales in the
early 90s were lost to pirates. (over $160 million a year)
• There is now a nationwide trend toward being “legal” with
software.
– Schools, computer clubs, have a more serious approach to
software copyright.
The Computer Continuum 14-459
Hacking and Cracking
Hacking (just a few definitions)
• A software troubleshooter; making a program work despite
the frustrations of others.
• Attempts to see whether some task is possible.
• Wants to learn more about the software and its limitations.
• Maliciously pokes around existing data sources.
• Finds and uses other people’s passwords, often without
permission.
• For this discussion, hackers love to delve into the mysteries of
computing systems. Hackers are problem solvers that have
infinite patience for experimenting with computers and
fiddling with software.
The Computer Continuum 14-460
Hacking and Cracking
Cracker: Person who breaks into other peoples’ systems for
either fun or profit, or with the intent to commit blackmail or
sabotage. (Described as “illegal hacking”.)
• Engage in malicious acts that
– Damage systems or files.
– Disrupt networking services.
– Profit from illegally acquired goods or data.
– Thwart rightful authority just because it is there.
The Computer Continuum 14-461
Hacking and Cracking
Why do Hackers and Crackers hack?
• Hackers: See themselves as ‘adventurists’.
– Approach computers as new adventures full of fun and
excitement.
• Crackers: Those who hack maliciously.
– Have personal motives. Some are disgruntled exemployees.
– Logic bomb: A software routine that can be embedded
and triggered at some later time by a predetermined
sequence of events.
– Time bomb: Similar to the logic bomb but is triggered by
the computer’s clock (not sequence of events).
The Computer Continuum 14-462
Hacking and Cracking
Hacker (and Cracker) techniques:
• Scavenging - Searching through stray data and electronic
garbage for clues that might unlock the secrets of a targeted
computer system.
• Password guessing -
– Personal information about account holder: names, dates
– Common & popular: qwerty, abcde, 12345, sex, love, god
• Autodialer - Systematically dials until answered by a
computer.
The Computer Continuum 14-463
Hacking and Cracking
Hacker (and Cracker) techniques: (continued)
• Distributed denial of service (DDoS): Utilizes time bomb
cracker technology to embed a software routine into many
computers.
– At a predetermined time, infected computers all send
messages to one targeted system.
• The overload forces the target system to close down.
– February 2000: Yahoo, eBay and other major Web sites.
• Piggybacking: Most system penetrations are assisted by some
form of inside aid.
– Universities: Unsuspecting students leave terminal without
logging off first. (Ride in on someone else with password.)
The Computer Continuum 14-464
Viruses, Worms,
and Other Intruders
What are Computer Worms and Viruses?
• Virus: A self-replicating program that may cause damage,
generally hard disk erasure or data file corruption, and infects
other programs, floppy disks, and hard disks by copying itself
onto them.
• Worm: A piece of programming code that can infiltrate a
legitimate file and alter or destroy data. It cannot replicate
itself.
The Computer Continuum 14-465
Viruses, Worms,
and Other Intruders
Viral Infections Spread over the Internet
• Threats are now of global proportions.
Melissa virus: Appeared in 1999.
• This “macro” virus spread through e-mail attachments.
– If opened, the virus printed out a list of pornographic sites
and sent the list, in your name, to the first 50 people in
your address book.
– The volume of messages inundated file servers.
The Computer Continuum 14-466
Viruses, Worms,
and Other Intruders
Love Bug virus: Appeared on May 4, 2000.
• Spread via an “ILoveYou” email attachment (love letter)
– If opened, it printed I Love You and “joke” in big letters
on the screen and forwarded itself using personal and
business address books.
– According to the BBC, it had been developed by a
Filipino computer student who may have spread the virus
worldwide by accident.
• It infected at least 45 million computer users and caused
billions of dollars of damage.
– Only affected systems running the Microsoft Windows
operating system.
– Immobilized the House of Commons (UK) e-mail system.
The Computer Continuum 14-467
Viruses, Worms,
and Other Intruders
Vaccines and Disinfectants
• Vaccine or disinfectant: A program that searches your disk
for viruses, and notifies you of any that were found. Some
virus checkers can also remove viruses from the program they
have infected.
The Computer Continuum 14-468
Viruses, Worms,
and Other Intruders
Ways to protect disks and system:
• Install current, updated virus checkers and use them regularly.
– Check for free online virus protection programs.
• Run your virus checker before closing down every time you
access the Internet or WWW.
• Check every previously used disk, every time, before placing
it into your machine.
• Don’t copy lab or public-use computer program files before
checking them first.
– Beware of downloaded files onto public-use computers.
– Download only from known, reliable sources.
• Do not open attachments from unknown senders.
The Computer Continuum 14-469
Viruses, Worms,
and Other Intruders
Ways to protect disks and system:
• If you are extremely vulnerable to virus invasion, you might
wish to install a firewall on your system.
– Firewall: A filtering software program that scans all
incoming documents and files and refuses to accept any
found to be virus-infected.
The Computer Continuum 14-470
Invasion of Privacy
As various computer data banks are being integrated and easy
access is available by more and more agencies, abuses and
mistakes involving privacy are inevitable.
• Examples of large databases that have resulted in problems:
– By police organizations (NCIC - National Crime Information
Center)
• Mistaken Identity: Arrested businessman in Tempe Arizona
on a warrant for grand theft. After spending the night in
jail, it was learned that he had repossessed a trailer that he
had sold.
– By credit bureaus and those who access that data.
• Errors in credit reports: A woman in Illinois applied for a
mortgage. Credit bureau records showed she owed money
on several credit cards and had a delinquent loan for a
$34,000 sports car. The bad credit belonged to another.
The Computer Continuum 14-471
Invasion of Privacy
Deliberate acts of intrusion:
• High-tech surveillance in the workplace:
– Used for “Increased productivity, quality control, and
good management practices.”
The Computer Continuum 14-472
Invasion of Privacy
High-tech surveillance in the workplace:
In Nursing:
• Hospital care is no longer measured in terms of patient benefits, but
in units of time. Many nurses are monitored. They carry boxes on
their belts that track the amount of time used for each procedure with
a patient. Don’t be surprised if nurses seem to lack bedside manner;
they can’t overstay their time limit.
The Computer Continuum 14-473
Invasion of Privacy
High-tech surveillance in the workplace:
In Trucking:
• Where can a person get a better sense of independence and freedom
from supervision than barreling across the great plains, completely
on your own? Think again! At the end of a long run, the trucker pulls
into the company terminal. While the rig is being serviced, a little
computer tape is removed from the engine. The tape tells the
supervisor what the average speed and gas mileage were, how many
stops the truck made, where his stops were, and a lot more. In
addition, some trucks are now monitored by satellites. If the trucker
is speeding, he gets a phone call in the truck (and often a fine).
The Computer Continuum 14-474
Invasion of Privacy
High-tech surveillance in the workplace:
In Hotel Housekeeping:
• The maids at the hotel you stay at are probably monitored. Your
maid punches her employee code into the phone when she enters
your room, and again when she leaves it. This provides her
supervisor with a detailed log of her speed of performance, as well
as a detailed log of her movements throughout the day.
The Computer Continuum 14-475
Invasion of Privacy
Stolen Identity
• Some computer criminals make their fortunes by stealing the
private information of one group of people for financial
benefit of another.
• Credit doctor: A person who can cure your low credit rating
by stealing a good credit history and selling it to you to
replace your bad one.
– Often get the information by bribing some employee of a
credit bureau to gain a password into their computer
system.
– The “client” (having the same name as the stolen identity)
is supplied with a social security number and a new A-1
credit rating.
The Computer Continuum 14-476
Invasion of Privacy
Eavesdropping, Blackmail and Illegal Personal Gain
• Eavesdropping: May be boss, neighbor, merchant, or stranger.
– Eavesdroppers can tap into radio scanners, baby monitors,
cellular phones, financial transactions made by computer,
e-mail, or voice mail.
• May do nothing with the information.
• May use it to their advantage: Blackmail.
• Electronic Communications Privacy Act (ECPA) of 1986.
– Designed to protect one’s privacy when using electronic
forms of communications. (Company policies overrule
the protections of the EPCA.)
• The woman who listened in on a murder conspiracy
conversation on her cellular phone and turned in the
suspects was actually in violation of this act.
The Computer Continuum 14-477
Invasion of Privacy
How Can We Develop Electronic Privacy?
1. Do not give out personal information freely.
2. Do electronic business with reputable companies who
provide secure Web sites, and who have strong policies
protecting customer privacy.
3. If you are concerned about electronic eavesdropping on your
e-mail, install a software encryption system, and provide
decryption codes to as few people as possible.
– Encryption: Software translates the text of your message
or other document into unreadable code. The transmission
must be decoded into plainly readable text when received.
The Computer Continuum 14-478
Protective Censorship Vs.
Freedom of Speech
The United States’ Bill of Rights guarantees its
citizens freedom of speech.
• In its current unregulated state, the Web also enjoys this same
freedom.
• As a result of “indecent” or “undesirable” information
attainable on the Web, efforts have been made to censor
certain materials.
– One method of censoring access to Web materials is
called screening, or content filtering.
• Content filtering: One or more pieces of software
that work together to prevent users from viewing
selected material found on the Internet.
The Computer Continuum 14-479
Protective Censorship Vs.
Freedom of Speech
The content filtering process can be accomplished in
two steps:
• Establishing ratings: To determine what sites and materials
are undesirable, someone must apply value judgements to
categorize Web sites based on content.
– Take the form of ‘allowed’ or ‘disallowed’ indicators placed on
lists of subject areas and key words.
• Filtering: Filtering software examines resources that the user
has requested.
– Determines ‘allowed’ or ‘disallowed’ based on PICS ratings.
• PICS (Platform for Internet Content Selection): A set of
technical rating standards for evaluating content of digital
materials.
The Computer Continuum 14-480
Protective Censorship Vs.
Freedom of Speech
Stand-Alone Filtering Systems
• Stand-alone filtering systems limit users to decisions made by
the vendor. (Some let parents or installers add or remove
sites)
– Filtering tools use some combination of two approaches
to evaluate software: List-based blocking and Keyword
searches.
• List-based Blocking: To be added to a list of
acceptable sites, the site must meet the vendors
criteria for being ‘objectionable’ or ‘family-friendly’.
The Computer Continuum 14-481
Protective Censorship Vs.
Freedom of Speech
List-based filtering raises several issues involving the selection of
sites:
• It is impossible to search all Internet sites for ‘objectionable
material.
• Updated lists will become obsolete as soon as it is released.
– Objectionable material may be added to a site soon after
the site is added to (or removed from) a list of blocked
sites.
• Vendors have blocked beyond ‘objectionable’ materials.
– Blocked sites include those that criticize blocking and
some political sites.
• The definition of ‘objectionable’ is still controversial.
The Computer Continuum 14-482
Protective Censorship Vs.
Freedom of Speech
Keyword-based blocking
• Uses text searches to categorize sites where ‘objectionable’
words or phrases are blocked.
– Keyword searches match words, not meanings.
• Chicken breast and breast cancer would be blocked.
– Keyword searches cannot interpret graphics.
The Computer Continuum 14-483
Protective Censorship Vs.
Freedom of Speech
Protocol-Based Filtering Systems
• Protocol-based filtering systems use standardized rating
systems to determine which sites should be blocked.
– Rating: A description of some particular Internet content,
using the terms and vocabulary of some ratings systems.
– These ratings can be used to classify content.
• “Romance; no sex”
• “Explicit sexual activity”
– Users are usually given the ability to choose the rating
system they would like to use.
The Computer Continuum 14-484
Protective Censorship Vs.
Freedom of Speech
Measures parents can take to provide some protection
for their children:
• Consider the extent of the problem.
– Children seldom randomly stumble upon pornographic material.
– Many adult sites require registration or payment by credit card.
• Parents should play an active role and interest in their children’s use
of the Internet.
• Parents should work to educate children regarding proper use of the
Internet.
• Parents could consider purchasing filtering software.
• The Internet is a reflection of society in general (can be found on
cable TV, movies.)
The Computer Continuum 12-485
What is Intelligence:
Artificial or Not?
Attempts to understand intelligence:
• Plato (400 BC) - This Greek philosopher believed that
ethereal spirits were rained down from heaven and entered the
body.
• Aristotle (Plato’s student) - The heart must contain the soul
and the brain’s function was to cool the blood.
• Galen - Treated fallen gladiators with spinal cord injuries.
Noted that feeling lost in certain limbs sometimes came back.
• Galvani - Used Benjamin Franklin’s findings about static
electricity to show that static electricity stimulated the nerves
causing a frog to jump.
• Subsequently - Human nervous system found to be a complex
network of billions of neurons.
The Computer Continuum 12-486
What is Intelligence:
Artificial or Not?
Does “looking intelligent” mean that intelligence is present?
• Maillardet’s Automaton (Henri Malliardet, 1805):
– Object having human form seemed to mimic the intelligence of
the human.
– Drawing machine.
• Disguised as a young boy.
• Containing levers, ratchets, cams and other mechanical
devices.
• Could draw several complex images.
– Because it had human form and could draw complex images, a
certain feeling of intelligence was ascribed to the machine.
The Computer Continuum 12-487
What is Intelligence:
Artificial or Not?
Sailing vessel drawn by
Maillardet’s Automaton.
The Computer Continuum 12-488
What is Intelligence:
Artificial or Not?
Alan Turing (1912 - 1954)
• Proposed a test - Turing’s
Imitation Game
– Tests the intelligence of the
computer.
• Phase 1:
– Man and woman separated
from an interrogator.
– The interrogator types in a
question to either party.
– By observing responses, the
interrogator’s goal was to
identify which was the man
and which was the woman.
Interrogator
Honest Woman Lying Man
The Computer Continuum 12-489
What is Intelligence:
Artificial or Not?
Phase 2 of the Turing’s test:
• The man was replaced by the
computer.
• If the computer could fool the
interrogator as often as the
person did, it could be said
that the computer had
displayed intelligence.
Interrogator
Honest Woman Computer
The Computer Continuum 12-490
Modeling Human Intelligence
Modeling human intelligence systems:
• One way to study complex systems is to build a working
model of the system, and observe it in action.
• Two (of several) approaches to model some of the thinking
patterns of the human brain:
– Semantic networks
– Rule-based systems or Expert systems
The Computer Continuum 12-491
Modeling Human Intelligence
Semantic networks are designed after the psychological model
of the human associative memory.
John Plumber Worker
Owner Ford Car
May 97 Time
Oct 00
Ownership Situation
Is a Is a
Is a
Is a
Is a
Is a
Owner
Ownee
Start-time
End-time
The Computer Continuum 12-492
Modeling Human Intelligence
Rule-based or Expert systems - Knowledge bases consisting of
hundreds or thousands of rules of the form:
IF (condition) THEN (action).
• Use rules to store knowledge (“rule-based”).
• The rules are usually gathered from experts in the field being
represented (“expert system”).
– Most widely used knowledge model in the commercial
world.
– IF (it is raining AND you must go outside)
– THEN (put on your raincoat)
The Computer Continuum 12-493
Modeling Human Intelligence
For any of these models of the human knowledge system to work,
it must be able to make use of this human knowledge in three
different ways:
• Acquisition - Must be some way of putting information or
knowledge into the system.
• Retrieval - Must be able to find knowledge when it is wanted
or needed.
• Reasoning - Must be able to use that knowledge through
“thinking” or reasoning.
The Computer Continuum 12-494
Modeling Human Intelligence
Knowledge Acquisition:
• A fact is the simplest type of knowledge that can be acquired.
– Bees sting.
• Ideas, concepts, and relationships are more difficult for
humans and machines.
– Provoking bees causes them to sting.
– What is a chair?
The Computer Continuum 12-495
Modeling Human Intelligence
Knowledge Retrieval by Searching
• After knowledge has been acquired and stored in one’s
memory, it can be retrieved and used to solve problems.
• Brute-force search - Looks at every possible solution before
choosing among them.
– Hexapawn game example: The program searches through
all the possible moves and then selects the best.
The Computer Continuum 12-496
Modeling Human Intelligence
Hexapawn Game
Tree
Shows different
moves (“mirror
images” are not
shown.)
The Computer Continuum 12-497
Modeling Human Intelligence
Heuristic search - Rules of thumb, which are used to limit the
number of items that must be searched in solving a problem. (Not
guaranteed to lead to a solution.)
• Used by more complex systems such as those that diagnose
individuals that are prone to heart attacks.
• Chess game tree would have 10120 possible moves.
– Uses rules of thumb to reduce the number of possible plays.
• Example: Examine a few plays ahead instead of all the
ways to the end of the game.
– Deep Blue (1996) by IBM - Garry Kasparov, world-champion
chess player, won over Deep Blue 4 points to 2.
– Deep Blue (1997) by IBM - Garry Kasparov conceded victory to
Deep Blue, 3.5 points to 2.5.
The Computer Continuum 12-498
Modeling Human Intelligence
Reasoning with knowledge
• Humans: Reasoning is what we do when we solve problems.
• In Artificial Intelligence: Two types of reasoning are
commonly used.
– Shallow reasoning: Based on heuristics or rule-based
knowledge.
• Computers, for the most part, do shallow reasoning.
– Deep reasoning: Deals with models of the problem
obtained from analyzing the structure and function of
component parts of the problem.
• Humans commonly apply deep reasoning.
The Computer Continuum 12-499
Modeling Human Intelligence
How can the knowledge base be built up so that there is sufficient
knowledge to reason with?
• Learning systems: Intelligent computer programs that are
capable of learning.
• Types of learning that are used to write intelligent programs:
– Rote learning - Memorization of facts.
– Learning by instruction - Similar to student/teacher
relationship found in classrooms.
– Learning by deduction - Drawing conclusions from certain
premises (This is a cat. All cats are animals. Therefore, this is an
animal.)
– Learning by induction - Includes subcategories: learning by
example, experimentation, observation, and by discovery.
– Learning by analogy - Combines both deductive and inductive
learning. (Being bitten by a teased dog may make an individual
not tease bees.)
The Computer Continuum 12-500
Modeling Human Intelligence
Common Sense
• Problems that seemed to be most difficult, such as playing
chess, turned out to be relatively simple.
• The computer must be able to make inferences from the
knowledge base.
– Answers to problems might not be listed.
– The computer will need to come up with its own answers!
– This has been a very difficult area in Artificial
Intelligence.
• Cyc (enCYClopedia) Computer program that exhibits and can
apply common sense.
– e-Cyc: (Electronic commerce) Advanced search engine
narrows a search and gives list of meaningful subtopics.
The Computer Continuum 12-501
Natural Language
Communication
The semantics (meaning of the words) is the goal in
communication with the computer.
• ELIZA (1965) by Joseph Weizenbaum of MIT
– Simulation of a therapist mirroring a patient’s
conversation in a positive manner.
– The program fooled people into believing it was a
therapist.
– In response of ELIZA’s popularity, Weizenbaum wrote a
book in 1976: Computer Power and Human Potential.
• “Science promised man power. But, as so often happens
when people are seduced by promises of power… the price
actually paid is servitude and impotence.”
The Computer Continuum 12-502
Natural Language
Communication
Part of an ELIZA Conversation:
All men are alike.
IN WHAT WAY
They’re always bugging us about something or other.
CAN YOU THINK OF A SPECIFIC EXAMPLE
Well, my boyfriend made me come here.
YOUR BOYFRIEND MADE YOU COME HERE
He says I’m depressed much of the time.
I AM SORRY TO HEAR YOU ARE DEPRESSED
It’s true, I am unhappy.
DO YOU THINK COMING HERE WILL HELP YOU NOT TO BE UNHAPPY
I need some help, that much seems certain.
WHAT WOULD IT MEAN TO YOU IF YOU GOT SOME HELP
Perhaps I could learn to get along with my mother.
TELL ME MORE ABOUT YOUR FAMILY
The Computer Continuum 12-503
Natural Language
Communication
Semantic Translation Problems (Problems with
language translation).
• A classic example, called the Bar-Hillel paradox, illustrates a
difficult semantic problem:
The pen is in the box.
The box is in the pen.
– Both sentences have identical syntax structures.
– Interpretations:
• First statement: A writing instrument is in the box.
• Second statement: A box is in the playpen.
• Convinced Bar-Hillel that computer translation of languages
was impossible.
The Computer Continuum 12-504
Natural Language
Communication
Early attempts at language translation:
• An early attempt to translate an English expression to Russian
and back again to English:
– Typed in English (sentence to be translated...):
• The spirit is willing, but the flesh is weak.
– Translated by the program into Russian and back into
English:
• The vodka is strong, but the meat is rotten.
Translation programs have come a long way.
• WWW translation programs
– Accuracy and interpretation still very crude.
The Computer Continuum 12-505
Expert Systems
Expert systems are commercially the most successful domain in
Artificial Intelligence.
• These programs mimic the experts in whatever field.
Auto mechanic Telephone networking
Cardiologist Delivery routing
Organic compounds Professional auditor
Mineral prospecting Manufacturing
Infectious diseases Pulmonary function
Diagnostic internal medicine Weather forecasting
VAX computer configuration Battlefield tactician
Engineering structural analysis Space-station life support
Audiologist Civil law
The Computer Continuum 12-506
Expert Systems
Expert systems are also called Rule-based systems.
• Expert’s expertise is built into the program through a
collection of rules.
• The desired program functions at the same level as the human
expert.
• The rules are typically of the form:
– If (some condition) then (some action)
– Example: If (gas near empty AND going on long trip)
then (stop at gas station AND fill the gas tank AND check
the oil).
• EXCON: An expert system used by Digital Equipment Corp.
to help configure the old VAX family of minicomputers.
The Computer Continuum 12-507
Expert Systems
Two major parts of an expert system:
• The knowledge base: The collection of rules that make up the
expert system.
• The inference engine: A program that uses the rules by
making several passes over them.
– On each pass, the inference engine looks for all rules
whose condition is satisfied (if part).
– It then takes the action (then part) and makes another pass
over all the rules looking for matching condition.
– This goes on until no rules’ conditions are matched.
– The results are all those action parts left.
The Computer Continuum 12-508
Expert Systems
Inference engines can pass through the rules in
different directions:
• Forward chaining: Going from a rule’s condition to a rule’s
action and using the action as a new condition.
• Backward chaining: Goes in the other direction.
– Example: Medical doctors use both.
• Forward chaining: Going to the doctor with
symptoms (stomach pain). The doctor will come up
with a diagnosis (ulcer).
• Backward chaining: The doctor asks if patient has
been eating green apples knowing green apples cause
stomach aches.
The Computer Continuum 12-509
Expert Systems
Harold Cohen created an
expert system called AAORN
to create art in 1973.
• AARON is a collection of
over 1,000 rules.
– Includes information
regarding human anatomy
and gravity.
• AARON is free to draw what
it may draw. It then colors the
drawings.
• A PC-version of AARON is
being prepared for mass
distribution.
The Computer Continuum 12-510
Neural Networks
Neuron: Basic building-block of the brain.
• There are several specialized types, but all have the same
basic structure:
• The basic structure of an animal neuron.
The Computer Continuum 12-511
Neural Networks
Artificial models of the brain are of two distinct types:
• Electronic: Has electronic circuits that act like neurons.
• Software: This version runs a program on the computer that
simulates the action of the neurons.
The Computer Continuum 12-512
Neural Networks
Artificial neurons: Commonly called processing elements,
are modeled after real neurons of humans and other animals.
• Has many inputs and one output.
– The inputs are signals that are strengthened or weakened
(weighted).
– If the sum of all the signals is strong enough, the neuron will put
out a signal to the output.
Output
Artificial
Neuron
Inputs
The Computer Continuum 12-513
Neural Networks
Neural Network: A collection of neurons which are
interconnected. The output of one connects to several others with
different strength connections.
• Initially, neural networks have no knowledge. (All
information is learned from experience using the network.)
Input 1
Input 2
Input 3
Neuron 1
Neuron 2
Output from
Neuron 1
Output from
Neuron 2
The Computer Continuum 12-514
Neural Networks
Training a Neural Network
• Supervised training:
– Occurs when the neural network is given input data.
– The resulting output is compared to the correct input.
– The strengths of the connections are then modified so as
to minimize errors in succeeding input/output pairs.
• Example: Back propagation: This method of learning is
divided into two phases:
1. The inputs are applied to the network, and the outputs
compared with the correct output.
2. The resulting information about any error is fed
backwards through the network, adjusting the connection
strengths to minimize the error.
The Computer Continuum 12-515
Neural Networks
Neural networks in action: A case study.
• Mortgage Risk Evaluator.
– Data from several thousand mortgage applicants was used
to train a neural network.
• Credit data of each individual was paired with each
loan result.
• Patterns for successful loans and defaults of
mortgages were contained in the data.
• The neural network’s weights (measurements of
strengths) were adjusted to match the actual output.
– Now, a new mortgage applicant is entered as input. The
program determines whether they are a bad risk.
The Computer Continuum 12-516
Evolutionary Systems
Alan Turing, in 1950, identified three attributes that
are the basis for what is now termed genetic
programming.
• Heredity
• Mutation
• Natural selection
• Evolution is being used to create or grow programs.
The Computer Continuum 12-517
Evolutionary Systems
Genetic Algorithm (simulated evolution):
• Mimics the processes in the genetics of living systems.
• Created by John Holland (mid-1960’s) U. of Michigan.
• The human puts together the system and specifies the desired
results, but the details on how it is done are left to evolve.
• Example: Koza, a student of Holland, developed a system that
had tree-structured chromosomes.
– Using basic astronomical data, his system came up with
Kepler’s 3rd law of planetary motion.
• “the cube of a planet’s distance from the sun is
proportional to the square of its period”
• Major problem with genetic algorithms: An intimate
knowledge of the system must be known.
The Computer Continuum 12-518
Evolutionary Systems
Genetic Programming:
• A technique that follows Darwinian evolution.
• The evolution takes place directly on the programs in the
population that are striving to reach the goal specified by the
programmer.
– Only the goal is known and possibly some of the structure of
the solution..
The Computer Continuum 12-519
Complex Adaptive Systems
Complex adaptive systems: A collection of
many parts individually operating under
relatively simple rules, and are highly
interactive in a nonlinear way.
• Their parts are self organizing, operate in
parallel, and exhibit emergent behavior (totally
unpredictable results can occur).
• The system of parts evolves with natural
selection operating.
• Example: Mound-building termite colonies in
Australia.
– Mounds can be several feet high.
– Termites follow a simple set of rules.
– Mounds affect what can grow around it.
The Computer Continuum 12-520
Complex Adaptive Systems
Chaos:
• Described as a situation where things seem unorganized and
unpredictable.
• Tiny changes in the starting point produce solutions to a
problem that seem to have almost random results.
• “Butterfly affect”: A tiny flip of a butterfly’s wings could start
a hurricane.
Artificial life: (a-life)
• A phenomena in computers that has attributes of life.
• Some argue that computer viruses are a form of a-life.
The Computer Continuum 12-521
Natural Language Translation
Two distinct classes of translation software:
• One works while you are on the WWW.
– Can be a direct translation of a complete Web page or
parts of its foreign language text.
• The other is a standalone piece of software that is used to
translate files of foreign language text.
– Many are available.
• Simply Translating is a program that costs under
$50.00.
The Computer Continuum 12-522
Natural Language Translation
Web-based Language Translation
• Babel Fish (Free service on Alta Vista)
– Text is cut and then pasted into a translation box.
– “Test translation” from English to Italian and back:
• The spirit is willing, but the flesh is weak.
• The spirit is arranged, but the meat is weak person.
• FreeTranslation.com
– Allows you to enter a URL and then translates it.
– Also does text entry for direct translation to and from English.
– “Test translation” from English to German and back:
• The spirit is willing, but the flesh is weak.
• The intellect is ready, but the meat is weak.
ELECTRONIC COMMERCE
Potential roles of e-commerce ● Economics of online sales ● Collaborative Filtering ●
Search
Engine Optimization ● Micro Payments ● “Bricks-and-Clicks” ●
Social Media
Learning Objectives
Understanding
• Opportunities to use e-commerce
• Circumstances when e-commerce is
more appropriate
• Influences on a site’s rank on major
search engines
Some Potential Ways to Make Money
Online
Sales of tangible and/or electronic products (including
services)
Advertising revenue—message can be targeted to
• Demographics/characteristics of web visitors to this site
• Individual web surfer
Subscription revenue (difficult to collect in practice
due to the prevalence of free online content)
Referral fees/commissions
• Links to sites selling product
• “Affiliate” marketing
Online research data collected and sold to clients
Basic Internet Economics
In most markets, online merchants tend to
have HIGHER costs than do conventional
retailers
• Much more of the work is done by the
merchant rather than by the customer.
Intermediaries usually add value through
specialization of labor and consolidation of
tasks. Eliminating intermediaries usually
results in higher costs.
Customers do a lot of the work when they
select, aggregate, bring for check-out, and
carry away their products. Employees of ecommerce
companies and their
transportation services have to be paid to do
this work!
Considerations in Evaluating ECommerce
Potential
Value-to-bulk ratio. High value,
low weight/volume items can be
more readily handled and shipped.
Absolute margin. Even if the
percentage margin on a high price
item is low (e.g., 15%), the absolute
margin can cover considerable
expenses (e.g., 0.15x$1,000=$150)
Ability of consumer to evaluate
quality and fit through online
description. Standard branded items
from a trusted source can be more
easily evaluated than items that
need to be examined up close.
Convenience to the customer and
willingness to pay for this
convenience. Some consumers may
be willing to pay more for door-todoor
delivery. It is usually more
expensive to buy groceries online.
Customer sensitivity to delayed
delivery.
Extent of customization needed
—highly customized items—e.g.,
insurance, plane tickets,
personalization—allow the
customer to do much of the work
(i.e., data entry).
Geographic dispersal of
consumers—even if direct-toconsumer
sales are not efficient,
this may be the only cost
effective way to reach customers
who are widely dispersed (e.g.,
bee keepers, Civil War buffs, tall
people).
Extent of inventory value decline
over time. A computer can be
distributed to consumers at a
lower price through retailers, but
the process takes longer and
computer parts lose value fast.
The Case of Dell Computer
Customizing computers for each customer probably does NOT save
money. It is probably cheaper to provide a limited number of
computers that offer each consumer a little bit MORE than what he or
she would have wanted in a customized unit.
Prices for “upgrades” to default models tend to be very high—e.g.,
additional RAM often costs more than twice as much as the “street”
price for the components. “Base” models usually have low prices, but
the final prices paid tend to be high.
Although the percentage margins on computers tends to be low due to
competition (e.g., 10-25%), absolute margins can be significant—e.g.,
10% of $1,500=$150. That margin can pay for a lot of work.
It would probably be cheaper to ship directly to an efficient retailer—
e.g., Wal-Mart may take in hundreds of computers and a number of
other materials at one time. These items are put out on floors using
fork lifts and other efficient transportation methods. The customer
does much of the work.
However, because computer parts may lose as much as 1.5% in value
per week. Thus, reducing distribution lag time by five weeks may
“rescue” 7.5%.
If Dell claims to have an inventory turnover time of 48 hours, someone
else—probably a supplier—has to carry the needed “buffer” inventory
to accommodate fluctuations in demand.
How Suitable For Internet Commerce?
Are There Differences Among Segments?

Estimated Margins—Costco
Pearl Earrings
Books
40%+ discount required to
be competitive in this
market
Discount NOT needed to be
competitive in this market
“Collaborative Filtering”
Comparing purchases by a customer to others who have made “similar” purchases to
identify additional products of potential interest
Largely a matter of “brute force” computer analysis
Often a more effective way to identify additional items of interest if it is difficult to
conceptually compare items to identify others like them
• E.g., favorite songs: What drives the preference? Sound, lyrics, singer characteristics?
• E.g., books: Which authors are “similar?”
“Win-win” deal: Merchant has the opportunity to sell more items; the customer finds
value that he or she would otherwise have been less likely to find
How Suitable For Internet Commerce?
Are There Differences Among Segments?
Reality of Online Competition
Intense competition for large market products (large
quantity demanded attracts many sellers)
Use of large demand products as loss leaders (e.g.,
Amazon.com bestsellers)
Competition will force reduced costs—if any—to be passed
on to customers. Even if there is a cost advantage to selling
online in a particular market, you will NOT be competing
just against “brick-and-mortar” stores but also against those
who have the same cost advantage in selling to customers.
In the long run, you can probably make NORMAL profits
but not above market level profits.
Competition makes charging for shipping and handling
difficult. This is often more expensive than traditional
distribution.
Less competition on specialty products greater margins
“Bricks-and-Clicks”
Traditional retail chains and online
presence tend to have synergy
• Online access to store information—hours,
locations, directions
• Checking on “in stock” status on local stores
• Online orders with store pickup
• Online orders with delivery; store return
option
Brand equity
Volume purchasing power
Inventory assortment warranted by
combined store and online sales
Micro-payments: Opportunities and costs
Considerable online content and services
could be made profitably available for a small
charge (e.g., 1¢-$2.00)
However, collecting small amounts of money
can be
• Costly—credit card firms or debit
processing firms may charge a significant
per transaction fee
• Inconvenient—the customer may not be
willing to enter much information
Mobile technology—with active login—may
be helpful for the higher end (e.g., 50¢+)
SEARCH ENGINE OPTIMIZATION
Search engines
Search engine rankings
Optimizing for rankings
• Content
• Reciprocal linking
Search Engines
Search engine market
dominated by Google
Microsoft’s new BING
search engine—the
“decision engine”
• Reported to match search
results to user IP address
local results possible
• Deals with Facebook and
Twitter for better “real
time” access
Search engines
Use an algorithm to identify the most optimal
links
Algorithms may involve
• Usage of keywords
• “Popularity” (number of links pointing inward)
• Other criteria—often proprietary
• “Click-through” rates from the respective search
engine (NOT overall traffic volume on the site)
Historically, key word repetition was the most
important factor. Today, on Google, quality
links appear to be more important than key
words.
Internet consultants will make
recommendations for a fee. Many have strong
opinions on “what works.” Most are short on
evidence that they are correct.
Search Engine Optimization: Reciprocal
Linking
Linking from highly rated web
sites greatly increases the
ranking of a site
Linking from low rated sites
does not appear to help much
The weight of a link may be
determined by the number of
links at that page—one link
among many is worth less
Linking to “spamming” sites
may be penalized
Search Engine Optimization: Text
Credible repetition of key words
• Frequently greater credit for
– Bolded words
– Words early in the document
Identification of desirable key words
• Analysis of competing sites
• Customer interviews
Misspellings
Search Engine Optimization: Other
Domain names
• If the domain name features the keyword, more weight
is given
• Google considers the underscore a space—e.g.,
Marketing_Tips.com .
Listing in the Open Directory Project (
http://www.DMOZ.org) .
Most search engines no longer rely significantly
on meta tags—”invisible” information from
webmasters about the site—since these can be
manipulated. Using meta tags, however, tells
your competitors what you are trying to
accomplish.
M-commerce: Mobile phone/PDA/
“gadget” access and sales
High growth in mobile technology with
Internet access
.mobi domain is intended for web sites
optimized for small screens
Google Android project is intended to
increase uniformity of display across cell
phone models
Many countries are running ahead of the
U.S.
Useful in making “micro-payments”—
buying a soda or other low cost item
Current advertisements for mobile phone
banking
Social Media
“Word-of-mouth” or “wordof-
click campaigns”
Targeting of specific
demographics efficiency
Exposure through online
games
Credibility of known
individuals and their friends
Facebook
Targeting by demographics
Online presences through
• Applications
• “Managed” (“Fan”) pages
“Viral” potential

Anda mungkin juga menyukai