Data Representation Flashcards
what happen when an overflow error occur. Eg giving the answer in 8 bits binary number what is
11010001
+10010100
you ignore the overflow to give answer in 8 bits
01100101
it lead to crash if software dont know how to deal with the extra bit,
it also lead to loss of data and inaccuracy
why programmers ofter prefer hex when coding
- easier to remember large number in hex
- less change of input error as it is short
- easier to convert between binary and hex than binary and denary
what is character set
collections of characters that a computer recognises from their binary representation
how are sound stored
sound is sampled from analogue ( continually changing data) and stored and converted into digital
what effects the size and quality of sound file
File size = Sample rate (Hz) * bit depth * duration (s)
- sample rate(frequency) how may samples per second measured in Hz or kHz common sample rate is 44100 samples per second (44100Hz)
increase in this lead to better quality and will be more closely match to the original recording
- bit depth is the number of bits available for each sample
increase in the can pick up quiter sounds result in a sampled sound closer to original recording
what are the uses of compressing files
- smaller file take up less storage space on a device
- stream and download files faster and it takes up less bandwidth
- allows webpages to load quicker
- email restrict the size of attachment you can send, by compressing it allows you to…
pro and cons of lossy and lossess and their file formats
lossy - MP3, AAC, JPEG
pro: greatly reduced file size, take up less bandwidth , commonly used
cons: lose data and cant be turned back to original;
cant be used on sext or softwares that need to retain all the info of the original;
worse quality than original however it is unnoticeable
lossless - FLAC, TOFF, PNG
pros: no reduction in quality, can be decompressed , can be used on text and software files
cons: only a slight reduction
how are images stored?
Images are stored as pixels
with colour of each pixel is represented in binary and the number of colour is related to the numbers of bits the code has
increasing the rage of shades and colour can also be achieved by increasing the number of bits for each pixel
colour depth is
number of bits used for each pixel
formula for total number of colours
2^n
file size (in bits) =
image resolution * colour depth = width * height * colour depth