1 bit
a single 1 or 0
1 byte
8 bits
1 nibble
4 bits / 1/2 byte
Order of prefixes [4]:
- kilo
- mega
- giga
- tera
One character of text:
1 byte
A full page of text:
30 kB
One small digital colour photograph:
3 MB
Music CD capacity:
650 MB
DVD capacity:
4.5 GB
Hard disc capacity:
1 TB
Most significant bit (MSB)
the leftmost bit in a binary number - which has the highest value
Least significant bit (LSB)
the rightmost bit in a binary number - which has the lowest value
The number of combinations from n bits =
2ⁿ
Hexadecimal
a number system that uses base 16
0 - 15 in hexadecimal =
0 - 9 and A - F
Hexadecimal to decimal conversion [2]:
- multiply value of left digit by 16
- add value of right digit
Decimal to hexadecimal conversion [2]:
- divide using integer division by 16 (value = left digit)
- remainder = right digit
Binary to hexadecimal conversion [3]:
- divide 1 byte into two nibbles (left and right)
- convert the value of each nibble to hexadecimal digits
- combine the two
Hexadecimal to binary conversion [2]:
- represent each digit in turn as 4-bit numbers
- combine them
Advantages of hexadecimal [4]:
- simpler to remember
- quicker to write or type
- less likely to make error
- easy to convert between hex and binary
Rules of binary addition:
- 0 + 0 = 1
- 0 + 1 = 1
- 1 + 0 = 1
- 1 + 1 = 0 (carry 1)
- 1 + 1 + 1 = 1 (carry 1)
1 + 1 + 1 + 1 = ? [3]
- 4
- 100
- 1 carried over by 2
Overflow error
error from attempting to represent a number that is too large.
A right logical shift causes:
a division by 2 (if float, round down)
A left logical shift causes:
a multiplication by 2
Number of unique characters on a keyboard
98
What are characters on a keyboard represented by?
a binary value
Character set
the group of symbols used to render text on a page
What are the two major character sets? [2]
- ASCII
- Unicode
ASCII is usually ...-bit but can be ...-bit
7, 8
Unicode is ...-bit and extended Unicode is ...-bit
16, 32
What does ASCII stand for?
American Standard Code for Information Interchange
In ASCII, 'A' begins at ... and ends at ...
65, 90
In ASCII, 'a' begins at ... and ends at ...
97, 122
In ASCII, 0-9 are ...
48-57
In ASCII, a space is ...
32
Concatenate
chain together
Concatenate strings in Python ("Help ", "me!": string1, string2):
string1 = "Help "
string2 = "me!"
concatenated = string1 + string2
print(concatenated)
#output: "Help me!"
Convert character to ASCII in pseudocode [2]:
- CHAR_TO_ASCII
- CHAR_TO_CODE
Unicode, as well as English characters, is used to store... [2]:
- characters from other languages
- emojis
Bitmap/raster image
digital image divided into a grid of dots (pixels)
Bitmap images are made of ... or ...
PICture ELements, pixels
Pixel
the smallest identifiable area of an image
A pixel is [2]:
- one solid colour
- given a binary code to represent that colour
Bitmap image file formats [5]:
- BMP
- JPG
- GIF
- PNG
- TIFF
Vector image file format:
SVG
Image resolution
the concentration of pixels in a specific area
PPI
pixels per inch (screen)
DPI
dots per inch (printing)
Colour/bit depth
the number of bits used for each pixel in an image file
File size (bits) =
height x width x bit depth
If you increase the file size but not the number of pixels...
the pixel concentration decreases as well as the resolution
Portable bitmap image (PBM) [3]
- uses 1s and 0s to store pixels
- image dimensions given in 1st row
- image details given after
Each pixel has a proportion of ..., ... and ..., called its ... value
red, green, blue, RGB
RGB
uses varying intensities of red, green, and blue light are added together to reproduce a broad array of colors
Why are hexadecimal and decimal values used for RGB?
colour pickers are used by designers and developers and these forms are easier to remember than binary
Each colour value (R, G, B) requires:
8 bits
Each pixel requires:
24-32 bits
In 32-bis per pixel 8 bits are given to a ...
transparency channel
Metadata
data about data
What metadata may be present in an image file? [4]
- colour depth in bits per pixel
- resolution (height and width in pixels)
- date created
- author
Why might file sizes not add up?
metadata
Analogue sound signal
continuous wave
Digital sound signal
discrete - wave sampled at regular intervals
How is sound digitised?
by repeatedly measuring and recording the sound wave
ADC
analogue to digital converter
What is an ADC used for?
convert inputs to digital sounds
DAC
digital to analogue converter
What is a DAC used for?
convert digital sounds to outputs
Sound sample
a measure of amplitude at a point in time
Sampling resolution
number of bits used to represent sound amplitude
Sampling resolution is also called...
bit depth
Sampling rate
the number of samples taken per second
What is sampling rate measured in?
Hertz (Hz)
The higher the bit depth/sampling resolution...
the more accurate the amplitude value
What is the sampling rate for a CD?
44.1 kHz
File size (bits) =
sampling rate x resolution x duration
What improves recording quality? [2]
- sound sampled more frequently
- wave height recorded more accurately
Lossy compression
removes sound that we can't easily hear or that least affect playback quality - this is irreversible
What is lossy compression useful for in music?
downloading and streaming music
Examples of lossy compression sound file formats [2]:
- MP3
- AAC
MP3
MPEG-1 Audio layer 3
AAC
Advanced Audio Coding
Lossless compression
data compression technique where no data is lost
Examples of lossless compression sound file formats [3]:
- FLAC
- ALAC
- WMA Lossless
FLAC
Free Lossless Audio Codec
ALAC
Apple Lossless Audio Codec
WMA Lossless
Windows Media Audio
Examples of uncompressed sound file formats [2]:
- WAV
- AIFF
WAV
Waveform Audio File Format
AIFF
Audio Interchange File Format
Compression algorithm
an algorithm that compresses file size
Decompression
returning compressed data to its original format
With lossy compression, data is...
lost permanently
With lossless compression, data is...
not lost, and the file can be decompressed
Digital artefact
small mistakes in image and video as a result of lossy compression
Which type of compression reduces file size more?
lossy compression
Run length encoding
replacing a long series of a repeated character with a count of the repetition
(RLE) 1111000 =
4 1 3 0
Examples of lossy compression image file formats [1]:
- JPG