Encoding Information - Villanova University

Download Report

Transcript Encoding Information - Villanova University

Representing Information
Digitally
Digitization
Initially transforming data for computer use
• Assigning people social security numbers
• The creation of telephone numbers
Encoding information became the way to transform the real
world into a context that the computer could understand
Information Metamorphosis
Fitting the real world into the
computer
 Computer’s world

– Electronic
– Fast
– Binary

Real World
– Multiple forms of data / information
– Imprecise / vague
– Non uniform speeds
Information Metamorphosis

Real World Data Forms
– Numeric Data
– Character Data
– Graphical / Visual Data
– Audio Data
– Instructional Data

Methodology needed to transform real
world data into computer world
(binary)
6
4
8
16
8
4
2
1
9
1
32
1
0,0
00
1,0
00
,00
0
10
0,0
00
10
,00
0
1,0
00
10
0
10
,00
3
1
0
64

A decimal number:
1,648,319
12
8

10
Binary Number System
1
0
0
1
1
1
0
1
A binary number:
1001 1101
– Smallest addressable
unit within the
computer

4 Bytes = Word
– Basic unit for
arithmetic
32
16
8
4
2
1
Binary for numeric
data
 Binary digit = Bit
 8 Bits = Byte

12
8
64
Binary Number System
1
0
1
1
1
0
1
0
1 X 128 =
0 X 64 =
0 X 32 =
1 X 16 =
1X8=
1X4=
0X2=
1X1=
128
0
0
16
8
4
0
1
157
Numeric Data
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
0000 0000
0000 0001
0000 0010
0000 0011
0000 0100
0000 0101
0000 0110
0000 0111
0000 1000
0000 1001
0000 1010
0000 1011
0000 1100
0000 1101
0000 1110
0000 1111
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
0001 0000
0001 0001
0001 0010
0001 0011
0001 0100
0001 0101
0001 0110
0001 0111
0001 1000
0001 1001
0001 1010
0001 1011
0001 1100
0001 1101
0001 1110
0001 1111
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
0010 0000
0010 0001
0010 0010
0010 0011
0010 0100
0010 0101
0010 0110
0010 0111
0010 1000
0010 1001
0010 1010
0010 1011
0010 1100
0010 1101
0010 1110
0010 1111
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
0011 0000
0011 0001
0011 0010
0011 0011
0011 0100
0011 0101
0011 0110
0011 0111
0011 1000
0011 1001
0011 1010
0011 1011
0011 1100
0011 1101
0011 1110
0011 1111
Numeric Data

Converting to binary
– Repeated division by 2
– Remainders are the
important part
– Read from bottom up
as if left to right
Character Data

Binary for Character Data
– 8 bit combinations assigned to a symbol
– Name for mapping process is ASCII table
@
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
0100 0000
0100 0001
0100 0010
0100 0011
0100 0100
0100 0101
0100 0110
0100 0111
0100 1000
0100 1001
0100 1010
0100 1011
0100 1100
0100 1101
0100 1110
0100 1111
P
Q
R
S
T
U
V
W
X
Y
Z
[
\
]
^
_
0101 0000
0101 0001
0101 0010
0101 0011
0101 0100
0101 0101
0101 0110
0101 0111
0101 1000
0101 1001
0101 1010
0101 1011
0101 1100
0101 1101
0101 1110
0101 1111
0110 0000
a 0110 0001
b 0110 0010
c 0110 0011
d 0110 0100
e 0110 0101
f 0110 0110
g 0110 0111
h 0110 1000
i 0110 1001
j 0110 1010
k 0110 1011
l 0110 1100
m 0110 1101
n 0110 1110
o 0110 1111
ASCII, The
American
Standard Code for
Information
Interchange
Graphical Data

Binary for Graphical Data
Graphical Data

Binary for Graphical Data
Graphical Data




Binary for Graphical Data
Each black pixel is
represented as a “1”
Each white pixel is
represented as a “0”
Pixels are grouped in units
of 8 so they can be stored in
1 byte
Graphical Data
A 1” picture scanned at 150 DPI (dots per inch)
Total size = 150 X 150  22,500 dots
Memory required = 22,500 / 8  2,813 bytes
Color requires more bits to represent each dot
Using 8 bits for each dot allows for 256 different
colors
The 1” picture now requires 22,500 bytes
Graphical Data
Printers are rated in DPI for print
quality
 Scanners are rated in DPI for image
resolution
 Monitors / displays have display
settings for display resolution

–800 X 600
–1024 X 768
–1280 X 1024
–1400 X 1050
Audio Data
Binary for audio data
 Sound as a waveform

–Y-axis represents
voltage
–X-axis represents time

Suppose the wave
form shown
represents 1 second
of sound
Audio Data

Divide Sample into segments
Audio Data

Divide Sample into more segments
Audio Data

Divide Sample into even more
segments
Audio Data
The more segments the
better the re-created wave
form
 The given sample was
divided into 34 segments
(approx)
 An Audio CD utilizes
44,000 samples per
second of sound

Instructional Data
Binary for Instructional Data
 Instructional Data has not only
content but sequence
 Driving directions to NJ Aquarium

–Designated number of steps
–Sequence of steps is critical to success
–Rearranging sequence will not get you to
the NJ Acquarium

Recipe / Directions / Program
Instructional Data

Word Hunt Instruction Set
–Similar to “decoder ring”

Six instructions
–GOTO #
–SELECT #
–FORWARD #
–BACKUP #
–WRITE
–STOP
Instructional Data





A program is a collection of instructions
Executing the program means to “carry out”
the listed instructions
GOTO# - turn to designated page
SELECT# - count down this many lines
FORWARD# - count in this many words
Instructional Data

Real computers have different types of
instructions
–Arithmetic
–Data Movement
–Logical / Comparison
–Control
–Input / Output