0% found this document useful (0 votes)
115 views

02 CSA Data Representation

Uploaded by

HengCY
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
115 views

02 CSA Data Representation

Uploaded by

HengCY
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 63

Computer Systems Architecture

AICT001-3-2

Data Representation
Diploma in Computing and IT: Level - 1

Prepared by: TPM First Prepared on: 03-06-08 Last Modified on: 20--06-08
Quality checked by: KNT
Copyright 2008 Asia Pacific Institute of Information Technology
Topic & Structure of the lesson
Data Formats

• General Considerations
• Number systems and Inter-conversion
• Representation of
– Text
– Images
– Sounds
• Data compression techniques
• Internal Computer Data format
Computer Systems Architecture Slide 2 of 63
Learning Outcomes
Data Formats

• At the end of this session you should be able


to:-
– Understand how data is represented, stored, and
manipulated inside a computer.
– Understand how we represent that data externally
for easier understanding and manipulation by
humans.
– Understand the similarities and differences in the
way computers represent numerical, character, and
image data.
Computer Systems Architecture Slide 3 of 63
Key Terms you must be able to use
Data Formats

• If you have mastered this topic, you should be able to


use the following terms correctly in your assignments
and exams:-
– Decimal
– Binary
– Octal
– Hexadecimal
– ASCII (American Standard Code for Information Interchange)
– EBCDIC (Extended Binary Coded Decimal Interchange
Code)
– Unicode
Computer Systems Architecture Slide 4 of 63
Data Formats
Data Formats

• Computers
– Process and store all forms of data in binary format.
• Human communication
– Includes language, images and sounds.
• Data formats
– Specifications for converting data into computer-
usable form.
– Define the different ways human data may be
represented, stored and processed by a computer.
Computer Systems Architecture Slide 5 of 63
Computing Systems Data
Data Formats

• Usually the computing systems are complex


devices, dealing with a vast array of information
categories.
• The computing systems store, present, and
help us modify:-
– Text
– Audio
– Images and graphics
– Video
Computer Systems Architecture Slide 6 of 63
Digital vs. Analog
Data Formats

• Computing systems are finite machines. They


store a limited amount of information, even if
the limit is very big.
– The goal is to represent enough of the real world
data to satisfy our computational needs and our
senses of sight and sound.
– The information can be represented in one or two
ways: analog or digital.

Computer Systems Architecture Slide 7 of 63


Digital vs. Analog
Data Formats

• Analog data is a continuous representation,


analogous to the actual information it
represents.
– For example, a mercury thermometer is an analog
device. The mercury rises in a continuous flow in
the tube in direct proportion to the temperature.

Computer Systems Architecture Slide 8 of 63


Digital vs. Analog
Data Formats

• Digital data is a discrete representation,


breaking the information up into separate
(discrete) elements.
– Computers cannot work with analog information
directly, so there is a need to digitise the analog
information.
– This is done by breaking the analog information into
pieces and representing those pieces using binary
digits.

Computer Systems Architecture Slide 9 of 63


Digital vs. Analog
Data Formats

• Why digital signal?


– Both electronic signals (analog and digital) degrade as they
move down a line. The voltage of the signal fluctuates due to
environmental effects.
– As soon as an analog signal degrades, information is lost.
Since any voltage level within the range is valid, it is
impossible to know that the original signal was even
changed.
– Digital signals jump sharply between two extremes (high and
low state). A digital signal can degrade quite a bit until the
information is lost, because any value over a certain
threshold is considered high value and below the threshold
is considered low value.
Computer Systems Architecture Slide 10 of 63
Digital vs. Analog
Data Formats

• You can still retrieve the information from a reasonably


degraded digital signal.
• Periodically a digital signal is reclocked to regain its original
shape. As long as it is reclocked before too much degradation,
no information is lost.

Computer Systems Architecture Slide 11 of 63


Binary Representation
Data Formats

• Why binary representation (as opposed to


decimal or octal, etc..)?
– Because the devices that store and manage the
digital data are far less expensive and complex for
binary representation.
– They are also far more reliable when they have to
represent one out of two possible values.
– Because the electronic signals are easier to
maintain if they carry only binary data.
Computer Systems Architecture Slide 12 of 63
Binary Representation
Data Formats

• One bit can be either 0 or 1. Therefore, one bit can


represent only two outputs.
• To represent more than two outputs, we need
multiple bits. Two bits can represent four outputs
because there are four combinations of 0 and 1 that
can be made from two bits: 00, 01, 10,11.
• In general, n bits can represent 2n outputs because
there are 2n combinations of 0 and 1 that can be made
from n bits. Note that every time we increase the
number of bits by 1, we double the number of things
we can represent.
Computer Systems Architecture Slide 13 of 63
Binary Conversion
Data Formats

• Decimal to Binary
– 2510 = 1 10012
– 14510 = 1001 00012
– 210 = 102
• Binary to Decimal
– 1111 00002 = 24010
– 11112 = 1510
– 1002 = 410
Computer Systems Architecture Slide 14 of 63
Binary Conversion
Data Formats

• Octal to Binary
– 258 = 010 1012
– 1458 = 001 100 1012
– 28 = 0102
• Binary to Octal
– 1111 00002 = 3608
– 11112 = 178
– 1002 = 48
Computer Systems Architecture Slide 15 of 63
Binary Conversion
Data Formats

• Hexadecimal to Binary
– 2516 = 0010 01012
– 14516 = 0001 0100 01012
– 216 = 00102
• Binary to Hexadecimal
– 1111 00002 = F016
– 11112 = F16
– 1002 = 416
Computer Systems Architecture Slide 16 of 63
Binary Conversion
Data Formats

• 2’s Complement
+2510 = 1 10012
-2510 = ?
1 10012 (+25)
0 01102 (flip the bits)
+ 1 (add 1)
0 0111
-2510 = 0 01112

Computer Systems Architecture Slide 17 of 63


Binary Conversion
Data Formats

Binary Decimal Octal Hexadecimal


0000 0000 0 0 0
0000 0001 1 1 1
0000 0010 2 2 2
0000 0011 3 3 3
0000 0100 4 4 4
0000 0101 5 5 5
0000 0110 6 6 6
0000 0111 7 7 7
Computer Systems Architecture Slide 18 of 63
Binary Conversion
Data Formats

Binary Decimal Octal Hexadecimal


0000 1000 8 - 8
0000 1001 9 - 9
0000 1010 10 - A
0000 1011 11 - B
0000 1100 12 - C
0000 1101 13 - D
0000 1110 14 - E
0000 1111 15 - F
Computer Systems Architecture Slide 19 of 63
Quick Review Questions
Data Formats

1. How many bits will it take to represent the decimal number 3,875,216? How
many bytes will it take to store the number?
2. Convert to Binary Base
a) 3578 =
b) EACB16 =
c) 17210 =
3. Convert to Hexadecimal Base
a) 53110 =
b) 3138 =
c) 1101111001102 =
4. Find the solution for the problems below (apply 2’s if necessary)
a) 3110 + 1110 =
b) 4510 - 1110 =
c) 2510 - 1510 =
Computer Systems Architecture Slide 20 of 63
Data Formats - How to Interpret Data
Data Formats

• Meaning of internal representation must be appropriate for the


type of processing to take place:
– That is, Images & sound: have to be digitised
• Images – need detailed description of the data, how colour is represented at
each data point
• Sound – need sampling rate
• Proprietary formats
– Unique to a product or company
– For example, Microsoft Word, Corel Word Perfect, IBM Lotus Notes
• Standards
– Evolve two ways:
• Proprietary formats become de facto standards (e.g., Adobe PostScript,
Apple Quick Time)
• Committee is struck to solve a problem (Motion Pictures Experts Group,
MPEG)

Computer Systems Architecture Slide 21 of 63


Why Standards?
Data Formats

• They exist because they are:-


– Convenient – sometimes the time to market is very important whenever
trying to finish a product, therefore existing standards may be used to
save time elaborating own protocols and interfaces
– Efficient – most of the standards are put together by committees with a
wide experience in the specific area
– Flexible – usually the standards allow for manufacturer or OEM specific
extensions
– Appropriate – address a specific problem in a specific domain
• Allow communication and sharing of information
• Allow computing systems and software to interoperate (at both
hardware and software levels)
• Sometimes standards are arbitrary and have some “blast from
the past” reasons (due to historical evolution)
Computer Systems Architecture Slide 22 of 63
Examples of Standards
Data Formats

Type of Data Standards


Alphanumeric ASCII, Unicode

Image JPEG, GIF, PCX, TIFF, BMP, etc

Motion picture MPEG-2, Quick Time, MPEG-4,


etc
Sound Sound Blaster, WAV, AU, MP3,
etc..
Outline graphics/fonts PostScript, TrueType, PDF

Computer Systems Architecture Slide 23 of 63


Standards Organisations
Data Formats

• ISO – International Standards Organisation


• CSA – Canadian Standards Association
• ANSI – American National Standards Institute
• IEEE – Institute for Electrical and Electronics
Engineers

Computer Systems Architecture Slide 24 of 63


Text : Alphanumeric Data
Data Formats

• Three standards for representing letters (alpha)


and numbers
– ASCII – American Standard Code for Information
Interchange
– EBCDIC – Extended Binary-Coded Decimal
Interchange Code (not used anymore, used to be
used in IBM mainframes)
– Unicode

Computer Systems Architecture Slide 25 of 63


Text : Codes and Characters
Data Formats

• The problem:
– Representing text strings, such as
“Hello, world”, in a computer
• Each character is coded as a byte ( = 8 bits)
• Most common coding system is ASCII
• ASCII = American National Standard Code for
Information Interchange
• Defined in ANSI document X3.4-1977
Computer Systems Architecture Slide 26 of 63
ASCII Features
Data Formats

• 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)

Computer Systems Architecture Slide 27 of 63


ASCII Reference Table
Most significant bit Data Formats

000 001 010 011 100 101 110 111


0000 NULL DLE 0 @ P ` p
0001 SOH DC1 ! 1 A Q a q
0010 STX DC2 " 2 B R b r
0011 ETX DC3 # 3 C S c s
0100 EDT DC4 $ 4 D T d t
0101 ENQ NAK % 5 E U e u
0110 ACK SYN & 6 F V f v
0111 BEL ETB ' 7 G W g w
1000 BS CAN ( 8 H X h x
1001 HT EM ) 9 I Y i y
1010 LF SUB * : J Z j z
1011 VT ESC + ; K [ k {
1100 FF FS , < L \ l |
1101 CR GS - = M ] m }
1110 SO RS . > N ^ n ~
1111 SI US / ? O _ o DEL
Least significant bit
Computer Systems Architecture Slide 28 of 63
ASCII Reference Table
Data Formats
000 001 010 011 100 101 110 111
0000 NULL DLE 0 @ P ` p
0001 SOH DC1 ! 1 A Q a q
0010 STX DC2 " 2 B R b r
0011 ETX DC3 # 3 C S c s
0100 EDT DC4 $ 4 D T d t
0101 ENQ NAK % 5 E U e u
0110 ACK SYN & 6 F V f v
0111 BEL ETB ' 7 G W g w
1000 BS CAN ( 8 H X h x
1001 HT EM ) 9 I Y i y
1010 LF SUB * : J Z j z
1011 VT ESC + ; K [ k {
1100 FF FS , < L \ l |
1101 CR GS - = M ] m }
1110 SO RS . > N ^ n ~
1111 SI US / ? O _ o DEL

i.e. ‘a’ = 11000012 = 9710 = 6116


Computer Systems Architecture Slide 29 of 63
ASCII Reference Table
Data Formats
000 001 010 011 100 101 110 111
0000 NULL DLE 0 @ P ` p
0001 SOH DC1 ! 1 A Q a q
0010 STX DC2 " 2 B R b r
0011 ETX DC3 # 3 C S c s
0100 EDT DC4 $ 4 D T d t
0101 ENQ NAK % 5 E U e u
0110 ACK SYN & 6 F V f v
0111 BEL ETB ' 7 G W g w
1000 BS CAN ( 8 H X h x
1001 HT EM ) 9 I Y i y
1010 LF SUB * : J Z j z
1011 VT ESC + ; K [ k {
1100 FF FS , < L \ l |
1101 CR GS - = M ] m }
1110 SO RS . > N ^ n ~
1111 SI US / ? O _ o DEL

95 Graphic codes
Computer Systems Architecture Slide 30 of 63
ASCII Reference Table
Data Formats
000 001 010 011 100 101 110 111
0000 NULL DLE 0 @ P ` p
0001 SOH DC1 ! 1 A Q a q
0010 STX DC2 " 2 B R b r
0011 ETX DC3 # 3 C S c s
0100 EDT DC4 $ 4 D T d t
0101 ENQ NAK % 5 E U e u
0110 ACK SYN & 6 F V f v
0111 BEL ETB ' 7 G W g w
1000 BS CAN ( 8 H X h x
1001 HT EM ) 9 I Y i y
1010 LF SUB * : J Z j z
1011 VT ESC + ; K [ k {
1100 FF FS , < L \ l |
1101 CR GS - = M ] m }
1110 SO RS . > N ^ n ~
1111 SI US / ? O _ o DEL

33 Control codes
Computer Systems Architecture Slide 31 of 63
ASCII Reference Table
Data Formats
000 001 010 011 100 101 110 111
0000 NULL DLE 0 @ P ` p
0001 SOH DC1 ! 1 A Q a q
0010 STX DC2 " 2 B R b r
0011 ETX DC3 # 3 C S c s
0100 EDT DC4 $ 4 D T d t
0101 ENQ NAK % 5 E U e u
0110 ACK SYN & 6 F V f v
0111 BEL ETB ' 7 G W g w
1000 BS CAN ( 8 H X h x
1001 HT EM ) 9 I Y i y
1010 LF SUB * : J Z j z
1011 VT ESC + ; K [ k {
1100 FF FS , < L \ l |
1101 CR GS - = M ] m }
1110 SO RS . > N ^ n ~
1111 SI US / ? O _ o DEL

Alphabetic codes
Computer Systems Architecture Slide 32 of 63
“Hello, world” Example
Data Formats

Binary Hexadecimal Decimal


H = 01001000 = 48 = 72
e = 01100101 = 65 = 101
l = 01101100 = 6C = 108
l = 01101100 = 6C = 108
o = 01101111 = 6F = 111
, = 00101100 = 2C = 44
= 00100000 = 20 = 32
w = 01110111 = 77 = 119
o = 01100111 = 67 = 103
r = 01110010 = 72 = 114
l = 01101100 = 6C = 108
d = 01100100 = 64 = 100
Note: 12 characters – requires 12 bytes
Each character requires 1 byte
Computer Systems Architecture Slide 33 of 63
ASCII Reference Table
Data Formats
000 001 010 011 100 101 110 111
0000 NULL DLE 0 @ P ` p
0001 SOH DC1 ! 1 A Q a q
0010 STX DC2 " 2 B R b r
0011 ETX DC3 # 3 C S c s
0100 EDT DC4 $ 4 D T d t
0101 ENQ NAK % 5 E U e u
0110 ACK SYN & 6 F V f v
0111 BEL ETB ' 7 G W g w
1000 BS CAN ( 8 H X h x
1001 HT EM ) 9 I Y i y
1010 LF SUB * : J Z j z
1011 VT ESC + ; K [ k {
1100 FF FS , < L \ l |
1101 CR GS - = M ] m }
1110 SO RS . > N ^ n ~
1111 SI US / ? O _ o DEL

Numeric codes
Computer Systems Architecture Slide 34 of 63
“4+15” Example
Data Formats

Binary Hexadecimal Decimal


4 = 00110100 = 34 = 52
+ = 00101011 = 2B = 43
l = 00110001 = 31 = 49
5 = 00110101 = 35 = 53

“4+15” is “00110100 00101011 00110001 00110101”

or “34162B1631163516”

Computer Systems Architecture Slide 35 of 63


ASCII Reference Table
Data Formats
000 001 010 011 100 101 110 111
0000 NULL DLE 0 @ P ` p
0001 SOH DC1 ! 1 A Q a q
0010 STX DC2 " 2 B R b r
0011 ETX DC3 # 3 C S c s
0100 EDT DC4 $ 4 D T d t
0101 ENQ NAK % 5 E U e u
0110 ACK SYN & 6 F V f v
0111 BEL ETB ' 7 G W g w
1000 BS CAN ( 8 H X h x
1001 HT EM ) 9 I Y i y
1010 LF SUB * : J Z j z
1011 VT ESC + ; K [ k {
1100 FF FS , < L \ l |
1101 CR GS - = M ] m }
1110 SO RS . > N ^ n ~
1111 SI US / ? O _ o DEL

Punctuation, etc.
Computer Systems Architecture Slide 36 of 63
Common Control Codes
Data Formats

• CR 0D carriage return
• LF 0A line feed
• HT 09 horizontal tab
• DEL 7F delete
• NULL 00 null

Computer Systems Architecture Slide 37 of 63


ASCII Reference Table
Data Formats
000 001 010 011 100 101 110 111
0000 NULL DLE 0 @ P ` p
0001 SOH DC1 ! 1 A Q a q
0010 STX DC2 " 2 B R b r
0011 ETX DC3 # 3 C S c s
0100 EDT DC4 $ 4 D T d t
0101 ENQ NAK % 5 E U e u
0110 ACK SYN & 6 F V f v
0111 BEL ETB ' 7 G W g w
1000 BS CAN ( 8 H X h x
1001 HT EM ) 9 I Y i y
1010 LF SUB * : J Z j z
1011 VT ESC + ; K [ k {
1100 FF FS , < L \ l |
1101 CR GS - = M ] m }
1110 SO RS . > N ^ n ~
1111 SI US / ? O _ o DEL

Computer Systems Architecture Slide 38 of 63


Escape Sequences
Data Formats

• 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:
• Example:-
– Erase display: ESC[2J
– Erase line: ESC[K
ESC [

1B16 5B16
Computer Systems Architecture Slide 39 of 63
Unicode
Data Formats

• The extended version of the ASCII character


set is not enough for international use.
• The Unicode character set uses 16 bits per
character. Therefore, the Unicode character set
can represent 216, or over 65 thousand,
characters.
• Unicode was designed to be a superset of
ASCII. That is, the first 256 characters in the
Unicode character set correspond exactly to
the extended ASCII character set.
Computer Systems Architecture Slide 40 of 63
Unicode
Data Formats

• Version 2.1
– 1998
– Improves on version 2.0
– Includes the Euro sign (20AC16 = )
– From the standard:
• …contains 38,887 distinct coded characters derived from the
supported scripts. These characters cover the principal written
languages of the Americas, Europe, the Middle East, Africa, India,
Asia, and Pacifica.
• Latest version of Unicode is 6.3.0 (September 2013 )
• More details can be found at Unicode's main website
http://www.unicode.org
Computer Systems Architecture Slide 41 of 63
Text Compression
Data Formats

• It is important that we find ways to store text


efficiently and transmit text efficiently:-
– Keyword encoding
– Run-length encoding
– Huffman encoding

Computer Systems Architecture Slide 42 of 63


Audio
Data Formats

• Sound is perceived when a series of air compressions vibrate a


membrane in our ear, which sends signals to our brain.
• A stereo system sends an electrical signal to a speaker to
produce sound. This signal is an analog representation of the
sound wave. The voltage in the signal varies in direct proportion
to the sound wave.
• To digitise the signal we periodically measure the voltage of the
signal and record the appropriate numeric value. The process is
called sampling.
• In general, a sampling rate of around 40,000 times per second
is enough to create a very good high quality sound
reproduction.

Computer Systems Architecture Slide 43 of 63


Audio
Data Formats

Sampling an audio signal

Computer Systems Architecture Slide 44 of 63


Audio Formats
Data Formats

• Several popular formats are: WAV, AU, AIFF, VQF,


OGG, WMA and MP3. Currently, the dominant format
for compressing audio data is MP3.
• MP3 is short for MPEG-2, audio layer 3 file.
• MP3 employs both lossy and lossless compression.
– Analyses the frequency spread and compares it to
mathematical models of human psychoacoustics (the study
of the interrelation between the ear and the brain) and it
discards information that can’t be heard by humans.
– Then the bit stream is compressed using a form of Huffman
encoding to achieve additional compression.
Computer Systems Architecture Slide 45 of 63
Images and Graphics
Data Formats

• Colour is our perception of the various frequencies of light that


reach the retinas of our eyes.
• Our retinas have three types of colour photoreceptor cone cells
that respond to different sets of frequencies.
– These photoreceptor categories correspond to the colours of red, green,
and blue
• Colour is often expressed in a computer as an RGB (red-green-
blue) value, which is actually three numbers that indicate the
relative contribution of each of these three primary colours.
• For example, an RGB value of (255, 255, 0) maximises the
contribution of red and green, and minimises the contribution of
blue, which results in a bright yellow.
Computer Systems Architecture Slide 46 of 63
Images and Graphics
Data Formats

Three-dimensional colour space

Computer Systems Architecture Slide 47 of 63


Images and Graphics
Data Formats

• The amount of data that is used to represent a colour


is called the colour depth.
• HiColour is a term that indicates a 16-bit colour
depth.
– Five bits are used for representing the R and B components.
– Six bits are used for representing the G component,
because the human eye is more sensitive to G;

• TrueColour indicates a 24-bit colour depth.


Therefore, each number in an RGB value is
represented using eight bits.
Computer Systems Architecture Slide 48 of 63
Images and Graphics
Data Formats

RGB Value Colour


Red Green Blue
0 0 0 black
255 255 255 white
255 255 0 yellow
255 130 255 Pink
146 81 0 brown
157 95 82 purple
140 0 0 maroon

Computer Systems Architecture Slide 49 of 63


Digitised Images and Graphics
Data Formats

• Digitising a picture is the act of representing it


as a collection of individual dots called pixels.
• The word pixel was derived from the words,
"picture element".
• The number of pixels used to represent a
picture is called the resolution.

Computer Systems Architecture Slide 50 of 63


Bitmap Images
Data Formats

• Also known as raster-graphics format


• Used for realistic images with continuous variations in
shading, colour, shape and texture
– Examples:
• Scanned photos
• Clip art generated by a paint program
– Preferred when image contains large amount of detail and processing
requirements are fairly simple
• Input devices:
– Scanners
– Digital cameras and video capture devices
– Graphical input devices like mice and pens
• Managed by photo editing software or paint software
– Editing tools to make tedious bit by bit process easier

Computer Systems Architecture Slide 51 of 63


Bitmap Images
Data Formats

• Each individual pixel (pi(x)cture element) in a graphic


stored as a binary number
– Pixel: A small area with associated coordinate location
– Example: each point below represented by a 4-bit code
corresponding to 1 of 16 shades of gray

Computer Systems Architecture Slide 52 of 63


Bitmap Formats
Data Formats

• TIFF (Tagged Image File Format): .TIF


• GIF (Graphics Interchange Format): .GIF
• BMP (BitMaPped): .BMP
• JPEG (Joint Photographers Expert Group): .JPG
• PCX: .PCX (pronounced dot p c x)
– Windows Paintbrush software
• PNG: (Portable Network Graphics): .PNG
(pronounced ping)
Computer Systems Architecture Slide 53 of 63
Object Images
Data Formats

• A vector-graphics format describe an image in terms


of lines and geometric shapes.
– A vector graphic is a series of commands that describe a
line’s direction, thickness, and colour. The file size for these
formats tend to be small because every pixel does not have
to be accounted for.
• Vector graphics can be resized mathematically, and
these changes can be calculated dynamically as
needed.
• However, vector graphics is not good for representing
real-world images.
Computer Systems Architecture Slide 54 of 63
Object Images
Data Formats

• Created by drawing packages or output from spreadsheet data


graphs.
• Computer translates geometric formulas to create the graphic.
• Storage space required depends on image complexity
– number of instructions to create lines, shapes, fill patterns
• Cannot represent photos or paintings.
• Cannot be displayed or printed directly
– Must be converted to bitmap since output devices (except plotters) are
bitmap
• For Example : Objects seen in movies like Shrek, Toy Story,
The Incredibles, Madagascar.

Computer Systems Architecture Slide 55 of 63


Object Images
Data Formats

• Most object image formats are proprietary


– Files extensions include .wmf, .dxf, .mgx, and .cgm
• Popular Object Graphics Software
– Macromedia Flash
– Micrographx Designer
– CorelDraw : vector illustration, layout, bitmap creation,
image-editing, painting and animation software
– Autodesk AutoCAD
– W3C SVG (Scalable Vector Graphics) based on XML Web
description language
• Not proprietary
Computer Systems Architecture Slide 56 of 63
Bitmap vs. Object Images
Data Formats

Bitmap (Raster) Object (Vector)

Pixel map Geometrically defined shapes

Photographic quality Complex drawings

Paint software Drawing software

Larger storage requirements Higher computational requirements

Enlarging images produces jagged Objects scale smoothly


(rough) edges
Resolution of output limited by Resolution of output limited by output
resolution of image device

Computer Systems Architecture Slide 57 of 63


Video Images
Data Formats

• Requires massive amounts of data


– Video camera producing full screen 640 x 480 pixel true
colour image at 30 frames/sec 27.65 MB of data/sec
• Method depends on how video delivered to users
– Streaming video : video displayed as it is downloaded from
the Web server
• Example: video conferencing
– Local data (file on DVD or downloaded onto system) for
higher quality
• MPEG-2: movie quality images with high compression require
substantial processing capability
Computer Systems Architecture Slide 58 of 63
Video Images
Data Formats

• A video codec (Coder/Decoder) refers to the methods


used to shrink (narrow ) the size of a movie to allow it
to be played on a computer or over a network.
– Almost all video codecs use lossy compression to minimise
the huge amounts of data associated with video.
• Two types of compression:-
– Temporal compression
– Spatial (locative ) compression

Computer Systems Architecture Slide 59 of 63


Quick Review Question
Data Formats

1. What is the difference between ASCII and EBCDIC ?


2. What is UNICODE?
3. What is Bitmap representation?
4. Why Binary number system is used in computers?
5. In your own words describe the alphanumeric data
and give an example.
6. List the standards to represent the audio data.

Computer Systems Architecture Slide 60 of 63


Summary of Main Teaching Points
Data Formats

• Data must be converted from its native format into form


understood by processing device in order to be processed by
the CPU.
• All data represented within a modern computer system as
strings of binary digits, or bits.
• Each bit string has a specific data format & coding method.
• Numeric data stored using integer, real number, floating point
formats.
• Characters converted to numbers via coding table.

Computer Systems Architecture Slide 61 of 63


Question and Answer Session
Data Formats

Q&A

Computer Systems Architecture Slide 62 of 63


Next Session
Data Formats

Little Man Computer Model

Computer Systems Architecture Slide 63 of 63

You might also like