Computer Science
04782026–2028 syllabus

COMPUTER SCIENCE · CHAPTER 1

Data representation

Represent numbers, text, sound and images in binary and calculate storage accurately.

Full syllabus4 connected sectionsSyllabus-aligned guide

LEARNING OBJECTIVES

What you will be able to do

  • convert between denary, binary and hexadecimal
  • add and shift binary values and use 8-bit two's complement
  • explain text, sound and image representation
  • calculate file sizes and compare compression methods

AT A GLANCE

Syllabus0478Coverage2026–2028Sections4LevelFull syllabus

INTRODUCTION · THE BIG IDEA

Represent numbers, text, sound and images in binary and calculate storage accurately.

A computer's electronic circuits work with two stable states, so every instruction and item of data is represented in binary. Hexadecimal gives humans a shorter way to read long bit patterns.

The quality and size of media files depend on how much information is sampled or stored. The 2026–2028 syllabus uses binary storage multiples: 1024, not 1000.

01

SECTION 01

Number systems and hexadecimal

Core concept

Denary is base 10, binary is base 2 and hexadecimal is base 16 using digits 0–9 and A–F. Each hexadecimal digit maps exactly to four bits, making conversion reliable.

Hexadecimal is used for values such as memory addresses, machine code, colour codes and network identifiers because it is shorter and easier for people to check than binary.

ORIGINAL STUDY DIAGRAMConvert binary to hexadecimal
1Group bits in fours from the right
2Pad the left group if needed
3Convert each nibble
4Join hexadecimal digits
Original worked example

Convert 11010110₂

  1. Group as 1101 0110.
  2. 1101₂ = 13₁₀ = D₁₆.
  3. 0110₂ = 6₁₀ = 6₁₆.

Answer: 11010110₂ = D6₁₆.

02

SECTION 02

Binary arithmetic, shifts and two's complement

Core concept

Binary addition follows 0+0=0, 0+1=1, 1+1=10 and 1+1+1=11. An 8-bit overflow occurs when the result is outside the register's representable range.

A logical left shift inserts zeros at the right and multiplies a positive value by 2 per place if no significant bit is lost. A logical right shift inserts zeros at the left and divides by 2 per place, discarding any fractional remainder.

In 8-bit two's complement, values range from −128 to +127. To form a negative value, write the positive 8-bit pattern, invert every bit and add 1. The leftmost bit contributes −128 when converting to denary.

RULE 1
n-place logical left shift: × 2ⁿ
RULE 2
n-place logical right shift: integer ÷ 2ⁿ
RULE 3
8-bit two's-complement range: −128 to +127
Original worked example

Represent −18 in 8 bits

  1. +18 = 00010010.
  2. Invert: 11101101.
  3. Add 1: 11101110.

Answer: −18 is 11101110 in 8-bit two's complement.

03

SECTION 03

Text, sound and images

Core concept

Character sets assign binary codes to symbols. ASCII covers a limited set, while Unicode represents far more writing systems and symbols but may use more bits per character.

Digital sound records amplitude at regular intervals. Higher sample rate captures changes more frequently and higher sample resolution provides more amplitude levels; both improve potential fidelity and increase file size.

A bitmap image is a grid of pixels. Resolution is the total pixel dimensions and colour depth is bits per pixel. More pixels increase detail; more bits allow more colours.

RULE 1
sound bits = sample rate × sample resolution × duration × channels
RULE 2
image bits = width × height × colour depth
RULE 3
number of colours = 2^(colour depth)
Original worked example

Uncompressed image size

  1. Image resolution is 800 × 600 pixels at 24 bits per pixel.
  2. Bits = 800 × 600 × 24 = 11 520 000.
  3. Bytes = 11 520 000 ÷ 8 = 1 440 000.

Answer: File size = 1 440 000 bytes before metadata or compression.

04

SECTION 04

Storage units and compression

Core concept

Eight bits form a byte and four bits form a nibble. Cambridge's current calculations use 1024 between byte-based binary units: KiB, MiB, GiB, TiB, PiB and EiB.

Compression reduces storage, bandwidth and transmission time. Lossy compression permanently removes less noticeable data and suits media where exact recovery is unnecessary. Lossless compression reproduces the original exactly; run-length encoding stores repeated sequences efficiently.

RULE 1
1 KiB = 1024 bytes
RULE 2
1 MiB = 1024 KiB
RULE 3
1 GiB = 1024 MiB
Original worked example

Convert bytes to MiB

  1. A file contains 5 242 880 bytes.
  2. Divide by 1024 to get 5120 KiB.
  3. Divide by 1024 again.

Answer: File size = 5 MiB.

QUICK CHAPTER SUMMARY

The ideas to carry forward

  • All computer data is encoded as bits.
  • Hexadecimal maps one digit to four bits.
  • Sampling and colour choices trade file size for quality.
  • Use 1024 for current-syllabus storage calculations.

QUICK REVISION CHECKLIST

Can you do each of these without your notes?

  • convert between denary, binary and hexadecimal
  • add and shift binary values and use 8-bit two's complement
  • explain text, sound and image representation
  • calculate file sizes and compare compression methods