IGCSE Computer Science - Data Representation
Chapter 1 ยท Paper 1

Data Representation

Binary, denary, hexadecimal, two's complement, ASCII, Unicode, sound, images and compression.

Based on Cambridge IGCSE / O-Level CS Syllabus 0478/2210 (2026โ€“2028)

1 Number Systems

Computers use binary because their transistors can only be in two states โ€” ON (1) or OFF (0). Every form of data โ€” text, images, sound โ€” must be converted to binary to be processed.

Number SystemBaseDigits UsedPrimary Use
Binary20, 1Inside computers (hardware level)
Denary (Decimal)100โ€“9Everyday human use
Hexadecimal160โ€“9, Aโ€“FProgrammers โ€” compact binary representation

Bit = single binary digit (0 or 1). Nibble = 4 bits. Byte = 8 bits. Data is processed using logic gates and stored in registers.

2 Conversions

Binary โ†’ Denary: Multiply each binary digit by its place value (powers of 2), then add the results.

Example: 11010110 = 128+64+16+4+2 = 214

Denary โ†’ Binary (repeated division by 2):
45 รท 2 = 22 remainder 1
22 รท 2 = 11 remainder 0
11 รท 2 =  5 remainder 1
 5 รท 2 =  2 remainder 1
 2 รท 2 =  1 remainder 0
 1 รท 2 =  0 remainder 1
Read bottom to top: 00101101 (8-bit)

3 Hexadecimal

1 hex digit = exactly 4 binary bits (1 nibble). Binary becomes much shorter: 1101 0011 1010 1101 โ†’ D3AD

In the exam, always split binary into nibbles from the RIGHT when converting to hex. For 10111 โ†’ split as 0001 0111 โ†’ 17

4 Binary Arithmetic & Overflow

An overflow error occurs when a calculation result is too large for the available bits. In 8-bit, max is 255. Results >255 cause overflow โ€” leading bits are lost.

An overflow does NOT always mean a wrong answer was entered โ€” it means the correct answer cannot be represented in the given number of bits.

5 Logical Shifts

LEFT SHIFT
  • Bits move left by n places
  • Zeros fill from the right
  • Effect: multiplies by 2โฟ
RIGHT SHIFT
  • Bits move right by n places
  • Zeros fill from the left
  • Effect: divides by 2โฟ

When bits fall off the end of the register they are permanently lost. If significant bits are lost, the result will be incorrect.

6 Two's Complement

Two's complement represents negative integers. The MSB has negative place value (โˆ’128 for 8-bit).

  • Write positive number in 8-bit binary
  • Flip all bits (0โ†’1, 1โ†’0) โ€” one's complement
  • Add 1 to the result
Convert โˆ’45:
+45 = 00101101
Flip = 11010010
Add 1 = 11010011 โ† Answer: โˆ’45

To read negative: add place values with โˆ’128 for MSB. 11010011 = โˆ’128+64+16+2+1 = โˆ’45

7 Text โ€” ASCII & Unicode

ASCII
  • 7 bits per character (128 chars)
  • Extended ASCII uses 8 bits (256 chars)
  • Covers English alphabet, digits, symbols
  • 'A' = 65, 'a' = 97, '0' = 48
UNICODE
  • Uses more bits per character
  • Covers 100,000+ characters
  • Supports all world languages and emojis
  • Backward compatible with ASCII

Unicode requires more storage per character than ASCII because it needs more bits for a larger character set.

8 Sound Representation

Sound is an analogue wave. To store digitally, the wave is sampled at regular intervals. Each sample is stored as a binary number.

TermDefinitionEffect of Increasing
Sample rateSamples per second (Hz)More accurate, larger file
Sample resolutionBits per sampleMore precise, larger file

Always use 1024 for unit conversions: 1 KiB = 1024 bytes, 1 MiB = 1024 KiB, 1 GiB = 1024 MiB.

9 Image Representation

A digital image is made of pixels โ€” tiny squares of colour. Each pixel's colour is stored as binary.

TermDefinitionEffect of Increasing
ResolutionTotal pixels (width ร— height)Higher quality, larger file
Colour depthBits per pixelMore colours, larger file

10 Data Storage Units

1 Bit = binary digit | 1 Byte = 8 bits | 1 KiB = 1024 bytes | 1 MiB = 1024 KiB | 1 GiB = 1024 MiB

11 Compression

Compression reduces file size. Benefits: less storage, less bandwidth, faster transfers.

LOSSLESS
  • No data lost
  • Original can be reconstructed
  • Used for: text, PNG images
LOSSY
  • Permanently removes data
  • Original cannot be reconstructed
  • Used for: MP3, JPEG

Once lossy compression is applied, lost data is gone permanently. You cannot "undo" lossy compression.

Scroll to Top