Here is the data storage units numbered from smallest to largest:
1. Bit
2. Byte
3. Kilobyte
4. Megabyte
5. Gigabyte
6. Terabyte
7. Petabyte
8. Exabyte
9. Zettabyte
2. Image Representation
• Each box represent one pixel
• 8 X 8 bit map image
• Image size is 64
• Bitmap image -
• JPEG
• GIF ect…
3. Bitmap graphics: A bitmap file stores the position and color of every
pixel that makes up an image. The image is made of millions of pixels
and the color of each pixel is stored using a number code. A bitmap is a
good way to store photographs.
Vector graphics: A vector image is made up of shapes constructed from
lines. The computer stores mathematical formulas that tell it how to draw
shapes and lines. A vector file is smaller than a bitmap file. Vector
graphics are good for images made of simple lines and shapes, for
example, cartoons, diagrams, and graphs.
Images in digital form
4. • If a bitmap image is made larger, all the dots get
bigger and the image looks distorted. This is called
pixelation.
• Pixelation does not affect vector images, they are
drawn to the correct size using the stored
mathematical formulas
Pixelation
5. • Bitmap images are made up of a two-
dimension matrix of pixels.
• Each pixel is represented by a binary number.
• The bitmap image is stored as a series of
binary numbers
• A black and white image needs only one bit per
pixel (0 or 1)
• If each pixel is represented by 2 bits, then the
pixel can be one of these four colors. (22 = 4), 00,
01, 10, 11
Bitmap Images
6. Colour depth: The number of bits used to represent
each color is called bit depth
If 8-bit color depth means that each pixel can be one
of 256 colors ( 28 = 256)
Image resolution: Number of pixels that make up an
image.
• An increase in the image will increase the file size
Bitmap Images
7. Representation of Sound
• Each sound file has a wavelength, frequency,
and amplitude.
• Sound is analog, so sound waves need to be
sampled to be stored in the computer.
• Sampling means measuring the amplitude
of the sound wave. This is done by ADC.
• To convert analog data to digital, the sound
waves are sampled at regular time intervals.
8. Fundamentals of Sound
Sound Wave
• Sound is about vibration. Any sound requires a source, such as a
human voice or musical instrument, and a substance to travel
through
• These vibrations consist of the motion of particles back and forth,
knocking with each other and creating a sound wave: an
analogue signal that travels in the air.
9. Fundamentals of Sound
Amplitude or volume
• The amplitude is the intensity (or height) of the sound wave. It
relates to the amount of energy the wave carries and it is
measured in voltage (V).
• If calculated from the crest, it will have a positive peak of energy,
for example 10V
• If calculated from the trough, it will have a negative peak of
energy, for example -10V
10. Fundamentals of Sound
Time period (Duration)
A wave has a repeated pattern, and one completed repetition is
called a cycle (or frequency).
Time period is the time necessary to complete a cycle. A complete
cycle occurs when the sound wave passes between two consecutive
points. This can be:
• Two consecutive crests
• Two consecutive troughs
The formula for calculating the time to complete a cycle is:
Time period = 1 / frequency
11. Fundamentals of Sound
Frequency
• The frequency is the number of completed cycles per second of a
sound wave.
• To calculate the frequency of a sound wave, you need to calculate
the time it takes to complete one wave cycle. The unit used to
measure frequency is named hertz (Hz). One hertz is one cycle per
second.
•
• For example, a frequency of 1 hertz means that the wave has one
cycle per second.
13. Sampling sound
A technique used to convert a sound from analogue to digital is sampling.
While sampling a sound, the computer takes measurements of the analogue
signal at regular time intervals, and then a unique bit pattern of binary numbers is
assigned to each sample. After that, the digitised sound can be stored and
processed by a computer as a sequence of 1,1s and 0,0s.
15. Representation of Sound
Sample resolution: The number of bits per sample
is known as sample resolution (bit depth)
Sampling Rate (frequency): The number of
sound samples taken per second. This is measured
in hertz (Hz).
1 Hz = 1 sample per second
CDs have a 16-bit sampling resolution and a 4.1
kHz sample rate, that is 44100 Hz samples every
second. This gives high-quality sound.
17. Image Calculation
File size = horizontal pixels × vertical pixels × bit depth
-------------------------------------------
8(to convert to bytes) × 1024 (kilobytes)
Bit Depth (Bits Per Pixel) Number of Colours or Tones Where do # of Colours Come
From?
1 2 21=2
2 4 22=4
3 8 23=8
4 16 24=16
6 64 26=64
8 256 28=256
18. Image File Calculation
A 500dpi image that measures 7 inches by 6 inches with the availability of
65,536 colours would result in the following calculation:
19. Exam Style Questions
How many bits per pixel would need to be
used if an image used 4 colours instead of 2?
2 bits
2 power 2 = 4
20. Exam Style Questions
The image below contain a black and white image consisting of 36 pixels.
Explain why 36 bits are needed to represent the pixels in the image .
Two colours needed in the image so two
possible bit pattens needed 36 pixeles so
36 bits needed
21. Exam Style Questions
A bitmapped image with a colour depth of
one can represent images that use two
colours.
How many more colours can be represeted
in an image if the colour depth is increased
from one to four?
14
16- 2 = 14
23. Audio file Calculation
• Sample rate in Hz
• bit depth/ Bit Resolution
• Length
• Number of channels (mono /Stereo)
Sample rate Bit Resolution
11.025kHz 8 Bit
22.05. kHz 8 bit
44.1 kHz 16 bit
Sample rate X Bit Resolution X Time (seconds) X Channel
Audio file Size = ________________________________________________
8(to convert to bytes) × 1024 (kilobytes)
24. Audio File calculation
Bit Rate: Every second how many bits are taken in that audio. Bit rates are
usually measured in kilobits per second (kbps).
Bit rate = sample rate X bit resolution X Channels
----------------------------------------------------
1000
25. Audio File calculation
What if the audio is 1 Minute, with a 16 bit resolution and
44.1kHz with the stereo channel. What would be the file size?
Size =( 44.1 X 1000 X 16 X 60 X 2) / ( 8 X 1024 X 1024)
= 10.09 MB
Bit rate = 44100 X 16 X 2
------------------- = 1411.2 kbps
1000
26. Audio File calculation
Five minutes of music is sampled at 40000 samples per second, and
each sample is encoded into 16 bits(2 bytes). How big will the
resulting music file be?
5 minutes =300 seconds. So there are 300 X 40,000.
Each sample occupies 2 bytes, making a file size of
= 300 X 40000 X 2 bytes
= 24,000000 bytes
= 24 MB
27. Audio File calculation
Five minutes of music is sampled at 8000 samples per second,
and each sample is encoded into 16 bits(2 bytes). How big will
the resulting music file be?
29. Lossless Compression
Breaking up the files into “smaller” form for
transmission or storage and then putting it back
together .
Example:
• Text Files
• ZIP files format
• UNIX tool GZIP G
• GIF
30. Lossy Compression
These programs simply eliminate "unnecessary" bits of
information, tailoring the file so that it is smaller. This type of
compression is used a lot for reducing the file size of bitmap
pictures, which tend to be fairly bulky.
Example:
• JPEG
• MP4
• MP3
31. An image is 3072 pixels by 2304. Calculate:
• The total number of pixels in the original image
• The number if bytes occupied by this file
• The file size of the jpeg image ( in MB) if the original image
was reduced by a factor of 5
• How many uncompressed file of the size calculated in
above could be stored on a 4 gigabyte memory card.
• How many compressed files of the size calculated above
could be store in 4 gigabyte memory card
Activity -1
32. Storage
size
Document / Spread
sheet
Database ( MS ACCESS)
1 Byte Single character in text
Whole number 0 to 255
Text data type
Whole number (-128 to +127) ---Number /
BYTE data type
Yes/ NO data type
2 byte A single character for a
large Asian character set
The whole number (-3200 to +3200) -----
Number/ Integer / Short data type
4 Byte Whole number between - 2
billion to +2 billion
Single precision/ Floating
point
Number/ Long Integer type
Number / Single data type (6 decimal digits)
8 bytes Double precisions Floating
Point (15 digits)
Massive whole numbers
Number / Double Data type
Date/Time Data type
Currency Data type
TEXT / Database file Size Calculations
Standard data types size:
33. Usually text files uses ASCII format. It code the text files in denary or
hexadecimal. (RLE – Run Length Encoding)
The phrase
“ THIS SECTION SHOWS YOU HOW THIS WORLD” 35
“1 SECTION S2S Y3 2 1 W3LD WORK” 23 mem ory units
Text File Compression
Repeated word THIS is replaced as number 1
HOW and OU is replaced as number 2 and 3
Spaces are ignored and 33% of file size saved
Text files uses the Lossless file compression.
35. Estimate the file size of the word document which contains 2000
characters and a small image which is 300 X 300 pixels in size with 8
colors. Assume an extra 20 KB for other document features.[4]
Characters = 2000 bytes
Image size = 300 X 300 X 3 = 270000 bits = 33750 bytes
Extra = 20 KB = 20480 bytes
Exercise - 1
File size = 2000 +33750 + 20480 = 56230 bytes = 54.9 KB
Or
= 2000 + 33750 + 20000 = 55750 / 1000 = 55. 7 KB
36. A database is to contain a person’s name and their address.
Decide the maximum number of characters you would need to input a
name and an address.
Estimate the maximum size of files needed to store the name and address.
Exercise - 2
37. A security system contain a password (16 characters long), a username(20
characters long), a small photo(256 X 640 pixels in size) and a security
questions ( up to 72 characters long). Estimate the file size needed to store
all this data
Exercise - 3
38. MIDI - Musical Instrument Digital Interface
MIDI files are not music and don’t contain any sounds
MIDI represents the information needed to recreate
a performance as many individual pieces of data.
MIDI is a communications protocol that allows
electronic sounds to interact with each other
39. MIDI Devices Devices that can be controlled with MIDI
include:
Keyboards
Synths
Effects units
MIDI Interface/Control Devices
Lighting Boards
Mixers
Computer Programs – computers
Fireworks
MIDI - Musical Instrument Digital Interface
40. MIDI - Musical Instrument Digital Interface
MIDI Cable – 5 pin DIN
connectors
MIDI Interface – Multiple inputs and outputs
which can digitally route MIDI Messages on
the fly, much like a patch bay.
41. This is a typical
MIDI/Computer
setup.
Additional devices can either be routed by the interface or
connected to the MIDI THRU of the preceding device.
Devices can be directly routed to one another without the
need of a computer or interface
MIDI Setups
42. MIDI commands
• The fist byte is the status byte – Informs the MIDI device
what function to perform.
• MIDI has 16 channels( 0 to 15)
• Pitch Byte – tells which byte to play)
• Velocity Byte – tells how loud to play notes
• Note on/off - tells that a key has been pressed/released
• Key pressure - tells how loudness of the music note
43. Sequencer Software is needed to play back
the MIDI files in any instrument.
MIDI files may be converted to MP3, WAV,
WMA, FLAC, OGG, AAC, MPC on any
Windows platform using Total Audio
Converter
MIDI
44. Upload
Uploading means data is being sent from
your computer to the internet
Example :
• Sending Email
• Positng photos on social
media
• Using webcam
45. Download
Downloading means data your computer is
receiving data from the Internet the internet
Example :
• opening webpage
• Receiving email
• Purchasing any files
• Watching online videos
46. A company which offers the following Internet broadband
transfer rates:
• 56 megabits per second DOWNLOAD
• 16 megabits per second UPLOAD
If each music track is 3.5 megabytes in size, how long
would it take Juan to download his 40 tracks?
40 tracks = 40 X 3.5 = 140 MB
56 megabits/sec = 7 Mbyte/sec
Time take to download the tracks = 140/7
= 20 Seconds
47. Dima has agreed to send Michaela a 20 megabyte file. They both have a broadband
connection. Dima has to upload his file to a server and then Michaela needs to
download it from the same server. The broadband data transfer rates (speeds) are:
1 megabits per second to upload a file
8 megabits per second to download a file
(Note: 8 bits = 1 byte)
a. How long does it take to upload Dima’s file?
b. How long does it take to download Dima’s file?
48. A company advertises its Internet broadband speeds as follows:
• download speed of 128 megabits per second
• upload speed of 16 megabits per second (8 bits = 1 byte)
a) Explain what is meant by the two terms download speed and
upload speed
(b) How many 4-megabyte files could be downloaded per second
using this company’s broadband
49. David has a photo that is 2MB. How many of these can he store
on his 3GB memory stick?
3 * 1000 = 3000
3000 / 2 = 1500
50. Number the data storage units from 1 (smallest) to 9 (largest).
The first one has been done for you.