Intermediate

Images, Sound and Data Representation

AicademyAicademy
·A-Level Computer Science·AQA 7517·7 min
4.5.6.1–4.5.6.8 Representing images, sound and other data

Representing Data as Bit Patterns

Every type of data stored on a computer is ultimately represented as a pattern of binary bits. The same bit pattern can mean different things depending on context:

  • 0100 0001 as ASCII = 'A' (the letter A)
  • 0100 0001 as unsigned binary = (the number 65)
  • 0100 0001 as part of an image = a dark-grey pixel value

Analogue vs digital:

AnalogueDigital
ValuesContinuous range (infinite precision)Discrete set of values
SignalSmooth waveformSteps between defined levels
ExamplesVinyl records, old CRT signals, thermometersMP3 files, PNG images, digital thermometers

ADC/DAC: an analogue-to-digital converter (ADC) samples an analogue signal at regular intervals and converts each sample to a digital value. A digital-to-analogue converter (DAC) converts stored digital values back to an analogue signal (e.g. for audio output through speakers).

Bitmapped Graphics

A bitmap (raster image) stores an image as a 2D grid of pixels (picture elements). Each pixel stores a colour value.

Key properties:

PropertyDefinitionExample
ResolutionNumber of pixels (width × height)1920 × 1080 = 2 073 600 pixels
Colour depthBits per pixel24-bit → ≈ 16.7 million colours
DPIDots per inch (print resolution)300 dpi for print; 72–96 dpi for screen

File size formula (uncompressed, ignoring metadata):

Worked example — a 1920 × 1080 image with 24-bit colour:

Metadata stored alongside the image: width, height, colour depth, file format, compression type, and potentially GPS coordinates, camera settings, etc.

Vector Graphics

A vector image is stored as a list of geometric objects, each described by its properties rather than individual pixels.

Object types (primitives): point, line, arc, circle, rectangle, polygon, bezier curve

Each object has properties:

  • Position (, ), dimensions (width, height)
  • Fill colour, stroke colour, stroke width
  • Transparency, rotation, layering order

Example — a simple vector graphic:

Circle: centre=(100, 100), radius=50, fill=#FF0000, stroke=#000000, width=2
Rectangle: x=200, y=50, w=120, h=80, fill=#0000FF
Line: from=(10, 10), to=(300, 200), stroke=#008000, width=3

Vector vs bitmap comparison:

VectorBitmap
ScalingInfinite — no quality lossQuality degrades at high zoom (pixelation)
File sizeSmall for simple shapesLarge for detailed images
Best forLogos, diagrams, fonts, mapsPhotographs, complex images with many colours
EditingEasy to move/resize objectsDifficult — editing pixels individually

Digital Sound

Sound is a pressure wave. To store it digitally:

  1. Sampling: an ADC measures the amplitude of the sound wave at regular time intervals
  2. Quantisation: each sample is rounded to the nearest representable value (determined by bit depth)

Key parameters:

ParameterDescriptionHigher value →
Sampling rateSamples per second (Hz)Better frequency reproduction; larger file
Bit depth (sample resolution)Bits per sampleMore amplitude levels; better dynamic range; larger file
ChannelsMono (1) or stereo (2)Stereo doubles file size

Nyquist theorem: the sampling rate must be at least twice the highest frequency to be captured. CD audio uses 44 100 Hz (samples/sec) to capture frequencies up to 22 050 Hz (the upper limit of human hearing ≈ 20 000 Hz).

File size formula:

Worked example — CD-quality audio (44 100 Hz, 16-bit, stereo), 3 minutes:

Want more lessons like this one?

Generate lessons on anything you study. Free account, no card needed.

Start generating

MIDI

MIDI (Musical Instrument Digital Interface) stores instructions for making music, not recorded audio.

A MIDI file contains event messages such as:

NOTE_ON  channel=1  note=60 (middle C)  velocity=80
NOTE_OFF channel=1  note=60  time=500ms
PROGRAM_CHANGE channel=1  instrument=0 (Grand Piano)

MIDI vs audio files:

MIDIAudio (WAV/MP3)
What is storedInstructions (note, pitch, duration, velocity)Sampled audio waveform
File sizeVery small (kilobytes)Large (megabytes)
Change tempoYes — just change timingRequires re-encoding
Change pitchYes — transpose notesRequires re-encoding
Change instrumentYes — change program numberNot possible
Sounds like original performanceNo — depends on playback hardwareYes
Requires instrument soundsYes (synthesiser or soundfont)No

MIDI is used in music production, electronic instruments, and sequencers. It is not suitable for recording spoken audio or live acoustic performances.

Common Exam Mistakes

1. Using the wrong file size formula

Bitmap file size: width × height × colour depth (in bits). Sound file size: sampling rate × bit depth × duration × channels. Confusing the two or using decimal units (KB = 1000 bytes) when the question expects binary units (KiB = 1024 bytes) loses marks.

2. Claiming vector images are always smaller

Vectors are smaller than bitmaps for simple geometric shapes, but a photograph in vector format (if it were possible) would require millions of tiny shapes — larger than a bitmap. The comparison depends on image complexity.

3. Confusing sampling rate and bit depth

Sampling rate affects how accurately frequencies are captured (how often you measure). Bit depth affects how many amplitude levels can be stored (how precisely you measure each sample). They are independent parameters.

4. Stating MIDI records sound

MIDI does not record audio. It records instructions. The actual sound is generated at playback time by a synthesiser. Two playback devices may produce very different sounds from the same MIDI file.

Generate revision on any topic you study

Type any topic you're studying and Aicademy generates a complete lesson, quiz, and flashcard set — personalised to your level.

Lessons on anything

Structured, level-matched lessons on any topic you study

Practice quizzes

Find out what you actually know before the exam does

Flashcard sets

Lock in key concepts with instant revision cards

Ask Aica

Stuck on something? Get a clear explanation, any time

Prev

Character Encoding and Error Detection

Next

Data Compression and Encryption

Related lessons

7 Slides

Lesson

Number Systems and Bases

A-Level Computer Science · AQA 7517

10 hours ago

7 Slides

Lesson

Data Compression and Encryption

A-Level Computer Science · AQA 7517

10 hours ago