3. Format must be appropriate
• The internal representation must be
appropriate for the type of processing to
take place (e.g., text, images, sound)
Data Representation
Introduction to Information Technologies
4. Standards Organizations
• ISO – International Standards Organization
• CSA – Canadian Standards Association
• ANSI – American National Standards
Institute
• IEEE – Institute for Electrical and
Electronics Engineers
• Etc.
Data Representation
Introduction to Information Technologies
5. Examples of Standards
Type of Data
Alphanumeric
Standards
ASCII, EBCDIC, Unicode
Image
JPEG, GIF, PCX, TIFF
Motion picture
MPEG-2, Quick Time
Sound
Sound Blaster, WAV, AU
Outline graphics/fonts
PostScript, TrueType, PDF
Data Representation
Introduction to Information Technologies
6. The Problem
• Representing text strings, such as
“Hello, world”, in a computer
Data Representation
Introduction to Information Technologies
7. Codes and Characters
• Each character is coded as a byte
• Most common coding system is ASCII
(Pronounced ass-key)
• ASCII = American National Standard
Code for Information Interchange
Data Representation
Introduction to Information Technologies
8. ASCII Features
•
•
•
•
7-bit code
8th bit is unused (or used for a parity bit)
27 = 128 codes
Two general types of codes:
– 95 are “Graphic” codes (displayable on a
console)
– 33 are “Control” codes (control features of the
console or communications channel)
Data Representation
Introduction to Information Technologies
12. e.g., ‘a’ = 1100001
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
000
NULL
SOH
STX
ETX
EDT
ENQ
ACK
BEL
BS
HT
LF
VT
FF
CR
SO
SI
Data Representation
001
DLE
DC1
DC2
DC3
DC4
NAK
SYN
ETB
CAN
EM
SUB
ESC
FS
GS
RS
US
010
!
"
#
$
%
&
'
(
)
*
+
,
.
/
011
0
1
2
3
4
5
6
7
8
9
:
;
<
=
>
?
100
@
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
101
P
Q
R
S
T
U
V
W
X
Y
Z
[
]
^
_
110
`
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
111
p
q
r
s
t
u
v
w
x
y
z
{
|
}
~
DEL
Introduction to Information Technologies
23. Escape Sequences
• Extend the capability of the ASCII code set
• For controlling terminals and formatting output
• Defined by ANSI in documents X3.41-1974 and
X3.64-1977
• The escape code is ESC = 1B16
• An escape sequence begins with two codes:
ESC
[
1B16
Data Representation
5B16
Introduction to Information Technologies