Revision Notes
A Level Computer Science: Information Representation — Revision Notes
Condensed recall notes on number bases, binary arithmetic, two's complement, character sets and compression for AS Computer Science. Floating point representation is full-A-Level-only content, assessed in Paper 3, and is not covered by these AS-stage notes.
- Subject
- Computer Science
- Level
- AS LEVEL
- Topic
- Information representation
- Author
- Marlbridge Academic Team
- Updated
- Reviewed by
- Harris Khan (what this means)
Aligned to Cambridge A Level Computer Science (9618), 2027-2029. Official specification .
Syllabus page (what it covers and how it is assessed): Cambridge A Level Computer Science.
Syllabus points this page covers
9618 (AS Level)
- 1 Information representation (whole topic)
Found an error? Report a correction.
Need help with this topic? Request a free trial class for A Level Computer Science (9618).
Condensed for the final weeks. For the full explanation, use the Information Representation study guide.
Number bases
binary base 2 denary base 10 hexadecimal base 16
Denary → binary: repeatedly divide by 2, read the remainders upwards. Binary → denary: add the place values where a 1 appears. Binary → hex: split into groups of 4 bits from the right and convert each nibble.
Hexadecimal is used because it is far more compact than binary and each hex digit maps to exactly four binary digits, making conversion trivial and human error less likely — used for memory addresses, colour codes and MAC addresses.
Binary addition and overflow
0+0=0 0+1=1 1+1=10 (carry 1) 1+1+1=11 (carry 1)
Overflow occurs when the result needs more bits than are available. In an 8-bit register the largest unsigned value is 255; adding beyond that produces an incorrect result and sets the carry flag (the flag for unsigned range overflow) — the separate overflow flag signals a different condition, invalid two’s complement (signed) overflow, so name the correct flag for the case in the question. Explaining overflow as “the number is too big for the number of bits allocated” is the phrasing that scores, provided you also name the right flag.
Signed integers — two’s complement
To negate a number: invert all the bits and add 1.
+5 = 00000101
invert = 11111010
add 1 = 11111011 = -5
Range for n bits: −2ⁿ⁻¹ to 2ⁿ⁻¹ − 1. For 8 bits, −128 to +127.
Why two’s complement rather than sign-and-magnitude: it has only one representation of zero, and subtraction can be performed by ordinary addition — so the hardware needs no separate subtraction circuit. That reason is the answer to the standard comparison question.
The most significant bit indicates the sign: 0 positive, 1 negative.
Binary shifts
- Logical left shift by n → multiply by 2ⁿ.
- Logical right shift by n → divide by 2ⁿ, discarding the remainder.
- Arithmetic right shift preserves the sign bit, so it works correctly on negative two’s complement values.
Using a logical right shift on a negative number turns it positive — which is why arithmetic shift exists.
Floating point is not covered here — it is examined only within the full A Level (not the AS), so it sits outside these AS-stage notes.
Character sets
- ASCII — 7 bits, 128 characters. Extended ASCII uses 8 bits for 256.
- Unicode — up to 32 bits (in a fixed-width encoding), representing a very wide range of the world’s writing systems.
Unicode was needed because ASCII could not represent non-Latin scripts. The cost is that Unicode text can require more storage per character, which is why UTF-8 uses a variable-length encoding that keeps ASCII characters at one byte.
Images and sound
image file size = width x height x colour depth
sound file size = sampling rate x sampling resolution x duration x channels
- Image resolution — the number of pixels in the image, width × height. Colour depth — bits per pixel; n bits give 2ⁿ colours.
- Sampling rate — samples per second. Sampling resolution — bits per sample.
Higher sampling rate and sampling resolution give better quality but larger files. That trade-off is the answer to most multimedia questions.
Vector graphics store objects and their properties rather than pixels, so they scale without loss and are usually smaller for line art — but are unsuitable for photographs.
Compression
| Lossless | Lossy | |
|---|---|---|
| Data | Fully recoverable | Permanently discarded |
| Use | Text, program files, spreadsheets | Images, audio, video |
| Methods | Run-length encoding, dictionary encoding | JPEG, MP3 |
Lossless must be used where every bit matters — a compressed program or spreadsheet that lost data would be corrupt. Lossy is acceptable where the discarded data is imperceptible to human senses.
Run-length encoding replaces runs of identical values with a value and a count. It works well on images with large blocks of uniform colour and badly on noisy or photographic data, where it can produce a larger file than the original.
Exam traps
- Forgetting to add 1 after inverting in two’s complement.
- Using a logical rather than arithmetic right shift on a signed value.
- Naming the overflow flag for an unsigned range overflow — that case sets the carry flag; the overflow flag is for signed (two’s complement) overflow.
- Defining resolution as a pixel density rather than a pixel count.
- Claiming lossy compression is always worse — it is appropriate for perceptual media.
- Assuming RLE always reduces file size.
Self-test
- Convert 202 to binary and to hexadecimal.
- Give the two’s complement of +5 in 8 bits, and the 8-bit range.
- Why is two’s complement preferred to sign-and-magnitude?
- Which status flag is set when an unsigned addition exceeds a register’s range, and which flag is set for signed overflow instead?
- When is run-length encoding a poor choice?
Answers: 1. 11001010 and CA. 2. −5 is 11111011; the range is −128 to +127. 3. It has a single representation of zero and allows subtraction to be carried out by addition, so no separate subtraction hardware is needed. 4. Unsigned range overflow sets the carry flag; the overflow flag is reserved for signed two’s complement overflow, a different condition. 5. On noisy or photographic data with few repeated adjacent values — it can produce a file larger than the original.
Get free revision emails (optional)
Occasional emails with practice questions, worked explanations and links to free resources for the qualification and subjects you choose. No spam, and you can unsubscribe from any email. The free tools on this site never need an email.
Related resources
-
Study guides
A Level Computer Science: Information Representation (Cambridge 9618)
An overview of data representation, multimedia (graphics and sound), and compression for Topic 1 Information representation, Cambridge AS & A Level Computer Science 9618, 2027-2029 series – covering number-base conversion, file-size calculation, the choice between bitmap and vector graphics, and compression choice; see the note below on parts of 1.1 this overview does not go into.
Computer Science · Cambridge · AS Level
Read guide -
Practice questions
A Level Computer Science: Information Representation — Practice Questions
Original exam-style practice questions with full worked answers on two's complement, overflow, character sets and compression for AS Computer Science. Floating point is full-A-Level-only content and is not covered by these AS-stage questions.
Computer Science · Cambridge · AS Level
Try questions -
Study guides
A Level Computer Science: Communication (Cambridge 9618)
LAN/WAN characteristics, client-server and peer-to-peer models, network topologies, cloud computing, wired and wireless media, Ethernet and CSMA/CD, IP addressing, and how URLs and DNS locate resources on the web – the full content of Topic 2 Communication for Cambridge International AS & A Level Computer Science 9618.
Computer Science · Cambridge · AS Level
Read guide
Related articles
-
teaching
A Level tuition in Dubai: Cambridge or Pearson Edexcel International A Level?
Schools in Dubai and Abu Dhabi teach either Cambridge International AS & A Level or Pearson Edexcel International A Level. How the two are structured, why it matters for tuition, and how online classes from Lahore work.
9 October 2026
-
curriculum guides
Choosing subjects at IGCSE and A Level
How subject choices at 14 and 16 affect university options later, and how to keep pathways open without overloading a timetable.
28 July 2026
Studying this with a teacher
Working through Computer Science AS LEVEL?
This page is free and stays free. If you would rather be taught it, Marlbridge runs Computer Science classes one-to-one and in small groups of up to 15, online in your own time zone. The first trial class is free. WhatsApp replies within an hour (8am–11pm Pakistan time, every day); email the same day.
Cambridge Computer Science teachers at Marlbridge