Transcript COMS 161

COMS 161
Introduction to Computing
Title: The Digital Domain
Date: September 3, 2004
Lecture Number: 5
1
Announcements
•
•
•
•
•
Questions
Comments
Concerns
Criticism
Jokes
2
Review
• Analog (continuous) Information
• Digital information
– Advantages
– Disadvantages
3
Outline
• Digital information
– Advantages
4
Digital advantages
8. Random Access
• Direct access to digital data, provided
we know where to look for it
• Random access
– All accesses take the same amount of
time (latency) regardless of where the
data resides
5
Digital advantages
8. Random Access
(Cont.)
• Sequential access
– Analog information
– Must pass information that comes before
what you wish to find
9. Selective Access
• Searched by content (selective)
• Find occurrences of a given word in a
document
6
Digital advantages
10.Compression
• Useful information is not totally
redundant or totally random
• Redundant information
– Repeating quality
• Random information
– Nothing in common
– TV snow
– This lecture?
7
Redundant
– How many times does this message have
to be transmitted, heard, or seen before it
is not necessary to continue
»
»
»
»
»
»
»
»
»
»
COMS 161 is the best of the best classes at the H-S-C
COMS 161 is the best of the best classes at the H-S-C
COMS 161 is the best of the best classes at the H-S-C
COMS 161 is the best of the best classes at the H-S-C
COMS 161 is the best of the best classes at the H-S-C
COMS 161 is the best of the best classes at the H-S-C
COMS 161 is the best of the best classes at the H-S-C
COMS 161 is the best of the best classes at the H-S-C
COMS 161 is the best of the best classes at the H-S-C
COMS 161 is the best of the best classes at the H-S-C
8
Redundant
–Redundancy permits data compression
• Remove some of the redundancy
• Keep enough
–Reconstruct the original exactly
–Reconstruct a reasonable approximation of
the original
• Example of compression
–Repeat the following phrase eleven times
» COMS 161 is the best of the best classes at the H-S-C
9
Random
–Can you guess what this picture is?
10
Digital advantages
11.Content Analysis and Synthesis
• Digital data can be processed,
combined, and analyzed
• Ordered based on content
• Cookies
– Allow web sites to tailor to you
12.Broad usefulness
• Many different forms of information can
be represented this way
11
Digital Domain
• Analog information
– The natural form for many different types of
information
– Continuous in at least one dimension
• Digital information
– Language of the computer
– Analog information must be converted into a
discrete (digital) form
– Multimedia is all digital information
12
Digital Domain
• Converting analog to digital information
– We need a digital representation of the
information
– Recall, digital is a discrete system
• Where symbols are numbers
• The digital advantages
– Therefore, we need a numerical encoding of
the data
• Numerical means numbers
13
Numbers
• Two types of notion used to represent
numbers
– Non-positional notation
• No special significance is given to order
– Counting numbers on your fingers
– Tick mark counting method
» The number of items is important, not the order
– My honey do list
» Not important which task I do first, just so I get them all
done
14
Numbers
–Positional notation
• Significance is given to order the digits
appear in the number
• The decimal numbering system uses
positional notation
–This is the system we use
–365 is not the same a 653
» These are completely different numbers
» They use the same digits
15
Positional notation
• 365 means
– Three hundreds
– Six tens
– Five ones
365  3*100  6 *10  5 *1
2
1
0
 3 *10  6 *10  5 *10
• Each digit is multiplied by a power of 10
16
Decimal number system
• Synonyms
– Decimal number system
– Decimal notation
– Base-10 system
• Both digits and their location in the
number are important
• Ten unique symbols (digits)
– 0, 1, 2, …, 9
17
Octal number system
• Decimal is not the only positional number
system available
– Octal
• Positional,base-8 system
• Each digit is multiplied by a power of 8
• Eight unique symbols (digits)
– 0, 1, 2, …, 7
3658  3 * 8  6 * 8  5 * 8
 192  48  5  24510
2
1
0
18
Binary number system
–Binary
• Positional, base-2 system
• Each digit is multiplied by a power of 2
• Two unique symbols (digits), 0 and 1
101101  1* 2  0 * 2  1* 2  1* 2  0 * 2  1* 2
5
4
3
2
1
0
1011012  1* 32  0 *16  1*8  1* 4  0 * 2  1*1
1011012  32  8  4  1  4510
19
Binary number system
• Digital and binary relationship
– The language of computers use binary digits
– Only 2 possible values
• 0 and 1
– Much simpler to make electronics that
distinguish between one of two values
• Distinguishing between more than two values is
very difficult
20
Binary number system
• Since binary digits have two possible
values
• Binary digits are called bits
– They only contain a little “bit” of information
– Numbers represented in binary form will
(most likely) require more digits (bits) than
the decimal form
4510  1011012
21