Open CompSci Notes - Unit 1 - MST Creator 2
Open CompSci Notes - Unit 1 - MST Creator 2
2023
Information Representation
and Multimedia
Unit 1
Abstract:
These are the notes for unit 1, Information representation in
multimedia for AS & A level Chemistry.
Note:
These notes may not be completely accurate so please forgive
me for any oversights, please contact me via website chat or
email if you find any problems.
Table of Contents
Table of Contents ............................................................... 1
Data Representation ............................................................. 3
Number Systems ................................................................ 3
Binary Numbering System ....................................................... 3
Conversions ................................................................. 3
Addition & Subtraction ...................................................... 5
Measurement of the Size of Computer Memories ................................ 9
Hexadecimal System ............................................................ 9
Converting Hexadecimal to Binary ............................................ 9
Converting Binary to Hexadecimal ........................................... 10
Use(s) of the Hexadecimal System ........................................... 10
Binary Coded Decimal (BCD) System ............................................ 11
Half Byte Method ........................................................... 11
Complete Byte Method ....................................................... 11
Uses of BCD ................................................................ 11
BCD Addition ............................................................... 12
ASCII & Unicode .............................................................. 12
Standard ASCII ............................................................. 12
Extended ASCII ............................................................. 12
Unicode .................................................................... 13
Multimedia ..................................................................... 13
Bit-map Images ............................................................... 13
Storing Bit-map Images ..................................................... 13
File Header ................................................................ 14
Vector Graphics .............................................................. 15
Vector Graphics vs Bit-map Images .......................................... 15
How to choose between the two .............................................. 16
Sound Files .................................................................. 16
Sound Varies ............................................................... 17
Vocabulary Time! ........................................................... 17
Pros & Cons of High Sampling Rate/Resolution ............................... 17
Data Representation
Number Systems
There are 3 main number systems which we need to be aware of.
We have already learnt this in IGCSE so I will summarize most of it into this
nifty little table:
Name Binary Denary Hexadecimal
Base Base-2 Base-10 Base-16
Example Uses Computers Everyday language Color codes
What does “base” mean?
When we say “base”, we are referring to the number of digits used by the
numbering system.
For example, the denary system is base 10 meaning it can use 10 digits (0 – 9).
Conversions
Binary to Denary
Let’s say we want to convert 11010001 to denary:
1 1 0 1 0 0 0 1
Now, write down the weightings above the digits:
128 64 32 16 8 4 2 1
1 1 0 1 0 0 0 1
Now, we multiply the weight values with the binary values:
128 64 32 16 8 4 2 1
1 1 0 1 0 0 0 1
128 64 0 16 0 0 0 1
Finally, add up the final values:
128 + 64 + 16 + 1 = 209
Now, the trick is to take the biggest weight which is smaller than the value and
put a one there.
In this case, 128 is the biggest weight which fits into 156.
128 64 32 16 8 4 2 1
1
Now, subtract the weight you chose in step one and then find the biggest weight
which is smaller than the answer.
In this case, 156 – 128 is 28.
The biggest weight which can fit in the number 28 is 16.
128 64 32 16 8 4 2 1
1 1
Now, do step 2 over and over until we have nothing left.
So, 28 – 16 = 12 and the largest weight which goes in 12 is 8.
12 – 8 is 4 and the largest weight which fits into 4 is 4.
So we end up with:
128 64 32 16 8 4 2 1
1 1 1 1
Now, fill the rest of the empty spaces with 0:
128 64 32 16 8 4 2 1
1 0 0 1 1 1 0 0
This means that the binary for 156 is 10011100.
Hexadecimal System
This system is very similar to the binary system with the only difference being
that it uses powers of 16.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
0 1 2 3 4 5 6 7 8 9 A B C D E F
0 0 0 0 = 0 0 0 1 0 = 2 0 1 0 0 = 4 0 1 1 0 = 6 1 0 0 0 = 8
0 0 0 1 = 1 0 0 1 1 = 3 0 1 0 1 = 5 0 1 1 1 = 7 1 0 0 1 = 9
These codes are stored in 2 ways:
Uses of BCD
BCD is used mainly to represent and perform operations on numbers.
BCD is used in accounting systems, calculators, clocks, etc.
One common question is that why not just use binary addition instead?
Well, the answer is that binary addition isn’t entirely accurate which is why we
do not use it in our systems (failing math exams because of your calculator is
nightmare fuel).
Instead, we use BCD which is much more accurate as compared to binary addition.
Extended ASCII
This character set is different to the standard ASCII set:
→ Consists of 8 bit codes (takes more space than standard ASCII).
→ Supports more languages (mainly European).
Multimedia
Bit-map Images
Bit-map image is an image made up of pixels stored in a 2D matrix.
A pixel is simply the smallest picture element which makes up an image.
The main difference between the two is that colour depth is related only to
colour but bit depth has many uses with a range to different file formats.
By Sarem Tahir Information Representation and Multimedia Page 13
AS Computer Science Multimedia 9/14/2023
Image Resolution vs Screen Resolution
Image resolution Screen resolution
This refers to the number of pixels it This refers to the number of horizontal
takes to form an image. and vertical pixels used to make the
The formula for this is: screen display.
The main difference between the two is that image resolution stays the same
(unless we reduce the resolution with compression) and is related only to the
image, screen resolution is related to the display and may change for computer to
computer (there are many resolutions from 800x600 to 1920x1080).
What Does Changing Resolution Do?
Resolution Type Change Effect
1. If the screen resolution was less than the image
Resolution
resolution before, then the image would become
Screen Increase
less fuzzy.
Resolution
Resolution 1. May become fuzzy if the screen resolution is less
Decrease than the image resolution.
Resolution 1. Image becomes clearer and carries more detail.
Increase 2. File size increases.
Image
1. Image quality may reduce due to lower resolution
Resolution Resolution
as the amount of pixels for the image is less.
Decrease
2. File size decreases.
Calculating File Size
To calculate the file size of an image, we use the following formula:
𝐹𝑖𝑙𝑒 𝑆𝑖𝑧𝑒 (𝑖𝑛 𝑏𝑖𝑡𝑠) = 𝑅𝑒𝑠𝑜𝑙𝑢𝑡𝑖𝑜𝑛 × 𝐵𝑖𝑡 𝐷𝑒𝑝𝑡ℎ
To find Bit Depth, we use the formula: To find resolution we use the formula:
𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝐵𝑖𝑡𝑠 = 2𝐵𝑖𝑡 𝐷𝑒𝑝𝑡ℎ 𝐻𝑒𝑖𝑔ℎ𝑡 𝑊𝑖𝑑𝑡ℎ
𝑅𝑒𝑠𝑜𝑙𝑢𝑡𝑖𝑜𝑛 = ×
(𝑖𝑛 𝑝𝑖𝑥𝑒𝑙𝑠) (𝑖𝑛 𝑝𝑖𝑥𝑒𝑙𝑠)
File Header
When we save a bit-map image, we need to include a file header which contains
items such as file type, file size, image resolution, etc.
Sound Files
Sound requires a medium through which it travels through, this is because sound
is transmitted by cause oscillations of particles within the medium.
Our ears pick up these oscillations and interpret them as sound.
Each sound wave has the following:
1. Frequency
2. Wavelength
3. Amplitude (determines the loudness of the sound)
Vocabulary Time!
Sampling Resolution: Number of bits used to represent sound amplitude (bit rate).
Sample Rate: Number of sound samples taken per second.
File Compression
Lossless & Lossy Compression
Lossless Lossy
This compression technique makes it so This compression technique deletes all
that we can decompress the file to get the data which does not contribute in
it original form back. making the original detail.
Examples include spreadsheets or Examples include mp3 files, mp4 files,
lossless JPEG. etc.
Applications
MPEG-3 or MP3 (Audio)
MP3 uses many audio compression techniques which allow us to reduce the final
file’s size to 90% of the original and gives us an mp3 file.
MP3 files are played by various devices such as music player, phones, computers,
etc.
While they do reduce the file size, they also reduce audio quality.
Obviously, this loss of quality is hardly noticeable but an mp3 file can never
match up to the quality of an original CD or DVD.
Perpetual Music Shaping
This is one of the techniques we use and it does the following:
Name Description
Removal of This is when we remove sounds which are outside the hearing
unneeded sounds range of humans.
This happens in sections where 2 or more sounds are played, we
Removal of Soft
simply remove the softer ones as they are masked by the louder
Sounds
ones.
Reduce the
sampling rate
Crop the image
Licence Information
AS Level Computer Science Notes (Chapter 1) © 2023 by Muhammad Sarem Tahir is
licensed under Attribution-NonCommercial-NoDerivatives 4.0 International. To view
a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/
License Deed
Information Representation
and Multimedia
Unit 1
Final Words
I hope this resource was useful for you!
This resource is just one of the many resources I have made
till now.
You can find all the other resources at my website.
This includes resources such as revision notes, topical past
papers, and many other helpful resources.