Forty5
EN
Download the app Open the app

IB Diploma · Study guide

How to study for IB Computer Science

Computer Science mixes theory with programming. Both need regular practice: definitions for the theory, and writing and tracing code for the rest.

How the course is laid out

In Forty5, Computer Science has 8 units and 152 lessons at HL:

  1. A1 Computer fundamentals
  2. A2 Networks
  3. A3 Databases
  4. A4 Machine learning
  5. B1 Computational thinking
  6. B2 Programming
  7. B3 Object-oriented programming
  8. B4 Abstract data types

Every lesson is listed on the IB Computer Science SL and HL page.

How the exam works

The written papers mix short answers, data or source questions and longer answers. Your subject guide and teacher have the exact papers and timings for your session.

Forty5’s practice papers for this course follow the same parts: Paper 1, Paper 2. Every question part shows its command term and marks.

Coursework is part of the grade too. The IB Computer Science IA guide explains it step by step.

Every formula in the course, by unit, is on the IB Computer Science formula sheet.

How to study it

Code a little every week

Small programs keep the syntax and the logic fresh.

Trace algorithms by hand

Trace tables for loops, searches and sorts catch most errors.

Learn definitions precisely

Theory questions are marked on exact terms.

Explain with the scenario

Link each point to the system in the question, not to computers in general.

Mistakes that cost marks

  • Off-by-one errors in loops.
  • Vague answers that name a term without explaining it.
  • Not answering in the context of the scenario.

Exam tips, unit by unit

From the Computer Science lessons in Forty5. More tips for each unit are on the IB Computer Science SL and HL page.

A1 Computer fundamentals

  • In a truth table, list the inputs in binary counting order (000, 001 … 111) so no row is missed, and add a column for each intermediate gate before the final output.
  • For explain and compare questions (RAM vs ROM, HDD vs SSD, compiler vs interpreter), make a point about each side and link it to the scenario, such as why a school laptop benefits from an SSD.

A2 Networks

  • Match each defence to the threat in the scenario (phishing → user training and 2FA; interception → encryption; DDoS → traffic filtering) instead of listing every defence you know.
  • Keep a switch and a router apart: a switch connects devices within a LAN using MAC addresses; a router forwards packets between networks using IP addresses.

A3 Databases

  • Trace a query on the data by hand: cross out every row that fails the WHERE condition before you count, total or average.
  • Keep three ideas apart: validation (is the value sensible?), referential integrity (does the foreign key match a record?) and concurrency control (are two users changing the same record?).

A4 Machine learning

  • Overfitting answers need the evidence (high training score, much lower test score) and a remedy (more varied data, a simpler model, a separate test set).
  • Make ethics answers specific and balanced: who is affected, what causes the harm (unrepresentative training data, a black-box model) and a realistic safeguard such as human review of high-stakes decisions.

B1 Computational thinking

  • Apply abstraction and decomposition to the scenario: name the actual sub-problems or the details that can be ignored, not a textbook definition.
  • For test data, give actual values with the expected outcome, and use both edges of a range as boundary data.

B2 Programming

  • For Big O, state the complexity and the reason (“two nested loops over n items, so O(n²)”), and scale times by the growth rate, not in proportion.
  • Watch off-by-one details: indexes start at 0, range(a, b) stops before b, and the last index of a list of length n is n − 1.

B3 Object-oriented programming

  • Trace object code carefully: each object keeps its own instance attributes, but a static (class) attribute is shared, so creating each new object can change it for all of them.
  • HL: choose between inheritance and aggregation with the is-a / has-a test, and explain polymorphism by saying which version of the method runs for each object.

B4 Abstract data types

  • Build a BST by inserting values strictly in the order given, then check that your in-order traversal comes out sorted.
  • Justify a choice of structure with the operations the scenario needs and their cost: a hash table for O(1) average lookup by key, a BST when data must also be listed in order, a queue when order of arrival matters.

Command terms you will meet most

These are the command terms used most in Forty5’s IB Computer Science practice questions. Each link says what the term asks for.

Written by the Forty5 team and checked on 8 November 2026. Exam details change between versions of a course, so check your subject guide with your teacher. Forty5 is not affiliated with or endorsed by the International Baccalaureate Organization.

Revise Computer Science five minutes at a time.

Short visual lessons that follow the current guide, exam-style questions with explanations, spaced reviews and timed practice papers. The first unit is free.

Open Forty5

More for IB students

Official IB information

For the rules and the current subject guides, check the IB’s own pages: