Fundamentals of data representation Flashcards
What is ASCII?
American Standard Code for Information Interchange - a character set that PCs sometimes use.
How many bits does ASCII use for each character?
7 bits
How many possible symbols can ASCII code?
128 possible unique symbols.
What is Unicode?
A new standard for representing the characters of all the languages in the world - chinese, arabic, japanese and greek characters.
How many bits does Unicode use for each character.
8-32 bits per character, uses same codes as ASCII up to 127.
Why are sound waves converted from analogue to a digital format?
It can only be stored in a numerical representation using an Analogue to Digital Converter (ADC).
How is the analogue signal from sound waves converted to a digital format?
- Analogue sound is received by a microphone
- This is converted into an electrical analogue signal
- Signal amplitude is measured at regular intervals (sampled)
- Values are rounded to a level (quantisation)
- Values are stored as a series of binary numbers
What is a sample?
Measure of amplitude at a point in time.
How can sound quality be improved?
Sample the sound more frequently and the runback will be smoother as well.
Explain what data compression is.
Compressing files
Why is data compressed?
Reduce amount of storage needed on a computer to save files.
Allow large files to be transmitted as an email attachment (reduces file size to allow users to send it).
Allow a file to be transmitted in less time (smaller file size)
Explain lossy compression.
Data encoding method: files are compressed by removing some of the detail. Used to compress images, audio files and video files.
Give an example of lossy compression.
Photographs can be stored using fewer colour so fewer bits are needed per pixel.
Explain lossless compression.
Data encoding method: files are compressed but no data is lost - essential factor for text and data files. Used to compress data files before attaching them to an email.
Give an example of lossless compression.
Bank records must keep all data - cannot transmit a bank statement and miss out zeros!
What is .jp?
JPEG, lossy - good for photographs
What is .gif?
Graphic Interchange Format, lossless - good for images with large areas of solid colour, ideal for web graphics.
What is .mp3?
MP3, lossy - Audio files: designed for downloading music from internet, can fit 120 songs in MP3 format.
What is .bmp?
Bitmap - uncompressed still image.
What is huffman coding?
Data compression technique, reduces the number of bits used to represent each letter - more frequently a letter appears in text, fewer bits used to represent it in text file.
How is data compressed using huffman coding?
Uses binary tree structure, consists of root nodes and a number of nodes and branches. Each node has exactly one branch entering it and zero, one or two branches leaving. Root node has no branches entering it.
How do you calculate the number of bits required to store a piece of data compressed using Huffman coding.
Finding coding for each character by path taken from root node to the character. Left branch = 0, right branch = 1.
Add total number of bits.
How do you calculate the number of bits required to store a piece of uncompressed data in ASCII.
total bits x 7
Explain how data can be compressed using run length encoding (RLE).
Lossless data compression - runs of data are stored using frequency/data pairs.
What is a run in reference to RLE?
Consecutive repeating data.