Data Flashcards
what is a character set?
a character set is a table that matches together a character and a binary value
what are the two common character sets?
ASCII and unicode
why are character sets necessary?
they allow computers to exchange data
Describe 3 differences between ASCII and unicode?
ASCII
- uses binary
- tiny set of characters
- less memory required per character
Unicode
- uses hexadecimal
- large set of characters
- more memory required per character
what does ASCII stand for?
American standard code for information interchange
how many different data types are there?
5
what is a character ?
give an example
a single character , such as a letter, number, punctuation or symbol
e.g. T 8 ?
what is a string?
give an example
a sequence of characters, including letters, numbers and punctuation
e.g. harry styles
14:50 pm
cinderella 2
what is an integer?
give an example
a whole number
e.g. 475
-84
10
what is a real?
give an example
a decimal number
- 5.21
0. 01345
what is a boolean?
give an example
an answer that only has two possible values
true/false
yes/no
0/1
what data type are telephone numbers stored as ?
string
what are the two main type of graphics used in a computer system?
raster (aka bitmap)
vector
describe 3 differences between raster(bitmap) and vector images
give examples
Raster
- made up of a grid of pixels
- if scaled to a larger size, image loses image quality
- generally larger in size as data is stored for each pixel
e. g. photographs and screenshots
Vector
- use objects (lines and shapes) to mathematically form shapes
- if scaled to a larger size, does not lose any image quality
- generally smaller in file size
e. g. logos and cartoons
formula to calculate file size
file size = resolution x colour depth
what is the colour depth/bit depth?
the number of bits that are used to represent each pixel’s colour
how many colours can be represented with a colour depth of 1 bit 2 bit 3 bit 5 bit 1 byte ?
1 = 2 colours 2 = 4 colours 3 = 8 colours 5 = 32 colours 1 byte (8 bits) = 256 colours
what is the RGB colour model?
the red green blue colour model uses 3 bytes (a byte of 256 red green and blue shades ) that together can represent 16.7 million different colours
what is metadata?
give examples of image metadata
metadata is additional information about a file
e.g dimensions colour depth make model orientation exposure time
what is metadata?
give examples of image metadata
metadata is additional information about a file
e.g dimensions colour depth make model orientation exposure time
an image file has a width of 120 pixels , a height of 120 pixels and a colour depth of 1 . what is the file size in bytes
resolution is height x width
120 x 120 = 14400
colour depth = 1 bit
file size = resolution x colour depth
file size = 14400 x 1 = 14400
file size in bytes = 14400 / 8 = 1800 bytes
how is an analogue sound wave converted to digital data (binary) ?
the sound is sampled using an ADC (analogue to digital convertor) and stored as a binary value called a sample
what is a sample rate?
what is it measured in?
- the number of samples taken per second
- measured in kilohertz (kHz)
explain 2 ways an audio file will be affected if the sample rate is increased
- the higher the sample rate the better the audio quality as the digital data more closely resembles an analogue wave
- higher sample rates result in larger file sizes because more data is stored for each individual sample
what is bit depth ?
the number of bits available to represent each sample
explain 2 ways an audio file will be affected if the bit depth is increased
- the higher the bit depth , the more bits are available to be used for each sample
- therefore the quality is often higher as the wave more closely resembles an analogue wave
- the file size will also be larger as each sample stores additional bits
what is bit rate?
what is it measured in?
the amount of audio data processed per second
measured in kilobytes per second (kbps)
an audio file has a bit depth of 8 , a sample rate of 10 and its 12 seconds long . What is the file size in bytes?
bit rate = sample rate x bit depth 8 x 10 = 80 bit rate x no. seconds = file size 80 x 12 = 960 bits to convert answer from bits to bytes dive by 8 960 /8 = 120 bytes
describe 3 benefits of compressing a file
- files take up less storage (so more files can be stored)
- can be transferred quicker (as they are smaller )
- files can be read from or written to quicker
describe the differences between lossy and lossless compression
lossy compression
- uses an algorithm to analyse a file and remove data that cannot be seen or heard by humans . e.g. frequencies (this reduces file size)
- further lossy compression will remove data that humans can see/hear
- removes data permanently so a file can never return to its original format
- often used with images , audio and video to reduce the file size
lossless compression
- reduces the size of a file without permanently removing any data
- this means the file can return to its original format when decompressed so quality is not lost
- larger file size as no data has permanently been removed
- used with files that would not work if data was removed e.g. executable files or word documents
a text file was 72KB and was compressed to 8KB. state the compression ratio
72/8 = 9:1
a 20 MB file is compressed with the ratio of 5:2. what is the size of the compressed file?
compression ratio formula
compression ratio = original file size / compressed file size