Professional Documents
Culture Documents
Information Systems 23-24
Information Systems 23-24
COMPUTER SCIENCE
https://quizizz.com/admin/quiz/6186cf7857708e001ec66b58/dat
a-representation
Information Representation
LEARNING OBJECTIVES
1.1.1 Number representation
Show understanding of the basis of different number systems
and use the binary, denary and hexadecimal number system.
Convert a number from one number system to another.
Success Criteria
ALL— will be able to state what hexadecimal
is and why it’s used, you will be able to
convert simple decimal numbers to
hexadecimal.
MOST— will be able to convert easily
between binary, denary and hexadecimal.
SOME— will be able to write negative denary
RECAP
B7
11*16 + 7*1
=176+7=183
128
76
1 0 0 1 1 0 0
DENARY HEXADECIM BINARY
AL
0 0 0000
1 1 0001
2 2 0010
3 3 0011
CONVERT HEXADECIMAL TO DENARY 4 4 0100
(1A9B) 5 5 0101
6 6 0110
7 7 0111
8 8 1000
EXAMPLE 9 9 1001
10 A 1010
11 B 1011
12 C 1100
13 D 1101
14 E 1110
15 F 1111
DENARY=746
AC2
101011000010
CONVERTING NEGATIVE DENARY
NUMBER INTO BINARY
LESSON OBJECTIVE:
10010100 Packed
8503
UN PACKED 00001000 00000101 00000000 00000011
Application2:
The screen of a calculator or in a digital time display.
a currency value $300.25 it is as a fixed-point decimal number (ignoring the dollar sign).
Application 3:
IBM and BCD IBM used the terms binary-coded decimal and BCD for six-bit
alphameric codes that represented numbers, upper-case letters and special characters.
Some variation of BCD was used in most early IBM computers, including the IBM 1620, IBM 1400 series,
and non-Decimal Architecture members of the IBM 700/7000 series. With the introduction of System/360,
IBM replaced BCD with 8-bit EBCDIC
ASCII CODE
ASCII code: If text is to be stored in a computer it is necessary to have a coding scheme that
provides a unique binary code for each distinct individual component item of the text. Such a
code is referred to as a character code.
The scheme which has been used for the longest time is the ASCII (American Standard Code for
Information Interchange) coding scheme. This is an internationally agreed standard.
There are some variations on ASCII coding schemes but the major one is the 7-bit code. It is
customary to present the codes in a table for which a number of different designs have been used.
The full table shows the 27 (128) different codes available for a 7-bit code. You should not try to
remember any of the individual codes but the re are certain aspects of the coding scheme which
you need to understand.
ASCII TABLE
41-hex
01000001
UNICODE
HTTPS://WWW.YOUTUBE.COM/WATCH?V=5AJKKGSE
UNY https://www.youtube.com/watch?v=5aJKKgSEUnY
LESSON 3
NEXT STEP:IMAGE,AUDIO
AND VIDEO FILES STORED.
IMAGES
Graphics on a screen are made up of tiny blocks called pixels.
The higher the image resolution, the more memory is needed to store the graphic.
The screen resolution tells you how many pixels CAN YOU TELL
your screen can display horizontally and vertically WHAT IS THE
RESOLUTION OF
THIS SCREEN
1024X768=786432 PIXELS
How many pixels do an image contains ?
For example, an image that is 2048 pixels wide and 1536 pixels high
(2048 x 1536) contains (multiply) 3,145,728 pixels (or 3.1 Megapixels)
The number of bits indicates how many colors are available for each pixel
1. In the black and white image, only two colors are needed. This means it has a
color depth of 1 bit.
EACH COLOR OF AN IMAGE IS STORED AS A
BINARY NUMBER.
IN THE BLACK(1)-AND-WHITE(0) IMAGE BELOW,
EACH PIXEL IS EITHER BLACK OR WHITE
2.A 2-BIT COLOUR DEPTH WOULD ALLOW
FOUR DIFFERENT VALUES: 00, 01, 10, 11.
At least eight bits per pixel are necessary to code a coloured image.
1. The number of bits per pixel is sometimes referred to as the colour depth.
(8 bits or 1 byte for 1 pixel in coloured image) (Computer Science Book)
As an example, consider that a bitmap file is needed to fill a laptop screen where the resolution is 1366 by 768.
If the colour depth is to be 24 then the number of bits needed is: 1366 X 768 X 24 = 25178112 bits
The result of this calculation shows the number of bits but a file size is always quoted as a number of bytes or
multiples of bytes.
Thus our file size could be quoted as:
25178112 bits = 25178112/ 8
= 3147 264 bytes
= 3147264 /1024
= 3073.5 kibibytes (3073.5 KiB)
= 3073.5 /1024
= approximately 3 MiB
Using the diagram above we are going to work out how many pixels are required to display a
EXAMPLE: single frame on a VGA (Video Graphics Array)screen.
Checking the resolution:
Height = 480 Width = 640
Area = Width x Height = Total Pixels
Area = 640 x 480 = 307200 pixels
Hence, it takes 307,200 pixels to display on a VGA screen!
EXERCISES:
1. A bitmap file is needed to fill a laptop screen where the resolution is 1247
by 564.
If the colour depth is to be 24 then the number of bits needed
2. A bitmap file is needed to fill a laptop screen where the resolution is 2134 by
756.
If the colour depth is to be 24 then the number of bits needed .
Image Created by a drawing package or a computer-aided design (CAD)
package to consist of a number of geometric objects
Vector graphics are made from geometric objects such as
circles and polygons.
The outcome is then usually for the image to be stored as a vector graphic file Unlike bitmaps, vector images are not
based on pixel patterns, but instead use mathematical formulas to draw lines and curves that can be combined to
create an image Vector graphics are made from geometric objects such as circles and polygons.
1. Vector images are edited by manipulating the lines and curves that make up the image using a program such as
Adobe Illustrator.
2. Vector images tend to be smaller than bitmap images because a bitmap image has to store color information for
each individual pixel that forms the image.
3. A vector image just has to store the mathematical formulas that make up the image, which take up less space.
4. The three most popular image formats used on the Web (PNG, JPEG, and GIF) are bitmap formats.
5. The Scalable Vector Graphics (SVG) format comes in a distant fourth due to a legacy of poor support for vector
graphics in early browsers.
6. Today however, all major browsers support the SVG (Scalable Vector Graphics) format. The dimensions of the
vector image objects are not defined explicitly but instead are defined relative to an imaginary drawing canvas.
In other words, the image is scalable
1. Bitmap formats are best for images that need to have a wide range of color
DIFFERENCE gradations, such as most photographs.
2. Vector formats, on the other hand, are better for images that consist of a few
areas of solid color. Examples of images that are well suited for the vector
format include logos and type.
Vector Graphics
Bitmap Images
VECTOR GRAPHICS USED IN
VECTOR GRAPHIC
WE DO NEED TO CONSIDER HOW THE DATA IS STORED AFTER THE IMAGE HAS
BEEN CREATED.
1. DRAWING LIST: List of Commands and attributes used in drawing
2. DRAWING PROPERTIES:
a. The properties include the basic geometric
data such as, for a circle, the position of the centre and its radius.
b.In addition properties such as the thickness and style of a line,
the colour of a line and the colour that fills the shape,
if that is appropriate, are defined.
3. DRAWING OBJECTS: Include circles , square, rectangle etc.
Natural sound consists of variations in pressure which is detected by the human ear.
A typical sound contains a large number of individual waves each with a defined frequency.
The result is a wave form in which the amplitude of the sound varies in a continuous but
irregular pattern.
If there is a need to store sound or transmit it electronically
the original analogue sound signal has to be converted to a binary code.
A SOUND ENCODER HAS TWO
COMPONENTS.
1. BAND LIMITING FILTER
2. ANALOGUE TO DIGITAL CONVERTER.
Analogue to digital convertor: Converts analogue sound into digital signals that can
be stored on a computer.
NOTE
ADC SAMPLING 1. The method of operation of the ADC is
described with reference to Figure.
2. The amplitude of the wave (the red line) has
to be sampled at regular intervals.
3. The blue vertical lines indicate the sampling
times. The amplitude cannot be measured
exactly;
4. instead the amplitude is approximated by the
closest of the defined amplitudes represented
by the horizontal lines in figure.
5. sample values 1 and 4 will be an accurate
estimate of the actual amplitude because the
wave is touching an amplitude line.
6. In contrast, samples 5 and 6 will not be
accurate because the actual amplitude is
approximately half way between the two
closest defined values.
DAC: CONVERTS DIGITAL SIGNALS STORED ON A
COMPUTER INTO ANALOGUE SOUND THAT CAN
BE PLAYED THROUGH DEVICES SUCH AS
SPEAKERS.