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