Skip to content

A Level Computer Science

A Level Computer Science combines theory papers with problem-solving and programming papers. The programming papers reward clear, correct pseudocode or code, and the habit of tracing it by hand.

Data representation

Two's complement represents negative integers: write the positive number in binary, flip every bit, then add 1. In 8 bits, −5 is 11111011. The leftmost bit has a negative place value (−128), so 8-bit two's complement covers −128 to +127.

Searching and sorting

Binary search for a value in a sorted list
AlgorithmTime complexityNote
Linear searchO(n)Works on unsorted data
Binary searchO(log n)Data must be sorted
Bubble sortO(n²)Simple; stops early if no swaps
Insertion sortO(n²)Fast on nearly sorted data

Abstract data types

StructureOrderTypical use
StackLIFO: last in, first outUndo, subroutine calls, recursion
QueueFIFO: first in, first outPrint jobs, keyboard buffer
Linked listNodes joined by pointersEasy insertion and deletion
Binary treeEach node has up to two childrenFast searching when ordered

Pseudocode and programming

Cambridge pseudocode uses DECLARE, ← for assignment, IF…THEN…ELSE…ENDIF, FOR…TO…NEXT, WHILE…ENDWHILE and REPEAT…UNTIL. A procedure performs a task; a function returns a value. Parameters can be passed BYVAL (a copy) or BYREF (the original, which the subroutine can change).

Worked example

Write pseudocode to count how many values in Marks[1:30] are 50 or more.

  1. DECLARE Count : INTEGER; Count ← 0

Key words

Test yourself

Build your own quiz: pick topics, number of questions and a time limit. It's marked for you, with the working for every answer.

5 questions available

Build a quiz

Questions students ask

Which programming language should I use for A Level Computer Science?

Cambridge allows Python, Java or Visual Basic for the practical paper. Python is the most popular choice in Pakistani schools because its syntax is short and clear.

How do I improve at pseudocode questions?

Learn the exact Cambridge keywords from the pseudocode guide and practise writing short algorithms (totals, counts, searches, sorts) until the structure feels automatic.

Want one-to-one help?

A checked Computer Science tutor, at home in Islamabad or Rawalpindi or online. The first 30 minutes are free.

Find a Computer Science tutor