3.2: data representation Flashcards
how is text represented
represented by using a character set
ASCII
an example of a character set
can represent most letters, numbers and symbols by using only 1 byte
extended ASCII
first 128 values same as ASCII
ASCII but with more characters
unicode
limited to 256 characters
only useful in countries that have adopted the latin alphabet
includes technical symbols, punctuation and other characters
how many characters in unicode limited to
256
how are images represented
binary code is used to represent photographs and other images using bitmap
bitmap image
consists of a grid of squares called pixels
each pixel has its own position in the grid
each pixel is a single colour
what is used to represent the colour of a pixel
binary code
colour depth
the number of bits used to store each pixel’s colour
the greater the colour depth the more colours can be represented
3 colour depths
8-bit gradient
8-bit gradient, dithered
24-bit gradient
colours
combinations of: red, green and blue
any colour can be encoded as a set of 3 numbers
true colour
allocates 1 byte for red 1 byte for green and 1 byte for blue
this has a 24-bit colour depth( 3*8 = 24)
image resolution
clarity of an image
when you zoom into a bitmap image the pixels are streched so the quality is poor when you zoom in too much
how is image resolution expressed
the number of pixels that an image contains per inch
example: 300 ppi (pixels per inch)
image resolution (size of bitmapped graphic )
the size in pixels
width(in pixels) * height(in pixels)
image file size
width(in pixels) * height(in pixels) * colour depth
or image resolution(in pixels) * colour depth
example: 8 * 8 * 4 = 256 bits
effects of higher resolution and colour depth
image is represented more accurately
larger file size
metadata
additional information needed to able to read the binary data correctly and reproduce the image
addition information is image size and colour depth
common file formats of bitmap graphics
bitmap
PNG (portable network graphic)
JPEG (joint photographic experts group)
GIF (graphics interchange format)
sound
a vibration that travels through air
sound waves
sound requires a source such as a human voice or musical instrument and a substance to travel through such as water or air
anologue signal
particles vibrating and creating a sound wave
how to convert sound to a series of binary numbers
digitisation converts analogue sound to a series of binary numbers
amplitude
from center of wave to crest or trough
the height of a wave which relates to the amount of energy the wave carries measured in volts
higher amplitude waves
carry more energy and are louder than waves with a lower amplitude
time period
the time necessary to complete a cycle which is the wavelength
formula for time period
time period = 1 / frequency
frequency
the number of completed cycles per second
high frequency
high pitch is produced
low frequency
low pitch is produced
cycle
when the sound wave passes between 2 consecutive points (crests or troughs)
how to calculate frequency
calculate time taken to complete 1 cycle
unit is hertz(Hz)
1 hertz is 1 cycle per second
sampling a sound
called sampling
the computer takes measurements of the anologue signal at a regular time intervals and converts it to a binary pattern
calculating sample rate
how many times a sound is sampled per second
measured in hertz
sample intervals
the time between 2 samples
the larger the sampling interval the lower the quality and the smaller the file
sample resolution
number of bits used to represent each sample
increasing sample rate
the higher the sampling rate the better the quality of the audio recording but it increases the size of the file