0% found this document useful (0 votes)
24 views16 pages

Datarepresentation 3

Uploaded by

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

Datarepresentation 3

Uploaded by

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

Computer

Science O.L.
(New Syllabus)

“Everybody should learn to program a computer,


because it teaches you how to think.”
- Steve Jobs

By Eng. Mohamed Kotb


Theory

01
Data
Representation
pt.3
Recap
8
Bit
Byt
\ x 8
102 e 102
4 \ x 4
102 Kibibyte 102
4 \ x 4
102 Mibibyte 102
4 \ x 4
102 Gibibyte 102
4 \ x 4
102 102
4
Tibibyte
\ x 4

Pibibyte
Recap
A computer is a device that receives input, does
processing on that input and then produces the
output.

Data
Text Images Numbe Videos Sound
rs

Data Representation
Data
Text Images Numbe Videos Sound
rs

How data is represented in the computer


system.
How to calculate its size in the memory of
computer system.
Numbers
We have already took how to represent
numbers .
1 and 0 are smallest component of computer ,so
its size is a bit each which is smallest computer
unit.
Its size depends on the register it will be stored
in.
Text
Text has no direct representation in computer
system.
Each character is indexed as equivalent number
to be dealt with

There are two character sets that used to index


the characters.

ASCII and Unicode


ASCII vs
Unicode
ASCII
A character set for all the character on a standard
keyboard.
Each character is represented using 8 bits (1
byte)

Unicod
e A character set which can represent all the
languages of the world.
Each character is represented using up to 32 bits (4
bytes)
ASCII vs
Unicode
Main advantage of using Unicode character set compared to ASCII character set :
Unicode allows for a greater range of characters and
symbols than ASCII (including different languages and
emojis)

Main disadvantage of using Unicode character set compared to ASCII character


set:
Text stored using Unicode takes up more storage space as Unicode requires more bits
per character than ASCII
Image
An image is a series of pixels, each representing one colour, that are converted to
binary and processed by the computer..

Image in computer has two factors.

Pixels /Resolution Color depth


Image
Image
Image size = Resolution x Color depth(in bits)

An image is 50 x 100 pixels and uses a colour depth of 16 bits. Find the size of an image taken
by this camera in KiB.
Sound
An audio file is converted to binary using sampling process to be processed by the
computer

Sound in computer has three factors.

Sampling Sampling Time(in seconds)


rate resolution
Sound
sound size = Sampling rate x Sample resolution x Time(in
seconds)

An audio file has a length of 80 seconds and sampling rate of 32 samples/sec. Each sample is
represented in 32 bits. Calculate the size of the file in Kibibyte
Quick question
An image is to be stored electronically. The image is 256 pixels high by 200 pixels
wide with a 16-bit color depth. Calculate the file size of the image in KiB. You must
show all of your working.
Quick question
A soundtrack has duration of 2 minutes and it’s sampled 1024 times per second. Each
sample is 16 bits. Calculate the size of the soundtrack in KiB. Show all your
working.

You might also like