Chapter 1: Information Representation – 9618 CS AS Level Notes
Notes › Chapter 1
Chapter 1 · Paper 1

Information Representation

Binary number systems, character encoding, multimedia data and compression — the foundation of how computers store everything.

1.1 Data Representation 1.2 Multimedia 1.3 Compression

1.1 Data Representation

Binary Magnitudes and Prefixes

Computers use binary (base-2). When measuring storage sizes, there are two systems of prefixes — and knowing the difference is exam-essential.

Decimal (SI) Prefixes
Kilo (K)10³ = 1,000
Mega (M)10⁶ = 1,000,000
Giga (G)10⁹ = 1,000,000,000
Tera (T)10¹² = 1 trillion
Binary (IEC) Prefixes
Kibi (Ki)2¹⁰ = 1,024
Mebi (Mi)2²⁰ = 1,048,576
Gibi (Gi)2³⁰ = 1,073,741,824
Tebi (Ti)2⁴⁰ = ~1.1 trillion
📝 Exam Tip: Hard drive manufacturers use decimal (1 GB = 1,000,000,000 bytes). Operating systems typically use binary (1 GiB = 1,073,741,824 bytes). This is why a "500 GB" drive shows as ~465 GiB in Windows.

Number Systems

You need to confidently work in four number systems:

SystemBaseDigits UsedPrefix / Notation
Binary20, 10b… or B in pseudocode
Denary (Decimal)100–9None (default)
Hexadecimal160–9, A–F0x… or & in pseudocode
BCD10 (binary coded)0–9 each in 4 bitsEach digit → 4 bits
Interactive: Denary ↔ Binary ↔ Hex Converter

Binary Addition and Subtraction

Addition rules: 0+0=0 · 0+1=1 · 1+1=10 (carry 1) · 1+1+1=11 (sum 1, carry 1)

Binary Addition Example: 45 + 27 = 72 0 0 1 0 1 1 0 1 = 45 + 0 0 0 1 1 0 1 1 = 27 ───────────────── c: 0 0 0 1 1 1 1 0 (carry) = 0 1 0 0 1 0 0 0 = 72 ✓
Overflow

Overflow occurs when the result of an arithmetic operation is too large to be stored in the available number of bits. For an 8-bit register, values above 255 (unsigned) or ±127 (signed) cause overflow. The overflow bit in the Status Register is set to 1.

Two's Complement (Negative Numbers)

Two's complement is the standard way computers represent negative integers. The most significant bit (MSB) acts as the sign bit: 0 = positive, 1 = negative.

Write the positive binary number e.g. to represent -45: start with 0b00101101 (45)
Invert all bits (one's complement) 00101101 → 11010010
Add 1 to the result 11010010 + 1 = 11010011 = –45 ✓

8-bit Unsigned Range

  • Minimum: 0
  • Maximum: 255 (2⁸−1)
  • Total values: 256
  • No negative numbers

8-bit Two's Complement Range

  • Minimum: −128
  • Maximum: +127
  • Total values: 256
  • MSB = sign bit (1=negative)
📝 One's Complement vs Two's Complement: One's complement simply inverts all bits. Two's complement inverts + adds 1. Computers use two's complement because it has only one representation of zero and arithmetic works consistently.

Binary Coded Decimal (BCD)

Definition

BCD encodes each decimal digit (0–9) separately as a 4-bit binary pattern. The digit 9 = 1001 in BCD.

BCD Example Decimal: 2 9 5 BCD: 0010 1001 0101 Note: patterns 1010–1111 are invalid in BCD

Where BCD is used:

  • Digital clocks & displays
  • ATM machines (currency)
  • Point-of-sale systems
  • Calculators

Hexadecimal

Hex (base 16) is a compact way to represent binary. Each hex digit represents exactly 4 binary bits, making it ideal for humans reading binary data.

DenaryBinaryHexDenaryBinaryHex
000000810008
100011910019
200102101010A
300113111011B
401004121100C
501015131101D
601106141110E
701117151111F

Where Hex is used: Memory addresses · MAC addresses · HTML colour codes (#FF5733) · Assembly language operands · IPv6 addresses

Character Sets (ASCII & Unicode)

ASCII (7-bit)

  • 128 characters (0–127)
  • Extended ASCII: 256 chars (8-bit)
  • Covers English + symbols
  • 'A' = 65, 'a' = 97, '0' = 48
  • 1 byte per character

Unicode (UTF-8/16/32)

  • Over 1 million code points
  • Covers all world languages + emoji
  • UTF-8: 1–4 bytes per char
  • Backwards compatible with ASCII
  • Industry standard for the web
You do NOT need to memorise character codes. But you should know: uppercase letters come before lowercase in ASCII, so 'A' (65) < 'a' (97). This matters for sorting algorithms.
Interactive: ASCII Character Explorer

1.2 Multimedia — Graphics & Sound

Bitmap Images

Definition

A bitmap is a grid of individual pixels, each storing a colour value in binary. The word "bitmap" literally means a "map of bits".

Key Terms:

TermDefinition
PixelA single dot in the image grid — the smallest unit of a bitmap
Image ResolutionThe number of pixels in the image (e.g. 1920×1080)
Screen ResolutionThe number of pixels per inch (PPI) the screen can display
Colour Depth / Bit DepthNumber of bits used per pixel (e.g. 8-bit = 256 colours)
File HeaderMetadata stored at the start of the file (width, height, colour depth, etc.)

Calculating Bitmap File Size

File Size (bits) = Image Width × Image Height × Colour Depth

File Size (bytes) = File Size (bits) ÷ 8
Worked Example Image: 800 × 600 pixels, 24-bit colour (True Colour) Bits = 800 × 600 × 24 = 11,520,000 bits Bytes = 11,520,000 ÷ 8 = 1,440,000 bytes MB = 1,440,000 ÷ 1,000,000 = 1.44 MB Note: Actual file may differ (headers, compression)
Interactive: Bitmap File Size Calculator
Effect of changing colour depth: Doubling the colour depth doubles the file size. Increasing colour depth improves image quality (more colour shades). Reducing colour depth reduces file size but causes colour banding/posterisation.

Vector Graphics

Definition

A vector graphic stores images as mathematical instructions (drawing objects with properties) rather than a pixel grid.

TermMeaningExample
Drawing ObjectA shape defined mathematicallyCircle, rectangle, line
PropertyAn attribute of a drawing objectRadius=50, Fill=Blue, Stroke=2px
Drawing ListThe ordered list of all drawing objectsFile format stores all shapes

✅ Use Bitmap When…

  • Photographs with complex colour
  • Images need pixel-level editing
  • Gradient/texture-heavy images
  • Screen display at fixed size

✅ Use Vector When…

  • Logos and icons (scalable)
  • Technical/engineering diagrams
  • Text and typography
  • Infinite zoom without quality loss

Sound Encoding

Definition

Sound is an analogue signal (continuous). To store it digitally, we must sample it — measure the amplitude at regular intervals and convert each measurement to a binary value.

Visualisation: Analogue → Digital Sampling
← sample intervals →
TermDefinitionEffect of Increasing
SamplingMeasuring amplitude of sound at regular intervals
Sampling RateNumber of samples taken per second (Hz)Higher quality, larger file
Sampling ResolutionNumber of bits per sample (bit depth)More amplitude detail, larger file
Sound File Size (bits) = Sampling Rate × Sampling Resolution × Duration (s) × Channels
Worked Example CD Quality Audio: Sampling Rate: 44,100 Hz (44,100 samples/sec) Sampling Resolution: 16 bits Duration: 3 minutes = 180 seconds Channels: 2 (stereo) Size = 44,100 × 16 × 180 × 2 = 253,440,000 bits = 31,680,000 bytes ≈ 31.7 MB

1.3 Compression

Compression reduces file size by encoding data more efficiently. There are two fundamental types:

Lossless Compression

  • Original data fully recoverable
  • No quality loss at all
  • Smaller size reduction
  • Used for: text, programs, PNG
  • Methods: RLE, Huffman coding

Lossy Compression

  • Some data permanently removed
  • Quality degrades (often imperceptibly)
  • Much greater size reduction
  • Used for: photos (JPEG), MP3, video
  • Cannot be reversed
When to use which: Use lossless for text files, programs, or images where exact reproduction is critical. Use lossy for audio/video where humans can't perceive the removed data, and small file size matters (streaming, web).

Run-Length Encoding (RLE)

Definition

RLE replaces consecutive repeated values with a (count, value) pair. It is a lossless compression technique that works well for images with large areas of the same colour (e.g. clipart, simple logos).

Animated: Run-Length Encoding of a Bitmap Row
Original pixel row (W=White, B=Black):
After RLE compression:

RLE is ineffective on photographs (few repeating pixels) — in those cases lossy compression (JPEG) is far better.

File TypeBest CompressionReason
Text file (.txt)Lossless (e.g. ZIP)Every character matters — cannot lose any
Bitmap (.bmp)Lossless (RLE, PNG)RLE works well for simple/uniform areas
Vector graphic (.svg)LosslessMathematical — no quality to degrade
Photograph (.jpg)Lossy (JPEG)Removes imperceptible colour detail
Audio (.mp3)LossyRemoves frequencies humans can't hear
Scroll to Top