Chapter 9 - Binary Representations Flashcards
Why was ASCII invented?
All companies before ASCII sent data using different codes
What is a character set?
A list of binary codes that can be recognised by computers as being useable characters
How to convert between character to its ASCII code in python?
Print(ord(‘d’)
How to convert between ASCII to character in python
Print(chr(67))
How many bits was the original ASCII character set?
7-bit or 2**7
How many bits was the extended ASCII character set?
8-bit or 2**8
Why was UNICODE invented?
Different companies created different extended ASCII charcetr sets and 256 codes (2**8) wasn’t enough
What is UNICODE
A character set incorporating ASCII, extended ASCII and, with 4 bytes per code, enough for 2**32 = 4.3 billion characters
What does a digital camera do with a snapshot?
breaks it down into pixels (picture elements)
What is the formula for the total number of pixels
total number of pixels = width x height
What does the higher resolution of a camera do?
Makes the image clearer
What is each pixels colour encoded into binary dependant on?
the colour depth
What is colour depth?
The number of bits used to encode the amount of Red, Green and Blue in a pixels colour
What is a common colour depth?
3 bytes ( 1 for red, 1 for green and 1 for blue)
What is the total number of shades a particular colour depth can represent?
2**number of bits
What is the calculation for total graphic file size?
Total graphic file size = pixel width x pixel height x colour depth
What is metadata?
Data about data
Give examples of metadata
Data & time photo was taken
The make, model, etc. of the camera
Location where photo taken
Any edits done to photo
Owner of photo
What are some disadvantages of analogue recordings
Bulky, degraded, hard to edit, limited storage capacity and hard to copy
What does bulky mean?
the cassette or record was large and cumbersome to transport
What does degraded mean?
if handled poorly, record could scratch and cassettes could be wiped by magnets
What does hard to edit mean?
Without expensive equipment, people couldn’t edit music or create musicL
What does limited storage capacity mean?
A record could store around 40 minutes of audio and a cassette could store about 80 minutes
What does hard to copy mean?
Only expensive equipment could do that
How do you work our audio file size?
Audio file size = song duration in seconds x sampling frequency x bit depth x number of channels
What is a low sample rate?
20kHz or sample rate of 20,000 times a second
What is a high sample rate?
40kHz or sample rate of 40,000 times a second
What is normal audio recording sample rate?
44.1kHz
What frequencies can the human ear hear up to?
20kHz
What frequencies can a 20kHz sample rate capture
10kHz
What frequencies can a 40kHz sample rate capture
20kHz
What are the advantages of digital audio?
-Easy to transport digital audio
-Cheap to edit n copy
-Doesn’t degrade
-Thousands of songs stored on a hard drive or cloud
-Easy for artists to get their music “out there”
What are the two ways of reducing the size of a file
Lossy compression & Lossless compression
What does Lossy compression do?
Decreases the file size by removing some of the data, the original graphic or audio file can never be reconstituted from a loosily compressed file
What does lossless compression do?
it decreases the file size by removing redundancies
What is a redundancy?
Data in a file that is repeated (e.g. blocks of colour in a graphic, or repeated words in a text file.” Text files are never compressed with lossy compression otherwise letter or formatting would be lost and text wouldn’t make sense. Text file sizes can be reduced with lossless compression by creating a look up table and keys