You are on page 1of 3

Data Representation

The Extended ASCII Code


There are 96 printable characters but its not enough to accommodate foreign language.
So, ASCII was extended to an 8-bit code which allows 256 characters.
But no standardisation.
IBM, Apple has their own versions with different characters represented by the same code.
Atari and Commodore had their own operating systems, there were many different
versions of extended ASCII.

Unicode
To overcome multiple issues in ASCII Unicode Consortium was found and promoted
Unicode standard.
It is universal standard recognised and used by the major hardware and software
manufactures such as IBM, Apple, Microsoft, Oracle and Sun
Unicode can represent characters in all language.
Characters 0 to 127
Represent using the same codes as in 8-bit ASCII

Representation of Bitmap images


What is a pixel?
• The basic unit or the picture element of a bitmap image. The smallest single point of
colour in a graphic image.
What is resolution?
• The number of pixels per inch when the image is displayed on a monitor or on paper.
How are images represented and stored?
• As binary code
Image size
Written as two numbers.
Ex: 640 x 480, 22401 x 1680
1st number indicates the number of pixels along the width of the image.
2nd number indicates the number in the height.
*Refer the images in textbook in page 129*
Encoding the pixel information
Each pixel is represented by a bit pattern

0 represents black
1 represents white
Q1. Encode the pixel information of letter H as given in diagram
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------
*A complete image consists of 64 pixels and because 1 bit is used for each square, the size
of the image is 64 bits or 8 bytes
What is colour depth
The number of bits used to encode the colour of each pixel.
Number of colours = 2no of bits
If 1 bit --> Number of colours is 21
--> 2
If 3 bits --> Number of colours are 23
--> 2x2x2 = 8
Current standard represents the colour of each pixel in 24 bits.
There are 8 bits for each of the red, blue and green primary colours.
Therefore 256 variations of each primary colour which gives 256 x 256 x 256 or 16777216
different colours.
File size
File size = width x height x colour depth
Ex: File size of image in page 125(left hand image)
File size = 4288 x 2848 x 24
= 293 093 376 bits
= 36 636 672 bytes
Do Activity 11 in page 131
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------

You might also like