Library › Computer Science 9618 › Information Representation
AS Level · Computer Science 9618

Information Representation

Revise Information Representation for Computer Science 9618 (AS Level) — revision notes and instant AI marking.

📖 Revision notes · preview
  Cambridge International AS & A Level Computer Science (9618)

Information Representation

The big idea: Everything a computer stores is a pattern of bits. Numbers, characters, pictures and sound only differ in how those bits are read, and every exam question here comes down to choosing the right reading and doing the arithmetic carefully.

Summary — What This Chapter Covers
  • Binary prefixes (kibi, mebi, gibi, tebi) are powers of 1024; decimal prefixes (kilo, mega, giga, tera) are powers of 1000.
  • Convert between denary, binary, hexadecimal and BCD; represent negative integers in one’s and two’s complement.
  • Add and subtract in binary using two’s complement, and recognise overflow.
  • BCD is used where each denary digit must be kept separate (displays, money); hexadecimal is a compact way for people to read binary.
  • Characters are stored as codes from a character set: ASCII (7-bit), extended ASCII (8-bit) and Unicode (up to 4 bytes).
  • A bitmap is a grid of pixels; file size ≈ width × height × colour depth. A vector graphic is a drawing list of objects and their properties.
  • Sound is sampled: file size = sampling rate × sampling resolution × channels × time.
  • Compression is lossless (exactly reversible, for example run-length encoding) or lossy (permanently discards data the user will not notice).
1. Binary Magnitudes and Number Bases
Data representation

Prefixes, bases and conversions

Memory and storage sizes use two families of prefix. Decimal prefixes go up in powers of 1000; binary prefixes go up in powers of 1024 (210). A drive sold as 4 GB holds 4 × 109 bytes, while the operating system may report sizes in GiB.

Decimal prefixValueBinary prefixValue
kilo (kB)103kibi (KiB)210 = 1024
mega (MB)106mebi (MiB)220 = 1 048 576
giga (GB)109gibi (GiB)230
tera (TB)1012tebi (TiB)240

The number bases you need are denary (base 10), binary (base 2) and hexadecimal (base 16, digits 0–9 then A–F for 10–15). One hex digit stands for exactly four bits (a nibble), so convert binary to hex by splitting into groups of four from the right.

Binary Coded Decimal (BCD) stores each denary digit separately in its own 4-bit nibble. 181 in BCD is 0001 1000 0001; it is not the same bit pattern as 181 in binary. The nibbles 1010 to 1111 are never used in BCD.

Place values (8 bits) 128   64   32   16   8   4   2   1
Worked Example
Convert the denary number 181 into (a) 8-bit binary, (b) hexadecimal, (c) BCD.
Worked Example
How many bytes are in 4 GiB, and how many more bytes is that than 4 GB?
Practice Question
Convert the hexadecimal number A7 into binary and into denary. Then convert the BCD value 0100 1001 0111 into denary.
2. Negative Numbers, Binary Arithmetic and Overflow
Data representation

One’s and two’s complement

In one’s complement a negative number is formed by inverting every bit of the positive number. In two’s complement you invert every bit and then add 1. In two’s complement the most significant bit has a negative place value: in 8 bits it is −128, so the range is −128 to +127.

Two’s complement place values (8 bits) −128   64   32   16   8   4   2   1   |   range −128 to +127

Binary addition subtract

Overflow

Worked Example
Worked Example
🔓 Read the full Information Representation note → You're seeing the preview · sign in to read it all
Also in the full note
  • Where each representation earns its place
  • Pixels or drawing objects
  • Sampling an analogue wave
  • Lossless, lossy and run-length encoding
What's inside
📖 Revision notes 🎯 Learn mode ✦ AI flashcards ✓ Instant AI marking 🧊 3D explorers 🧪 Experiments & simulations 📈 Progress tracking
📄 Practise Information Representation with Computer Science 9618 past papers Every paper with its mark scheme — answer online, marked instantly. Open →

Read the full Information Representation notes free

That's the preview — create a free account to read the rest, plus flashcards and practice questions with instant AI marking. No credit card.

Unlock the full notes free →

More Computer Science topics