Skip to main content
SingaporeComputer Science

O-Level Computing (7155) Data Representation: number systems, binary and hex conversion, binary addition and overflow, storage units and compression, and representing text, sound and images

A module overview for O-Level Computing (SEAB 7155) Data Representation: why computers use binary, place value in binary and hexadecimal, converting between denary, binary and hex, binary addition and overflow, units of storage and lossless versus lossy compression, and how text, sound and images are represented as binary.

Generated by Claude Opus 4.87 min readSEAB-7155

Reviewed by: AI editorial process; not yet individually human-reviewed

Jump to a section
  1. Why this module matters
  2. Number systems: binary and hexadecimal
  3. Converting between denary, binary and hex
  4. Binary addition and overflow
  5. Units of storage and compression
  6. Representing text, sound and images
  7. How this module is examined
  8. Check your knowledge

Why this module matters

Data Representation is the foundation of computing: everything a computer stores or processes, whether a number, a letter, a sound or an image, is ultimately a pattern of binary digits. This module teaches you to think in binary and hexadecimal, to add binary numbers and spot overflow, to measure data in the standard units, and to explain how text, sound and images are encoded. The binary and hex conversions are practical skills you must be able to do quickly and accurately under exam pressure, and they are examined in the written Paper 1.

This guide ties together the matching dot-point pages, each with its own worked detail and practice. The strands below build on each other.

Number systems: binary and hexadecimal

Start with why and how the number systems work. See number systems: binary and hex for the reasons and place value.

Computers use binary (base 2) because their components have two stable states (off or on, low or high voltage), which map naturally onto 0 and 1. In binary the place values are powers of two (1,2,4,8,16,…1, 2, 4, 8, 16, \dots). Hexadecimal (base 16) is used as a human-friendly shorthand for binary: one hex digit stands for exactly four binary digits (a nibble), so a long binary pattern becomes a short, readable hex string.

Converting between denary, binary and hex

The core skill is fast, accurate conversion. See binary and hex conversion for the methods: place value and repeated division, and grouping bits into nibbles for hex.

Binary addition and overflow

Computers add in binary, and you must be able to do it by hand. See binary addition and overflow for the carry rules and what overflow means.

Add bit by bit from the right, carrying where two 1s meet (1+1=101 + 1 = 10, write 0 carry 1). Overflow occurs when the result is too large to fit in the fixed register width (for example an 8-bit register holds 0 to 255); the carry out of the most significant bit has nowhere to go, so the stored answer is wrong. Spotting overflow is a common Paper 1 mark.

Units of storage and compression

Data is measured in standard units, and large files are often compressed. See data storage units and compression for the units and the two kinds of compression.

The units rise from the bit (a single 0 or 1), to the byte (8 bits), then kilobyte, megabyte, gigabyte and terabyte. Compression reduces file size. Lossless compression keeps all the data so the file restores exactly (used for text and program files); lossy compression permanently removes some detail for a much smaller file (used for photos, music and video where a small quality loss is acceptable). Files are compressed to save storage space and to transfer faster over a network.

Representing text, sound and images

Finally, all media reduces to binary. See representing text, sound and images for how each is encoded.

  • Text: each character has a binary code; ASCII assigns a number to each letter, digit and symbol (for example capital A is 65).
  • Sound: the analogue wave is sampled (measured at regular intervals) and each sample stored as a binary number; higher sample rate and bit depth give better quality but larger files.
  • Images: the picture is a grid of pixels, each stored as a binary colour value; more pixels (resolution) and more bits per pixel (colour depth) give a higher-quality but larger image.

How this module is examined

  • Paper 1 (written, 60%). Convert between denary, binary and hexadecimal; perform binary addition and identify overflow; use storage units; compare lossless and lossy compression; and explain how text, sound and images are represented.
  • Practise speed and accuracy. Binary and hex conversions must be quick and correct; drill them until they are automatic.

Check your knowledge

Try these, then take the matching quiz for this module.

  1. State why computers use binary. (1 mark)
  2. Convert 101121011_2 to denary. (1 mark)
  3. Convert denary 200 to hexadecimal. (2 marks)
  4. State the difference between lossless and lossy compression. (2 marks)

Sources & how we know this

  • computer-science
  • sg-o-level
  • seab-7155
  • o-level-computing
  • data-representation
  • binary
  • hexadecimal
  • overflow
  • compression
  • ascii
  • 2026