Sie sind auf Seite 1von 41

Chapter 2:

Metamorphosis of Information

How does the computer store information?

The Computer Continuum 2-1


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-2


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-3
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 Open
circuit circuit

The Computer Continuum 2-4


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-5


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:

104 103 102 101 100


10000 1000 100 10 1
1 3 5 7
= (1 x 1000) + (3 x 100) + (5 x 10) + (7 x 1)
= 1357 in the decimal system
The Computer Continuum 2-6
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:
24 23 22 21 2 0
16 8 4 2 1
1 0 1 1 0

= (1 x 16) + (0 x 8) + (1 x 4) + (1 x 2) + (0 x 1)
= Only 22 in theThe
decimal system!
Computer Continuum 2-7
Representation of Numbers

■ Decimal ■ Binary
• Each number has a unique • Each number has a unique
representation. representation.
• Counting: • Counting:
» When you run out of » When you run out of
digits, make it a zero digits, make it a zero
and increment the next and increment the next
place value to the left. place value to the left.
» 99 becomes 100 » 11two becomes 100two

The Computer Continuum 2-8


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-9
Representation of Symbols
and Text
A partial listing of the ASCII character set
■ Ctrl+@ - 0000000 ■ 0 - 0110000 ■ A - 1000001 ■ a - 1000001
■ Ctrl+A - 0000001 ■ 1 - 0110001 ■ B - 1000010 ■ b - 1000010
■ Ctrl+B - 0000010 ■ 2 - 0110010 ■ C - 1000011 ■ c - 1000011
■ Ctrl+C - 0000011 ■ 3 - 0110011 ■ D - 1000100 ■ d - 1000100
■ Ctrl+D - 0000100 ■ 4 - 0110100 ■ E - 1000101 ■ e - 1000101
■ Ctrl+E - 0000101 ■ 5 - 0110101 ■ F - 1000110 ■ f - 1000110
■ Ctrl+F - 0000110 ■ 6 - 0110110 ■ G - 1000111 ■ g - 1000111
■ Ctrl+G(Bell) - ■ 7 - 0110111 ■ H - 1001000 ■ h - 1001000
0000111 ■ 8 - 0111000 ■ I - 1001001 ■ i - 1001001
■ Space - 0100000 ■ 9 - 0111001 ■ J - 1001010 ■ j - 1001010
■ Delete - 1111111 ■ : - 0111010 ■ K - 1001011 ■ k - 1001011
The Computer Continuum 2-10
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-11


Representation of Images

010101010101010101010110101101001001000111110000
011010101010101010101001011010010110010100000110
100101010101010101010110110001010000101001010100
101101101011011010110101100110010110100010001001
011010010110100101101010001001100100101101010010
100101101100101011010101110110011001010010101100
011010010011010110010010001001100110101010010001
010101101100101100100101110110011001010100100101
010101010101010011011010001001100010100001010100
101010101010101100010010110010001101001110100001
010101010101010001000101000101101000010000001101
110110101010010100110100011010010011100101101000
101001010100100010100101100101101100001010000010
101011010001001001001001011110101011010100101100
101010000100010010010111110101111100101001001001
■ In a picture with only 010100101001000100101010101110101011010010010000
101001000010011001101111101011101010101000100101
black and white pixels: 010010010100100011011000011110111011010110101000
000100000001001100100111111111110110111000000010
• 1 represents black. 101000101010010011011000010101011101000010101000
000010000100101101010011111111111111011101000101
• 0 represents white. 001000101001101010100100011101111110100010010000
010010010110001001001001111011110101101100100101
100100100000111010010010010111111111011001001000

The Computer Continuum 2-12


Representation of Images

■ The baby's picture with  ■ The baby's picture with 4 
smaller pixels ­ more detail. levels of gray.

The Computer Continuum 2-13


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-14
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
Full color image
represent all three colors.
The Computer Continuum 2-15
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-16


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-17


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-18


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-19
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-20


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-21


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-22


Representation of Sounds,
Music and Speech
Vowels Consonants
■ ee as in bee ■ p pea ■ b bee
■ i as in mitten ■ t tea ■ d Dee
■ e as in make ■ k key ■ g gone
■ eh as in led ■ f fee ■ v vee
■ ae as in had ■ s see ■ z zip
■ ah as in father ■ sh sheep ■ zh vision
■ aw as in small ■ tsh chest ■ dzh jaw
■ o as in go ■ r rate ■ m me
■ u as in put ■ y yet ■ ëm chasm
■ oo as in tool ■ w Wales ■ n not
■ uh as in the ■ hw whales ■ ën Eden
■ er as in anger ■ h he ■ ng sing
■ ai as in while ■ l lee
■ ou as in how Phonemes of ■ ël cradle
■ oi as in toy American English
■ iu as in fuse The Computer Continuum 2-23
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-24


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-25


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-26


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-27


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-28
Representing the Instructions
of Programs
■ A Word Hunt program puzzle:
GOTO
SELECT
#
# Get page 
numbers and
FORWARD #
WRITE word

message from
GOTO #
SELECT #
FORWARD #
WRITE
GOTO
word
#
text.
SELECT #
FORWARD #
WRITE word
STOP
The Computer Continuum 2-29
Representing the Instructions
of Programs
Word Hunt  Word Hunt  Program Program
Instruction Set: Program in decimal in binary
1 GOTO # GOTO # 1 # 001 #
2 SELECT # SELECT # 2 # 010 #
3 FORWARD # FORWARD # 3 # 011 #
4 BACKUP # WRITE word 5 word 101
5 WRITE word GOTO # 1 # 001 #
0 STOP SELECT # 2 # 010 #

Get page 
FORWARD # 3 # 011 #
WRITE word 5 word 101
GOTO # 1 # 001 #
numbers and SELECT
FORWARD #
# 2
3
#
#
010
011
#
#
message from WRITE word
STOP
5
0
word 101
000

text. The Computer Continuum 2-30


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-31


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-32


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.

0 1 0 1 1 0 1 0

Code for Address of the
addition number to be added
The Computer Continuum 2-33
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-34
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-35


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-36
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-37


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-38


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-39
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-40


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 2-41

Das könnte Ihnen auch gefallen