The method of data representation in a computer
system depends upon the type of data which is
Three types of data are considered at this stage:
The Binary System
Regardless of the type of data, all data is ultimately
stored as binary numbers.
A computer is known as a two state machine because
the processing and storage have two states only.
“On” or “Off”
On – 1
Off – 0
The computer is a two-state (binary) machine. All
components inside a computer and all backing
storage devices have only two states. e.g.
• a switch is “on” or “off”
• a transistor conducts or does not conduct
• a signal is a pulse of electricity or no pulse
• an area of magnetic disk is positive or negative
• a laser can direct in two different directions
Advantages of Binary
1. Less arithmetic rules need to be built into the
computer, making calculations simpler.
e.g. only four rules:
0 carry 1
2. Less chance of signal degradation as each line
carries a voltage or no voltage.
3. Two states are easy to represent in storage
e.g. the presence or absence of a pit oon the surface of a
Units used in binary
Remember the units used in the binary system.
1 byte =
1 Kilobyte =
1 Megabyte =
1 Gigabyte =
1 Terabyte =
2048 Kilobytes = ?
A. 1024 Megabytes
B. 1 Gigabyte
☺C. 2 Megabytes
D. 4096 bytes
3 Gigabytes = ?
A. 24 Terabytes
☺B. 3072 Megabytes
C. 24 Kilobytes
D. 3072 Terabytes
Converting between units
1. Gary uses a 2Gb memory stick to store is
music. How many 4.5Mb Mp3 files can Gary
store on his stick?
2 Gb = 2048/4.5 = 455 mp3’s
2. Calculate the file size of this black and white
700 * 1200 = 840000/8
= 105000 bytes
= 102.5 Kb
Numbers are classified as real numbers or integers.
Real Numbers (single)
All numbers including whole and
Whole numbers that can be positive
e.g. -18, -98
When numbers are represented electronically, the
base number is 2.
Convert binary numbers to decimal numbers
Convert the following 8 bit binary numbers:
Convert decimal to binary
Demo on board
There are two method used to store negative
numbers in a computer system.
This is when the negative of a number is obtained.
1. Find the positive binary number
2. Change the 1’s to 0 and the 0’s to 1
3. Add 1
1. Positive 35 = 00100011
2. Change the numbers = 11011100
3. Add 1 = 1101100
-35 = 11011101
Floating Point Representation
Positive numbers – Positive Numbers can be converted
directly to their equivalent binary number.
Negative numbers - Two’s Complement
Real Numbers (decimal point) and very large numbers Floating Point Representation
Floating Point Representation is when two parts are used
to store a number.
M * base
M - Mantissa (actual number)
E - Exponent (power to which the base is raised)
The range of numbers that can be stored depends on the
number of bits being used.
To find the range of numbers - calculate of the power and
half it. The positive range will be one less than the
negative range as it includes zero.
If you increase the exponent then you increase the
range of numbers.
The more bits the more precise the mantissa will be.
If there is not enough bits set aside for the mantissa
the system has to round it down losing precision.
Each character has a unique 8 bit ASCII code associated
with it and this code is converted into binary before being
To store all the characters on a keyboard only 7 bits are
needed but very often 8 bits are used.
2^7 = 128 different characters
2^8 = 256 different characters – extended ASCII which
allows additional characters.
The set of characters represented by a computer. All
numbers, letters and symbols.
ASCII characters that do not print on the screen in the
normal way. There are 32 special characters, for
example, Space bar, return, tab, cursor up
The increase in worldwide communication led to a need for
a larger standard code to cope with other foreign
alphabets, technical symbols etc.
Designed to represent the writing schemes of all of the
world’s major languages.
Unicode is a 16 bit code and can represent 65536 different
Applications such as Office use Unicode in document files.
Mobile phones use Unicode to support all the different
Can store 65536
Only 8 bit code
which takes up
less storage than
Can store 65536 characters
Only 8 bit code which takes up
which can represent world wide
less storage than Unicode
will take up
which will take up represents only
An image can be stored in memory in two ways:
Bit-mapped and Vector graphics
An image on a computer screen is made up of tiny dots
called pixels. (Picture element)
Each pixel can be “on” or “off” depending whether the
value of the pixel in the computers memory is 1 or 0.
(Black & White)
The smaller the size of pixels the finer the detail that can be
displayed on screen.
Small pixels = high resolution
Large pixels = low resolution
Increasing the resolution will increase the storage
requirements of the image.
Features of a Bit Mapped Image
Bit mapped packages paint pictures by changing the colour of
the pixels which make up the screen display.
A commonly known package used for bit mapped is a paint
Advantages of Bit-Mapped
• Each pixel can be changed individually i.e. colour
• Edit a bit mapped graphic by deleting pixels anywhere on the
Disadvantages of Bit-Mapped
• Bit-Mapped images require a large amount of storage
space, as every pixel is stored including white space.
• Does not take advantage of resolutions.
• Once they are enlarged to much, they look unnatural
and blocky. But reducing a picture too much also has a
bad influence as it looses sharpness.
Features of Vector Images
Object is represented by a series of object attributes. It
stores a description of the objects that make up the image.
It stores mathematical definitions of:
• The shape of graphic objects
• Their position on the screen
• Their attribute such as fill, line colour, pattern
The value of each of the objects attributes are stored in
memory as binary.
Advantages of vector images
• Take up less storage space
• Do not lose their quality when resized
• Objects can be grouped to form larger objects
• Images are resolution independent. The picture will be
printed out at the full resolution available on the printer.
Disadvantages of vector images
• User cannot edit individual pixels
• Complex objects with many layers can demand a lot of
Refers to the number of pixels in the width and height of the image.
Refers to the number of bits needed to represent the colour of
each pixel. Greyscale simply means shades of grey and so each
shade needs its own code.
16 Million Colours (true colour)
Increasing the number of colours that are available increases the
size of the code for each colour.
Calculation of memory and backing storage
requirements for bit mapped image.
Storage requirements = total pixels
number of bits used to
represent colours or
shades of grey
How much memory will the following screen require (Black &
• Calculate the total number of pixels
• Multiply by the number of bits per pixel
36 x 80 = 2880 pixels
2880 bits/8= 360 bytes
• Divide by 8 (to change into bytes)
How much memory will the following screen require (Greyscale)
Greyscale uses 4 colours
2 bits per pixel
640 * 200 = 128’000 pixels
128’000 * 2 = 256’000 bits
256’000/8 = 32’000 bytes
How much memory will the following screen require (Colour)
An image is 640 x 200 and has a
colour depth of 8 bits. What is
by the number
of bits per
by 8 (to change into bytes)
• Calculate the total number of pixels
640 x 200 = 128000 pixels/bits
640 x 200 x 8 (colour depth) = 1024000 bits/8
= 128000 bytes/1024
= 125 Kb
Calculation storage requirements for a single image
An image is 7 x 5 pixels, and
each pixel can display 65536
= (7 x 72) X (5 X 72)
65536 colours = 16 bits
= 504 X 360
= 181440 X 16
= 2903040 pixels/8
= 362880 bytes/1024
= 354.4 Kb
Calculate the following
Calculate the storage requirements of an image with 4 x 6
inches, has a resolution of 800 dpi and each pixel can
display 256 different colours.
Calculate the storage requirements of an image with 8 x 12
inches, has a resolution of 1200 dpi and each pixel can
display 65536 different colours.
An A4 image, at 10 x 8 inches, has to be scanned at 300 dpi
in 65536 colours. Calculate the storage requirements.
Images using 24-bit colour graphics will be of an extremely
Images using 24-bit colour can require several megabytes of
memory for storage and can take time to transmit across a
File compression can be used to reduce storage
The result looks unchanged to the human eye.
A process that reduces the number of bytes required to
define an image in order to save disk space or
Compression is achieved by replacing commonly
occurring sequences of pixels with shorter codes.
Solves the problem by:
• Reducing the file size
• Reducing the time taken to transmit the file across a
Types of Compression
There are two types of compression:
A lossless compression method reduces the size of the image
with no lost information. The decompressed image is exactly
the same as the original image.
No data is discarded. GIF is an example of lossless
How does it work?
Uses an algorithm to store patterns of bits that occur
Refers to data compression techniques in which some
amount of data is lost. Lossy compression technologies
attempt to eliminate redundant or unnecessary information.
JPEG is an example of this type if compression.
MORE ABOUT THIS IN UNIT 3 - MULTIMEDIA