8525 Unit 3 Flashcards
Why computers use binary
Computers only understand 2 states: power on and power off
Represented by switches
Bits, bytes, KB, etc
1 byte = 8 bits = 1 character of text
1 kB = 1000 bytes
1 MB = 1000 kB or 10^6 bytes
1 GB = 1000 MB
1 TB = 1000 GB
2 major character sets used today
ASCII - 7/8 bit
Unicode - 16/32
Bitmap image file formats:
BMP
JPG
GIF
PNG
TIFF
Vector image file format
SVG
What is a pixel
A pixel is the smallest identifiable area of an image
Each pixel is a single colour and is given a binary value with represents that colour
Image resolution
Resolution is the concentration of pixels within a specific area
The area is defined by the image width and height in pixels e.g 1920 x 1080
Creating an image with binary values
Each value represents a different colour
1 bit - 2 colours
2 bit - 4 colours
3 bit - 8 colours
What type of compression do images mainly use
Lossy
How does the number colours affect file size
An increase in the number of colours that are used in an image (the bit depth) will increase the file size
How does the size of the image affect file size
An increase in number of pixels in the image will increase the file size
If an image’s physical size is increased by making each pixel larger then there is no change in the file size
PBM monochrome images
Portable bitmap images
0 for white and 1 for black
Image dimensions are given in the first row
Image data is then given after
Calculating image size
Size in bits = width x height x colour depth
Size in bytes = width x height x colour depth / 8
Metadata
Data about data
In terms of images: colour depth, resolution, date created, author
Analogue to digital converters
Sounds converted into a digital form in order to be stored and processed by a computer
Analogue to digital—converts inputs to digital signals
Digital to audio—is used to convert digital signals to outputs
Sound sampling
Sampling rate = number of samples taken per second
Sample resolution = bit depth
Calculating sound file sizes:
File size = sampling rate x resolution x duration
Digitised sound quality
Recording quality improves: the more frequently we sample the sound
Increasing the sampling rate means recording more data points—incr the bit rate improves the accuracy of each data point
Hertz (cs)
How many samples per second
Lossy compression (in terms of sound)
Removes sounds that we can’t easily hear or that least affect the perceived playback quality
Lossless compression
Reduces the file size when compressed but do not lose any information
Lossless music file formats:
FLAC
ALAC
W MA lossless
Lossy compression
Permanently loses some data—cannot be decompressed
Lossless image compression
Will not lose any of the original data
Run length encoding (RLE)
Uses frequency/data pairs to encore each run length of the same coloured pixel
For example:
1 = white, 0 = black
1111000000000000
Using rle:
4 1 12 0
Lossless text compression:
An eye for an eye, a tooth for a tooth
Uses repeated pattern in a dictionary
Example:
An eye for an eye
An eye for an eye, a tooth for a tooth.
. 0 0000
An_ 1 0001
eye 2 0010
for 3 0011
an_ 4 0100
,_ 5 0101
a_ 6 0110
tooth 7 0111
1 2 3 4 2 5 6 7 3 6 7 0
38 characters including spaces = 38 bytes
Assuming 8 bit ASCII: 38 characters = 38 bytes
Compression: 12 numbers used—> 6 bytes (each number was a nibble)
Why is compression good
download times are reduced
Data allowances go further
It is possible to transmit video and music data streams as fast as they are playing
Faster to transfer
benefits of compression
Smaller fillies = fewer packets = faster transmission time:
- quicker to complete transmission
- reduces traffic over the internet
reduces download times of video, sound (including speech used for VOIP systems) and I mage files:
- streaming is also possible as the data can be sent as fast as the rate it is played
Images inside web pages appear faster
Reduces space on disk/servers