1/31
Unfinished. These only include Year 10 content, sorry.
Binary
Base 2, e.g. 1001 1101
Denary
Base 10, e.g. 24
Hexadecimal
Base 16, e.g. 5F (one digit per nibble), used for MAC addresses and colours
Bits and bytes
one binary digit, 8 binary digits (bits)
1000 storage units
KB (kilobyte), MB (megabyte), GB (gigabyte), TB (terabyte)
1024 storage units
KiB (kibibyte), MiB (mebibyte), GiB (gibibyte), TiB (tebibyte)
Binary arithmetic
Operations fundamental to all computer calculations
ASCII
American Standard Code for Information Interchange - 7 bit character set
A is at 65, a is at 97 - 32 between upper and lower case
Solutions to ASCII limitations
Extended ASCII (8 bit ASCII), unicode
Logical left shift
Unsigned integers
Move MSB left, move other digits, fill space with 0s
Can lead to overflow
Arithmetic left shift
Signed integers
Same as logical left shift
Can lead to sign-flipping
Logical right shift
Unsigned integers
Move LSB right, move other digits, fill space with 0s
Can lead to loss of precision
Arithmetic right shift
Signed integers
Move LSB right, move other digits but MSB is maintained, fill space with MSB
Can lead to loss of precision
Overflow responses
Crash and report overflow error
Truncate the number
Wrap the number back around to 0
Two’s complement
Used for signed integers - MSB is a negative number
Conversion: starting from the right, copy out every number up to and including the first 1, flip every number after that
Bitmap
Representing an image as rows and columns of pixels (picture elements)
Qualities of a bitmap
Resolution = number of pixels in an image
Colour depth = bits used to store colour
Metadata = data about the image stored along with it
Image file size calculation
File size in bits = width x height x colour depth
Bitmap trade-offs
More colours than available in colour depth —> similar colours merged
More bits for colour depth than needed —> takes up unnecessary storage space
Analogue data
Data that is continually changing, occurs in nature - continuously variable
Must be converted by and ADC into a digital format to be stored on a digital device
Digital data
Made up of discrete binary values - mapped across entire sample interval
Must be converted into analogue to be played aloud using DAC
ADC conversion
Sampling - taking a snapshot of the analogue signal at one point in time
Quantisation - mapping the snapshot onto a binary value
Sound wave graph keywords
Sound wave = the whole wave
Amplitude = the wave’s value at a given time
Bit depth = bits needed to represent the range of values
Bit rate = bits per second
y-axis = binary values
x-axis = time values
Sampling
Sample interval = time between samples (s)
Sample rate = sample per second (Hz)
44 100 Hz is standard sample rate
Quantisation
Sampled audio is quantised into signed integers
Reading is taken and mapped at each sample interval
24 bits is standard bit depth
Sound trade-offs
Higher bit depth / sample rate: more values and points on the wave, makes digital representation closer to analogue original
More data so more storage - more values/samples
Diminishing returns - humans can no longer tell the difference
Fidelity
How high quality the sound is when played through a device
Product of the device’s quality, not the accuracy of the conversion
Sound file size calculation
File size in bits = sample rate x bit depth x time
Stereo means double the size (2 channels)
CD quality
44 100Hz, 16-bit, 1 411kbps
Benefits of compression
Reduces storage requirements and network transmission time for files
Lossy vs lossless
Lossy
Audio, videos, images
Removes unnoticeable data
Greater size reduction
Original cannot be reconstructed
Repeated compression leads to further degradation
JPEG, mp4, mp3
Lossless
Mainly text files
Encodes data
No reduction in quality when loaded into a program
Smaller size reduction
Original can be reconstructed
ZIP, PNG, PDF
Compression trade-offs
Cost of transmitting uncompressed files may be < decompression cost
Decompression cost may be worth it if short on storage
Lossy loses data and so the original cannot be reconstructed