Ace the new IB Computer Science
Built for the course examined from May 2027: Theme A concepts, Theme B with Python code examples, the computational solution (IA) and the pre-seen case study. Check off topics, self-mark the practice questions, and watch your progress climb.
Start with A1 →Jump to a section
How the course is assessed
Start here: how the course is assessed and how to use this site.
| Component | SL | HL | What it tests |
|---|---|---|---|
| Paper 1 | 1 h 15 min · 35% · Section A 38 marks + Section B 12 marks | 2 h · 40% · Section A 56 marks + Section B 24 marks | Theme A (A1–A4) + the pre-seen case study |
| Paper 2 | 1 h 15 min · 35% | 2 h · 40% | Theme B (B1–B4), in Python or Java (your school chooses one). Some questions ban built-ins. |
| Internal Assessment | 30% · 30 marks | 20% · 30 marks | The computational solution: 35 hours, ≤2,000 words, mandatory video (max 5 minutes) |
Paper 1 covers Theme A (how computing systems work) plus Section B on the pre-seen case study, which is now compulsory for SL as well as HL. Paper 2 covers Theme B (computational thinking, programming, OOP and, for HL, abstract data types) and has separate Python and Java versions (your school chooses one); the code on this site is in Python. The IA is a 35-hour project you control from start to finish.
The 2027 case study
The May and November 2027 case study is titled “Generative AI for image creation — a diffuse vision”. Your teacher will give you the official document from the IB Programme Resource Centre. Start your glossary the week you receive it: see the Case Study page.
How to use this site
- Each topic page has: what the syllabus expects (with HL-only content flagged), the key ideas in one screen, websites and videos that explain it well, exam tips specific to that topic, and practice questions with mark-scheme notes.
- Use the Exam Technique page before every test — most lost marks come from answering the wrong command term, not from missing knowledge.
- Use the IA page from Year 1 Term 3 onwards. Keep the development log every week; it cannot be reconstructed later.
- Try practice questions on paper, to time (about 1.5 minutes per mark), before looking at the answer notes.
Your two-year route through the course
| When | Units | Milestone |
|---|---|---|
| Y1 Term 1 | A1 Computer fundamentals · B1 Computational thinking | Diagnostic test; begin thinking about IA ideas |
| Y1 Term 1–2 | B2 Programming fundamentals | Python proficiency checkpoint |
| Y1 Term 2 | A2 Networks | Unit test |
| Y1 Term 2–3 | A3 Databases (HL adds A3.4) | SQL practical assessment |
| Y1 Term 3 | B3 Object-oriented programming (HL adds B3.2) | OOP mini-project; IA Criterion A draft |
| Y2 Term 1 | A4 Machine learning (HL adds A4.2–A4.3) · B4 ADTs (HL only) | IA Criteria B–D; HL ADT test |
| Y2 Term 2 | Case study study period; IA final submission | Case study glossary complete |
| Y2 Term 3 | Revision and mocks | Full papers to time, in your exam mode (paper or digital) |
General resources
- faq.computersciencewiki.orgIB-specific wiki organised by the 2027 themes, with IA rubrics and case-study notes (replaces computersciencewiki.org).
- IB Computer Science subject pageOfficial subject brief. Your teacher can download the full guide, specimen papers and the case study from the Programme Resource Centre.
- Isaac Computer ScienceFree, high-quality topic notes and self-marking questions covering almost every Theme A and B concept.
- Crash Course Computer Science (YouTube)40 short episodes from transistors to machine learning — search the channel for the Computer Science playlist.
- Computerphile (YouTube)Deeper single-topic videos from University of Nottingham academics.
- Python TutorStep through Python code visually — the best tool for learning to trace.
- r/IBOStudent community; useful for IA ideas and exam-day advice (check anything technical against the guide).
A1 · Computer fundamentals
Paper 1 · SL 11 hours / HL 18 hours · Hardware, data representation, logic, operating systems and (HL) translation.
What the syllabus expects
| Code | Topic | SL | HL extra |
|---|---|---|---|
| A1.1 | Computer hardware and operation: CPU components, buses, fetch–decode–execute, memory hierarchy, secondary storage, compression, cloud services | ✔ | CPU vs GPU comparison, pipelining in multi-core systems |
| A1.2 | Data representation and computer logic: binary/hex/two's complement, how binary stores text, images and sound, logic gates, truth tables, logic diagrams | ✔ | — |
| A1.3 | Operating systems and control systems: role and functions of the OS, scheduling, polling vs interrupts | ✔ | Multitasking, deadlock, control systems (sensor → controller → actuator) |
| A1.4 | Translation: compilers vs interpreters | — | HL only: evaluating compilers, interpreters, bytecode + JIT |
Key ideas in one screen
- The CPU is the ALU, the control unit and registers, joined by the address, data and control buses. The PC holds the address of the next instruction; MAR holds an address; MDR holds data; IR holds the current instruction.
- Fetch–decode–execute: PC → MAR → address bus → memory returns instruction on data bus → MDR → IR; PC increments during fetch.
- Cache works because of locality of reference: a hit is fast, a miss stalls the CPU while data comes from RAM.
- Storage: SSD is fast and robust but costly per GB; HDD is slow, cheap and large; eMMC is cheap and embedded. Match the choice to the scenario's dominant requirement.
- Compression: lossless (RLE, ZIP, PNG) is perfectly reversible; lossy (JPEG, MP3) permanently discards data people barely notice. RLE makes files bigger when there are no runs.
- Cloud: IaaS — you manage the OS upward; PaaS — you manage only your application; SaaS — you manage nothing.
- Data representation: convert binary ↔ hex through 4-bit nibbles; two's complement = invert bits and add 1; image size = width × height × colour depth ÷ 8.
- Logic: seven gates; a bubble on a gate symbol means inversion; a truth table with n inputs needs 2ⁿ rows and intermediate columns; De Morgan lets you break the bar and change the sign.
- OS functions: memory, file system, device, scheduling, security, accounting, user interface, virtualisation, networking. FCFS is simple but suffers the convoy effect; round robin is fair but pays switching overhead; priority is efficient but can starve low-priority jobs.
- Polling suits frequent, predictable events; interrupts save power and suit rare, unpredictable ones.
- HL: CPU optimises latency, GPU optimises throughput; pipelining overlaps fetch/decode/execute/write-back but hazards limit the gain; deadlock needs all four Coffman conditions; compilers are fast but not portable, interpreters are portable but slow, bytecode + JIT is the modern compromise.
Websites and videos
- Isaac CS – Computer systemsNotes and self-marking questions on CPU architecture, memory, storage, OS and translation.
- Crash Course CS episodes 1–10Electricity → logic gates → binary → ALU → registers/RAM → CPU → instructions. Watch in order.
- Ben Eater (YouTube)Builds a working 8-bit CPU on breadboards — the clearest explanation of fetch–decode–execute anywhere.
- Logic.lyBrowser logic-gate simulator: build circuits and check your truth tables.
- Computerphile – GPU, cache and pipelining videosSearch the channel for “GPU”, “cache” and “pipeline” for HL depth.
- Khan Academy – Computers and the InternetBinary, digital data and file compression at an accessible level.
Exam tips for A1
- Show every step of a conversion. A wrong final answer with correct working still earns method marks; a bare wrong number earns nothing.
- File-size calculations: pixels × bits → bits ÷ 8 → bytes → MB. State units at every line.
- For truth tables, write out the intermediate columns (e.g. A XOR B, NOT C) before the final output — they carry marks.
- Scheduling questions want the trade-off: name the algorithm's advantage and its characteristic weakness (convoy effect, starvation, switching overhead).
- Polling vs interrupts questions are almost always “evaluate” — relate to the scenario (battery life, event frequency) and finish with a judgement.
- HL translation questions: compare on speed, portability, error detection and protection of source code, then conclude for the scenario given.
Practice questions
1State the register that holds the address of the next instruction to be fetched.1 mark
2Describe the fetch stage of the fetch–decode–execute cycle, with reference to registers and buses.4 marks
3Explain why a cache miss reduces CPU performance.3 marks
4Convert the binary number 11010110 to (a) decimal and (b) hexadecimal.3 marks
5A photograph is 800 × 600 pixels with a colour depth of 24 bits. Calculate the uncompressed file size in megabytes.3 marks
6Explain why run-length encoding may increase the size of some files.2 marks
7Construct a truth table for Q = (A XOR B) AND (NOT C).4 marks
8Compare round robin and priority scheduling.4 marks
9A wireless doorbell runs on a small battery. Evaluate the use of polling versus interrupt handling for detecting the button press.6 marks
10Explain how pipelining improves performance, and identify one factor that prevents the full theoretical speedup.5 marks
11Explain, with reference to the Coffman conditions, how deadlock can arise between two processes, and describe one method of preventing it.6 marks
A2 · Networks
Paper 1 · SL 11 hours / HL 18 hours · Fundamentals, architecture, data transmission and security.
What the syllabus expects
| Code | Topic | SL | HL extra |
|---|---|---|---|
| A2.1 | Network fundamentals: PAN/LAN/WAN/VPN, digital infrastructure, devices (NIC, switch, router, WAP, modem, gateway, firewall), transport and application protocols (TCP, UDP, HTTP/S, DHCP, DNS…) | ✔ | The TCP/IP model and encapsulation |
| A2.2 | Network architecture: topologies (star, mesh, hybrid…), client–server vs peer-to-peer, segmentation (subnets, VLANs) | ✔ | Types of server |
| A2.3 | Data transmission: IPv4/IPv6 addressing, NAT, transmission media, packet switching | ✔ | Static vs dynamic routing |
| A2.4 | Network security: firewalls, encryption, digital certificates | ✔ | Common vulnerabilities and countermeasures |
Key ideas in one screen
- PAN (metres), LAN (one site, owned), WAN (wide area, leased infrastructure), VPN (encrypted tunnel over public infrastructure). The Internet is not the World Wide Web.
- Link-layer devices (NIC, switch, WAP) use MAC addresses; internet-layer devices (router, gateway) use IP addresses; a modem converts digital ↔ analogue; a firewall filters.
- TCP is reliable, ordered and connection-based (handshake) but slower; UDP is fast with no guarantees — used for live streaming, gaming and VoIP. HTTPS = HTTP + TLS gives confidentiality, integrity and authentication. DHCP uses Discover–Offer–Request–Acknowledge.
- Star: cheap and simple, central switch is a single point of failure. Full mesh: redundant and reliable but needs n(n−1)/2 links. Real networks are hybrids.
- Client–server: central control and security, but a single point of failure. P2P: resilient and scalable, but weak security and administration.
- Subnets work at layer 3, VLANs at layer 2; both shrink broadcast domains (performance) and contain breaches (security).
- IPv4 is 32-bit, IPv6 is 128-bit. Private address ranges are not routable; NAT lets many private devices share one public address — but NAT is not a firewall.
- Media: fibre is fast, long-range, secure and expensive; twisted pair is cheap with a 100 m limit and EMI susceptibility; wireless is mobile and convenient but least secure and least reliable.
- Packet switching: split into packets with headers and sequence numbers, route independently, reassemble at the destination; efficient and resilient but introduces jitter and possible loss.
- Security: firewalls are necessary but not sufficient (they cannot inspect encrypted traffic or stop social engineering). Symmetric encryption is fast but has a key-distribution problem; asymmetric solves distribution but is slow; real systems use both. Certificates bind a public key to a verified identity and defeat man-in-the-middle attacks.
Websites and videos
- Cloudflare Learning CenterExcellent plain-English explainers on TCP/IP, DNS, HTTPS, TLS, DDoS and firewalls.
- Isaac CS – NetworkingTopologies, protocols, packet switching and security with self-marking questions.
- Crash Course CS episodes 28–31Computer Networks, The Internet, The World Wide Web, Cybersecurity.
- Cisco Networking Academy – Packet TracerFree network simulator; build a star/hybrid network, configure DHCP and watch packets move.
- Computerphile – networking and cryptography videosSearch the channel for “TLS handshake”, “public key cryptography”, “DNS”.
- Practical Networking (YouTube)Clear whiteboard walkthroughs of routing, switching, NAT and subnetting.
Exam tips for A2
- When asked to compare devices or protocols, put both items in every sentence (“a switch forwards by MAC address within one network, whereas a router forwards by IP address between networks”).
- Topology questions are scenario-based: count the nodes, mention cost, single point of failure, redundancy and ease of adding devices, then conclude.
- Never write “NAT makes the network secure”. Say it conserves public addresses and hides internal addresses, and that security comes from the firewall.
- For encryption questions, name the problem each type solves: symmetric = speed, asymmetric = key distribution, certificate = identity.
- “Discuss the effectiveness of a firewall” (8 marks) wants what it does well, what it cannot do, and a balanced conclusion recommending it as part of layered security.
- HL: the TCP/IP model has four layers (application, transport, internet, link); explain encapsulation as each layer adding its own header on the way down.
Practice questions
1Describe two differences between a LAN and a WAN.2 marks
2Explain why UDP rather than TCP is used for live video streaming.3 marks
3Describe the function of a router and explain how it differs from a switch.4 marks
4A school is choosing between a star and a mesh topology for a new lab of 30 machines. Discuss which is more appropriate.6 marks
5Explain the role of NAT in a home network.4 marks
6Explain how packet switching allows data to be transmitted reliably across a network.5 marks
7Explain the difference between symmetric and asymmetric cryptography, and describe why HTTPS uses both.6 marks
8Describe the four layers of the TCP/IP model and explain the role of encapsulation.6 marks
9Describe three common network vulnerabilities and identify an appropriate countermeasure for each.6 marks
A3 · Databases
Paper 1 · SL 11 hours / HL 18 hours · Relational design, normalisation, SQL and (HL) alternative databases.
What the syllabus expects
| Code | Topic | SL | HL extra |
|---|---|---|---|
| A3.1 | Database fundamentals: features, benefits and limitations of relational databases | ✔ | — |
| A3.2 | Database design: schemas, ERDs, data types, constructing tables, normal forms to 3NF, denormalisation | ✔ | — |
| A3.3 | Database programming: DDL vs DML, SELECT with JOIN/WHERE/ORDER BY, INSERT/UPDATE/DELETE | ✔ | Aggregate functions, GROUP BY/HAVING, views, transactions (ACID) |
| A3.4 | Alternative databases and data warehouses | — | HL only: NoSQL, cloud, spatial and in-memory databases; data warehouses; OLAP and data mining; distributed databases (CAP) |
Key ideas in one screen
- Tables, rows, columns. A primary key uniquely identifies a row; a foreign key references another table's primary key; a many-to-many relationship always needs a junction table; the FK sits on the “many” side of a 1:M.
- Benefits: less duplication, consistency, integrity via constraints, concurrent access, ACID transactions, security, ad hoc querying. Limitations: rigid schema, design effort, weak horizontal scaling, poor fit for unstructured or hierarchical data.
- Three schemas: conceptual (what — ERD), logical (how structured — tables, types, keys), physical (how stored — indexes, files).
- ERD crow's foot: inner symbol = modality (○ optional, | mandatory); outer symbol = cardinality (| one, crow's foot many).
- Normalisation: 1NF atomic values; 2NF no partial dependencies on part of a composite key; 3NF no transitive dependencies. “The key, the whole key and nothing but the key.” It removes insertion, update and deletion anomalies.
- Denormalisation trades integrity for read speed — justified for read-heavy reporting. Normalise first, denormalise deliberately.
- SQL clause order: SELECT – FROM – JOIN – WHERE – GROUP BY – HAVING – ORDER BY. WHERE filters rows before grouping; HAVING filters groups after. UPDATE or DELETE without WHERE affects every row. Indexes speed reads and slow writes.
- HL: aggregates ignore NULL except COUNT(*); virtual views are live but slow, materialised views are fast but stale; ACID = atomicity, consistency, isolation, durability with BEGIN/COMMIT/ROLLBACK; data warehouses are subject-oriented, integrated, time-variant, non-volatile; OLAP is hypothesis-driven, data mining is discovery-driven; distributed databases face the CAP trade-off.
Websites and videos
- SQLBoltInteractive lessons from SELECT to JOIN, GROUP BY and UPDATE — do all of them.
- SQLZooHundreds of graded query exercises with instant checking; the JOIN and aggregate sections map to A3.3.
- W3Schools SQL TutorialSyntax reference with a try-it editor; good for looking up a clause quickly.
- DB Browser for SQLiteFree desktop tool to design tables and run queries — also ideal for an IA that uses a database.
- Decomplexify – Normalization explained (YouTube)The clearest 1NF/2NF/3NF walkthrough with a single running example.
- draw.io / diagrams.netDraw ERDs (Entity Relation shape library) for exam practice and the IA.
- Isaac CS – DatabasesNotes and questions on relational databases, normalisation and SQL.
Exam tips for A3
- In a normalisation question, show each stage: identify the key, list dependencies, then write the final tables with PKs underlined and FKs marked (*). The table list carries most of the marks.
- Always resolve many-to-many relationships with a junction table whose primary key is usually composite.
- Write SQL keywords in capitals, quote strings, and check every JOIN has an ON condition matching FK = PK. Sort with ORDER BY last.
- “Explain why storing X as INT is a problem” questions want concrete consequences: leading zeros lost, characters rejected, no meaningful arithmetic.
- Denormalisation and NoSQL questions are “evaluate/discuss”: give the workload (read-heavy? varied structure? huge scale?), both sides, and a conditional conclusion.
- HL: for ACID, use a bank-transfer example and tie each property to one line of the story.
Practice questions
1Define the terms primary key and foreign key.2 marks
2Explain why a many-to-many relationship cannot be implemented directly in a relational database, and describe how it is resolved.4 marks
3A table stores phone numbers as INT. Explain two problems this causes.4 marks
4The table Booking(BookingID, GuestName, GuestPhone, RoomNumber, RoomType, RatePerNight, CheckIn, Nights) is in 1NF. Normalise it to 3NF, showing each stage.8 marks
5Explain the difference between the WHERE and HAVING clauses.3 marks
6Using Student(StudentID, Surname, YearGroup), Enrolment(StudentID*, CourseID*, Grade), Course(CourseID, CourseName, Department), write SQL to list the surname and course name of every Year 12 student taking a Science course, sorted by surname.5 marks
7Evaluate the decision to denormalise a database used for a reporting dashboard.6 marks
8Explain, with an example, how the ACID properties ensure data integrity during a bank transfer.6 marks
9A social media company must store user posts of widely varying structure at massive scale. Discuss whether a relational or NoSQL database is more appropriate.8 marks
A4 · Machine learning
Paper 1 · SL 5 hours / HL 18 hours · Fundamentals and ethics for all; preprocessing and ML approaches for HL.
What the syllabus expects
| Code | Topic | SL | HL extra |
|---|---|---|---|
| A4.1 | ML fundamentals: supervised, unsupervised, reinforcement, deep and transfer learning; hardware for training and inference (CPU, GPU, TPU, FPGA, edge, cloud) | ✔ | — |
| A4.2 | Data preprocessing: cleaning, missing data, normalisation, feature selection, dimensionality reduction | — | HL only |
| A4.3 | ML approaches: linear regression, classification (k-NN, decision trees), evaluation metrics, clustering, association rules, reinforcement learning, genetic algorithms, neural networks and CNNs, model selection | — | HL only |
| A4.4 | Ethical considerations: bias, fairness, transparency, consent, inference, environmental impact; ethics of computing in daily life | ✔ | — |
Key ideas in one screen
- Supervised = labelled data, predicts a label (classification) or a value (regression). Unsupervised = unlabelled data, finds structure (clustering, association). Reinforcement = agent, environment, reward, policy. Deep learning = many-layered networks that learn features automatically. Transfer learning reuses a pretrained model and fine-tunes it on a small dataset.
- Training is heavy, inference is light. GPU is the mainstream training choice (thousands of parallel cores, high memory bandwidth); TPU/ASIC gives maximum efficiency at scale with no flexibility; FPGA is the reconfigurable middle ground; edge devices give low-latency, private local inference; cloud gives elastic capacity.
- HL preprocessing: garbage in, garbage out. Handle outliers, duplicates, bad formats; missing data by deletion, imputation or prediction (each with its own bias risk). Normalise for any distance-based algorithm. Feature selection: filter (fast), wrapper (accurate, expensive), embedded (compromise). Curse of dimensionality: sparsity and breakdown of distance metrics.
- HL approaches: linear regression (slope, r²; correlation ≠ causation); k-NN (small k overfits, large k underfits; needs scaling); decision trees (interpretable but overfit — prune or use forests); precision = trust the yes, recall = catch everything, F1 balances them, accuracy misleads on imbalanced data; association rules need lift > 1; RL balances exploration and exploitation; genetic algorithms use selection, crossover and mutation (mutation escapes local optima); perceptron = inputs, weights, bias, activation; CNNs use shared kernels for translation invariance and pooling to downsample.
- Ethics: bias comes from data that reflects an unequal world; fairness definitions conflict; black-box models obstruct accountability; consent is often fictional at scale; inference reveals facts never disclosed; environmental costs (and benefits) are real. Structure every ethics answer: context, named issues, both sides, mitigations, conclusion.
Websites and videos
- Google Machine Learning Crash CourseFree, short modules with visuals on regression, classification, metrics and fairness — covers most of A4.1–A4.3.
- TensorFlow PlaygroundTrain a small neural network in the browser and watch layers, activation and overfitting happen.
- Teachable MachineTrain an image/sound classifier in minutes — a concrete feel for training data and bias.
- 3Blue1Brown – Neural networks series (YouTube)Best visual explanation of what a neural network is and how gradient descent trains it (HL).
- StatQuest with Josh Starmer (YouTube)Short, friendly videos on linear regression, k-NN, decision trees, precision/recall and clustering.
- Crash Course CS episode 34: Machine Learning & AIA 12-minute overview that matches the SL fundamentals.
- MIT Technology Review – AI ethicsReal cases of bias, surveillance and environmental cost to quote in A4.4 answers.
Exam tips for A4
- Every “describe an application” answer must name the type of learning and say why (labelled data? reward signal?).
- Hardware questions are scenario questions: ask whether it is training or inference, whether latency matters, whether data can leave the site, then justify.
- HL: if a question mentions accuracy on a rare event, immediately suspect class imbalance and bring in precision, recall and F1.
- HL: normalise before k-NN or k-means — say why (large-magnitude features dominate the distance).
- Ethics (8 marks): specific context → at least three named issues (bias, transparency, consent, accountability) → mitigation for each → balanced conclusion. Generic answers cap at half marks.
- Link A4.4 to the case study: the 2027 case study is about generative image AI, so bias in training data, consent of artists and environmental cost are likely Section B territory.
Practice questions
1Distinguish between supervised and unsupervised learning.3 marks
2Describe two real-world applications of machine learning, identifying the type used in each.4 marks
3Explain why GPUs are more suitable than CPUs for training neural networks.4 marks
4A hospital wants to run an ML model that detects abnormalities in scans inside the operating theatre. Describe the hardware you would recommend and justify your choice.5 marks
5Discuss the ethical implications of using machine learning to screen job applications.8 marks
6A model that detects a rare disease achieves 99% accuracy. Explain why this figure may be misleading, and state which metrics should be used instead.5 marks
7Explain the exploration–exploitation trade-off in reinforcement learning.4 marks
8Explain why mutation is necessary in a genetic algorithm.3 marks
B1 · Computational thinking
Paper 2 · 5 hours · Problem specification, the four concepts, flowcharts and tracing.
What the syllabus expects
| Code | Topic | SL | HL extra |
|---|---|---|---|
| B1.1.1 | Constructing a problem specification (problem statement, constraints, objectives, input/output specifications, evaluation criteria) | ✔ | — |
| B1.1.2 | The four concepts: decomposition, pattern recognition, abstraction, algorithmic design | ✔ | — |
| B1.1.3 | Applying computational thinking across computer science (and beyond) | ✔ | — |
| B1.1.4 | Tracing flowcharts and pseudocode with trace tables | ✔ | — |
Key ideas in one screen
- A problem specification has six parts: problem statement, constraints and limitations, objectives and goals, input specification, output specification, evaluation criteria. Objectives must be testable; the specification says what, not how.
- Decomposition — break the problem into manageable sub-problems. Pattern recognition — spot similarities and reuse solutions. Abstraction — remove irrelevant detail and hide complexity behind an interface. Algorithmic design — define precise, ordered steps.
- Computational thinking is not programming: it applies to database design, network security, ML — and to medicine, logistics and cooking.
- Flowchart symbols: terminal (oval), input/output (parallelogram), process (rectangle), decision (diamond), flow line (arrow), connector (circle).
- Tracing: one column per variable, one row per change; evaluate every condition with the current values; check the boundaries; never skip an iteration; always show the table.
Websites and videos
- BBC Bitesize – Computational thinkingShort, clear pages on decomposition, abstraction, pattern recognition and algorithms.
- Isaac CS – Computational thinking and algorithmsTrace-table practice with instant marking.
- FlowgorithmFree tool that lets you draw a flowchart and run it step by step — perfect for tracing practice.
- Python TutorPaste any algorithm and step through it to check your trace table.
- Crash Course CS episode 13: Intro to AlgorithmsWhy algorithm design and efficiency matter.
Exam tips for B1
- A trace table earns marks even when the final output is wrong. Draw it every time.
- When a flowchart “contains an error”, trace it with the given inputs first — the error shows itself in the table (often a comparison against the wrong variable).
- Problem-specification questions (8 marks) are marked per component: label each part (Problem statement, Constraints, Objectives, Inputs, Outputs, Evaluation criteria) and make every objective measurable.
- When asked how abstraction applies to a topic, give a concrete mechanism: three-schema architecture, a database view, an ADT, the OS hiding hardware.
Practice questions
1State the four fundamental concepts of computational thinking.2 marks
2Explain, with an example, how abstraction is applied in database design.3 marks
3Explain why computational thinking does not necessarily involve programming, giving one non-computing example.3 marks
4Complete a trace table for: result ← 1; i ← 1; INPUT n; WHILE i <= n: result ← result * i; i ← i + 1; OUTPUT result — with input n = 5, and state the output.5 marks
5The flowchart INPUT a,b,c; max ← a; IF b > max THEN max ← b; IF c > b THEN max ← c; OUTPUT max is meant to find the largest of three numbers but contains an error. Trace it with inputs 4, 9, 7 and identify the error.5 marks
6Describe the purpose of each of the six standard flowchart symbols.6 marks
B2 · Programming
Paper 2 · SL 40 hours / HL 42 hours · The biggest topic: Python fundamentals, data structures, constructs, algorithms and files.
What the syllabus expects
| Code | Topic | SL | HL extra |
|---|---|---|---|
| B2.1 | Programming fundamentals: variables, constants, data types, operators, input/output, validation, error types | ✔ | — |
| B2.2 | Data structures: static vs dynamic structures, arrays/lists, stacks (LIFO) and queues (FIFO). Python dictionaries, sets and tuples are handy, but sets and hash tables are examined in B4 (HL) | ✔ | — |
| B2.3 | Programming constructs: sequence, selection, iteration, sub-programs (functions), parameters and scope | ✔ | — |
| B2.4 | Algorithms: efficiency and Big O, linear and binary search, bubble and selection sort (insertion sort is not listed in the guide, but it is a useful comparison) | ✔ | Recursion |
| B2.5 | File processing: reading, writing, appending, handling errors | ✔ | — |
Key ideas in one screen
- Python is dynamically typed; input() always returns a string, so convert with int() or float(). Local vs global scope. Short-circuit evaluation of and/or.
- Validation types: range, type, length, presence, format, lookup, consistency. Good validation re-prompts and explains the problem.
- Errors: syntax (caught before running), run-time (crash during execution, e.g. ZeroDivisionError, IndexError), logic (runs but gives the wrong answer — the dangerous one). Test with normal, boundary and erroneous data.
- Lists give O(1) index access and grow dynamically; dictionaries give O(1) lookup by key; sets give uniqueness and fast membership. Valid indices run from 0 to length−1.
- Order selection conditions from most to least restrictive. A while loop may run zero times. range(n) gives 0 to n−1.
- Functions: reusability, decomposition, maintainability, readability, testability. Parameters sit in the definition, arguments at the call.
- Complexity ladder: O(1) < O(log n) < O(n) < O(n log n) < O(n²) < O(2ⁿ).
- Linear search O(n), no sorting needed; binary search O(log n) but requires sorted data. Bubble sort O(n²) with O(n) best case using a swapped flag, stable; selection sort always O(n²), few swaps, not stable; insertion sort O(n²) but O(n) on nearly sorted data, stable.
- HL recursion: base case + recursive case; uses O(depth) stack space; naive Fibonacci is O(2ⁿ); best suited to trees and divide-and-conquer.
- Files: mode 'w' overwrites, 'a' appends, 'r' reads; use with open(...); write() does not add a newline; handle FileNotFoundError and malformed lines.
- Static vs dynamic data structures — a static structure has a fixed size set when it is created (a classic array); a dynamic one can grow and shrink while the program runs (a Python list, a linked list).
- Stack — LIFO. push, pop, peek, isEmpty all O(1); one pointer (top, −1 when empty). Underflow on empty pop, overflow on full push. Uses: call stack, undo, bracket matching, backtracking, reversal.
- Queue — FIFO. enqueue at rear, dequeue at front, O(1); two pointers. A circular queue uses modulo arithmetic to reuse vacated slots. Uses: print spooling, CPU scheduling, packet buffers, breadth-first search.
Python exam syntax you must know from memory
name = input("Enter name: ") # always a string
age = int(input("Enter age: ")) # convert explicitly
print(f"{name} is {age}, avg {avg:.2f}")
for i in range(1, 6): # 1..5
...
while condition:
...
items.append(9); items.insert(0, 5)
items.remove(7) # by VALUE
del items[0] # by INDEX
items[1:3]; items[-1]; len(items)
d = {"a": 1}; d["b"] = 2; d.get("z", 0)
for key, value in d.items(): ...
if "a" in d: ... # O(1)
s.split(","); ",".join(lst); s.strip(); s.isdigit()
def total(values, start=0):
return start + sum(values)
with open("data.txt", "r") as f:
for line in f:
parts = line.strip().split(",")
with open("data.txt", "a") as f:
f.write("text\n") # add \n yourself
try:
n = int(text)
except ValueError:
print("Not a number")
except FileNotFoundError:
...Websites and videos
- Python TutorVisualise every line — use it to check trace tables and understand recursion.
- Official Python TutorialThe reference. Chapters 3–7 cover everything in B2.1–B2.3.
- Exercism – Python trackFree graded exercises with mentor feedback; great for building fluency without built-ins.
- VisuAlgoAnimated bubble, selection, insertion sort and binary search — watch the comparisons and swaps.
- USF Data Structure VisualizationsStep-by-step animations of searching and sorting algorithms (including stacks and queues for B2.2, and trees for B4).
- Big-O Cheat SheetOne page comparing the complexity of every search and sort you need.
- Corey Schafer – Python tutorials (YouTube)Clear videos on functions, file handling, exceptions and dictionaries.
- CS50P – Introduction to Programming with PythonHarvard's free course; lectures on loops, exceptions, files and testing are a perfect B2 companion.
Exam tips for B2 (Paper 2)
- Stack/queue trace questions: draw the structure after every operation and write what each operation returns. peek() does not remove.
- Underline the requirement. “Return the index” is not “return the value”; “do not use built-in functions” means write the loop yourself.
- Write comments as you go — they show intent and earn marks when the code has a slip.
- Handle the edge cases: empty list, one element, value not found, division by zero. Initialise a maximum with the first element, not 0 (negative data breaks 0).
- Watch loop bounds: range(len(items)) not range(len(items)+1); the last valid index is len−1.
- For sorting questions, justify the algorithm against the scenario: nearly sorted → insertion sort; minimal writes → selection sort; small and simple → bubble sort.
- Hand-trace bubble, selection, insertion sort and binary search on 6–8 element arrays until it is automatic.
- Minor syntax slips are rarely penalised unless syntax is the point; logic errors always are. If you forget a method name, write clear pseudocode and say what you intend.
- Practise both modes: built-ins allowed (IA) and built-ins banned (exam).
Practice questions
1Distinguish between a variable and a constant, and state one advantage of using a constant.3 marks
2Describe three types of validation that could be applied to a field storing a student's date of birth.6 marks
3Distinguish between a run-time error and a logic error, giving an example of each.4 marks
4Construct an algorithm in Python that reads a list of integers and returns the second largest value, without using built-in sorting or max functions.6 marks
5Trace a binary search for the value 45 in [12, 19, 27, 33, 45, 58, 61, 74]. Show low, high and mid at each step.4 marks
6Explain why binary search cannot be used on an unsorted array, and evaluate whether sorting an array before searching is worthwhile.6 marks
7A company must sort 50,000 customer records that are already almost in order. Compare bubble, selection and insertion sort for this task and justify which is most suitable.6 marks
8Describe two errors a program reading from a text file should handle, and outline how each should be handled.4 marks
9A stack contains 3, 7, 2 with 2 at the top. State the contents and any values returned after: push(9), pop(), peek(), push(5), pop().5 marks
10Explain why a circular queue is preferable to a linear array implementation of a queue.4 marks
11Explain the role of the base case in a recursive algorithm and describe what happens if it is omitted.3 marks
12Evaluate the use of recursion rather than iteration for calculating Fibonacci numbers.6 marks
B3 · Object-oriented programming
Paper 2 · SL 7 hours / HL 23 hours · Single-class OOP for everyone; inheritance, polymorphism, UML and design patterns for HL.
What the syllabus expects
| Code | Topic | SL | HL extra |
|---|---|---|---|
| B3.1 | OOP with a single class: benefits and trade-offs of OOP, designing classes with UML class diagrams, static vs non-static members, classes, objects and constructors, encapsulation and access modifiers | ✔ | — |
| B3.2 | OOP with multiple classes: inheritance, polymorphism including method overriding, abstraction and abstract classes, composition and aggregation, design patterns (singleton, factory, observer) | — | HL only |
Key ideas in one screen
- A class is a template; an object is an instance with its own state. The constructor (__init__) initialises a new object. Attributes hold state, methods define behaviour, self refers to the current object.
- Encapsulation bundles data with the methods that act on it and restricts direct access: attributes private (self.__balance), methods public. Benefits: validated setters protect integrity, the implementation can change without breaking callers, reduced coupling. Python enforces privacy by convention (name mangling), Java by keyword.
- Static (class) members are shared by every object; instance members belong to each object.
- HL four pillars: abstraction (expose only what matters), encapsulation (the mechanism enforcing it), inheritance (an “is-a” relationship; super() calls the parent constructor), polymorphism (one interface, many behaviours).
- HL: overriding = same signature in a subclass, resolved at run time; overloading = same name, different parameters, resolved at compile time. Polymorphism removes type-checking if/elif chains and lets systems grow without modification.
- HL: abstract classes cannot be instantiated and force subclasses to implement methods; interfaces define capability contracts.
- HL UML: + public, − private, # protected; hollow triangle points at the superclass; filled diamond = composition (part dies with the whole); hollow diamond = aggregation (part survives).
Websites and videos
- Real Python – Object-Oriented Programming in PythonThe best single article on classes, __init__, inheritance and super() in Python.
- Corey Schafer – Python OOP series (YouTube)Six videos: classes, class variables, classmethods, inheritance, special methods, property decorators.
- Refactoring Guru – Design PatternsPlain-language explanations with Python code for singleton, factory and observer (HL).
- Lucidchart – UML class diagram tutorialNotation guide for visibility, inheritance, composition and aggregation (HL).
- draw.io / diagrams.netDraw UML class diagrams for exam practice and your IA.
- Python TutorWatch objects being created on the heap and see why each instance has its own attributes.
Exam tips for B3
- When you write a class in the exam: constructor with validation, private attributes, getters, and methods that return a success/failure result. Comment the validation — it is where the marks are.
- “Explain how encapsulation improves reliability and maintainability” wants two threads: validated setters protect state (reliability); hidden implementation can change without touching callers (maintainability).
- HL: for a UML question, decide the relationship type first (inheritance / composition / aggregation) from the wording — “students continue to exist if a course is cancelled” means aggregation.
- HL: “evaluate inheritance” — reuse, extensibility and maintainability versus tight coupling, the fragile base class problem and misuse where composition fits better; conclude with when to prefer composition.
- Do not confuse abstraction (deciding what to expose) with encapsulation (the mechanism that enforces it).
Practice questions
1Distinguish between a class and an object.2 marks
2Describe the purpose of a constructor.3 marks
3Explain how encapsulation improves the reliability and maintainability of a program.6 marks
4A BankAccount class stores a balance. Construct the class in Python with a constructor, a deposit method and a withdraw method. Withdrawals must not make the balance negative.8 marks
5Distinguish between static and instance attributes, giving an example of an appropriate use of each.4 marks
6Distinguish between overriding and overloading.4 marks
7Explain, with an example, how polymorphism reduces the need for conditional statements.5 marks
8A school system has classes Person, Student, Teacher and Course. A course is taught by one teacher and has many students; students continue to exist if a course is cancelled. Construct a UML class diagram.7 marks
9Distinguish between composition and aggregation, giving an example of each.4 marks
B4 · Abstract data types (HL only)
Paper 2 · HL 23 hours · Linked lists, binary search trees, sets and hash tables. HL only — stacks and queues are in B2.2 and are examined at SL and HL.
What the syllabus expects
| Code | Topic | HL |
|---|---|---|
| B4.1.1 | The purpose of abstract data types (ADTs): defined by operations and behaviour, not implementation | ✔ |
| B4.1.2–B4.1.3 | Linked lists: singly, doubly and circular; evaluate, build and apply them; insertion and deletion; comparison with arrays | ✔ |
| B4.1.4 | Binary search trees (BSTs): structure, insertion, deletion, searching and traversal | ✔ |
| B4.1.5 | Sets: operations, membership, subset and superset checks | ✔ |
| B4.1.6 | Hash tables and sets: how they work and how they are implemented (dict/set in Python, HashMap/HashSet in Java) | ✔ |
Key ideas in one screen
- An ADT defines the operations and their behaviour, not the implementation. A linked list is an ADT; a node-and-pointer structure is an implementation. This is abstraction applied to data.
- Linked list — nodes with data plus a pointer to the next node. Dynamic size and O(1) insertion at the head, but O(n) access by position and poor cache performance. When inserting, set the new node's pointer before redirecting the previous node's.
- Binary search tree — left subtree smaller, right subtree larger. O(log n) search/insert/delete when balanced; degrades to O(n) if built from sorted input.
- Traversals: in-order (L, N, R) gives sorted order; pre-order (N, L, R) copies a tree; post-order (L, R, N) deletes a tree.
- Set — a collection of unique items with no required order. Key operations: add, remove, membership test, union, intersection and difference; A is a subset of B if every item of A is in B.
- Hash table — a hash function turns a key into an index, so a value can usually be found without searching: average O(1) lookup, insertion and deletion. Two keys can hash to the same index (a collision), which the implementation must handle, for example by chaining or probing. Python's dict and set and Java's HashMap and HashSet are hash tables.
- Stacks and queues are core content in B2.2 (SL and HL) — see the B2 page.
Websites and videos
- USF Data Structure VisualizationsAnimate linked lists, BST insertion/traversal and hash tables — build the tree from question 3 here.
- VisuAlgo – Linked list and BSTInteractive animations with the complexity of each operation shown.
- Computerphile – Linked Lists / Trees videosSearch the channel for “linked list”, “binary tree”, “stack”.
- mycodeschool – Data structures playlist (YouTube)Older but exceptionally clear whiteboard explanations of every ADT in this topic.
- Python TutorWatch node objects and pointers change as you implement a linked list.
Exam tips for B4
- For BST questions, draw the tree carefully from the insertion order, then write the three traversals directly underneath — the in-order must come out sorted; if it does not, your tree is wrong.
- Linked-list insertion: explain the pointer order (new.next = current.next, then current.next = new). Reversing the order loses the rest of the list — say so.
- “Discuss which ADT is most appropriate” answers follow the pattern: operations needed → complexity of each candidate → alternative and why it loses → conclusion.
- Link to other topics for top marks: the call stack and recursion (B2.4.4), queues and CPU scheduling (A1.3.3), Huffman trees and compression (A1.1).
Practice questions
1Define the term abstract data type and distinguish it from a data structure.3 marks
2Explain two advantages and two disadvantages of a linked list compared with an array.8 marks
3Construct a binary search tree by inserting, in order: 40, 20, 60, 10, 30, 50, 70, 35.4 marks
4For that tree, state the output of an in-order, a pre-order and a post-order traversal.6 marks
5Explain why the order in which values are inserted into a BST affects its efficiency.5 marks
6A system must store many records, search by unique ID, retrieve them in sorted order, and update frequently. Discuss which ADT is most appropriate.6 marks
7Describe what a hash table is and explain why looking up a value is usually fast.4 marks
8Explain what a collision is in a hash table and describe one way of handling it.3 marks
9Set A = {2, 4, 6, 8} and set B = {4, 8, 10}. State the union, the intersection and the difference A − B.3 marks
Internal Assessment · The computational solution
30% at SL, 20% at HL · 35 hours · 30 marks · ≤2,000 words · mandatory video (max 5 minutes).
The IA is marked on the documentation of a development process, not on how impressive the program is. A modest program that is well specified, planned, tested and honestly evaluated beats a spectacular program with thin documentation — every time.
The five criteria
| Criterion | Focus | Marks | Suggested words |
|---|---|---|---|
| A | Problem specification — problem statement, constraints, numbered success criteria | 4 | 150–200 |
| B | Planning — design (flowcharts, pseudocode, UML, ERD, data-structure and interface sketches), dated development log, test plan | 4 | 200–250 |
| C | System overview — architecture diagram, data structures justified against alternatives, data flow, file format, menu tree | 6 | 300–350 |
| D | Development — 3 to 5 significant techniques: name, code extract, how it works, why chosen, difficulty resolved | 12 | 700–800 |
| E | Evaluation — every success criterion checked with evidence and video timestamps; specific, justified improvements | 4 | 250–300 |
Criterion D carries 12 of the 30 marks (40%), and it is where most students underperform because they describe what the program does instead of justifying the techniques used. Deliverables: the written document (word count on page 1), full source code as an appendix, and a video of the solution running. Confirm criterion names and mark bands against your teacher's copy of the official guide.
Choosing a problem
- Solvable in roughly 20 hours of coding — not 5, not 100.
- Clear input → process → output structure, with data that persists in files.
- Natural complexity: searching, sorting, validating, calculating, relating several entities.
- Objectively testable — you can state what the right answer is.
- Interesting enough to hold your attention for 35 hours. There is no client requirement any more; pick a problem you actually care about.
| Works well | Why |
|---|---|
| Sports league manager (fixtures, results, standings) | Related entities, calculation, sorting, persistence |
| Library or equipment loan system | Records, searching, dates, overdue calculation |
| Flashcards with spaced repetition | Scheduling algorithm, persistence, statistics |
| Recipe manager with shopping-list generation | Aggregation across records, unit handling, search |
| Personal finance tracker with categorised reports | Calculation, grouping, date filtering, validation |
| Timetable clash-checker | Constraint checking, a real algorithm |
| Goes wrong | Why |
|---|---|
| “A game” (unspecified) | All interface, little computation, hard to test |
| A website or web app | Time drains into styling and frameworks |
| Anything built on ML libraries | The library does the work; the complexity is not yours |
| A calculator or a basic quiz | Not enough complexity (a quiz needs adaptive difficulty or analytics to count) |
| Something enormous (“a social network”) | Unfinished — and Criterion E will expose it |
| A followed tutorial | Not your work; academic integrity risk |
Writing success criteria that score
| Weak | Strong |
|---|---|
| The system will be user-friendly | A user can record a new result in under 30 seconds using only menu selections |
| The system will store data | All fixture data persists in a CSV file and reloads automatically on start-up |
| The system will be reliable | Non-numeric, negative, out-of-range or blank input is rejected with a message naming the problem; the program never terminates unexpectedly |
| The system will calculate standings | Standings are calculated from stored results, ordered by points then goal difference, matching a manual table for all 20 test fixtures |
Aim for six to eight numbered criteria (SC1, SC2 …) so you can reference them precisely in Criterion E.
Criterion D — the structure that works
- Name the technique (e.g. “insertion into a dictionary with a uniqueness check”).
- Show a focused, commented code extract — not the whole file.
- Explain how it works, step by step.
- Justify why you chose it over the alternatives, against a specific requirement.
- Note a difficulty and how you resolved it.
- Techniques that count: searching/sorting you wrote yourself, non-trivial data structures (ADTs at HL), file handling with error recovery, comprehensive validation, OOP design (inheritance/polymorphism at HL), recursion where genuinely appropriate, multi-condition aggregation, parameterised sub-programs, algorithms with a real complexity argument.
- Techniques that do not count: printing, arithmetic, a single if, a counting loop, or a built-in that does the whole interesting job.
- Comment the why, not the what.
Criterion E — be honest
Work through every success criterion by number with evidence (test IDs, video timestamps). Examiners can read your code and watch your video; an honest “partially met” scores better than an inflated claim. Improvements must be specific and follow from your own identified shortcomings — “replace the CSV with SQLite to enforce data types at the storage layer”, not “store data better”.
The video
- Screen recording of no more than 5 minutes, showing the product working and examples of testing.
- Demonstrate each success criterion in turn, narrated or captioned.
- Show failures being handled — invalid input rejected, missing file recovered — not only the happy path.
- Reference timestamps in your Criterion E table.
A 35-hour schedule
| Phase | Hours | Output |
|---|---|---|
| Problem selection and research | 2 | A decided, scope-tested problem |
| Criterion A — specification | 3 | Problem statement, constraints, 6–8 numbered success criteria |
| Criterion B — design and planning | 4 | Flowcharts, structure diagram, test plan, log started |
| Development — core functionality | 10 | Working input, storage and main processing |
| Development — complexity and refinement | 6 | The techniques you will write up in D; validation; error handling |
| Testing and debugging | 4 | Test plan executed with actual results recorded |
| Criteria C and D — write-up | 4 | System overview and development documentation |
| Criterion E — evaluation | 1 | Evaluation table and improvements |
| Video and final checks | 1 | Video recorded, word count verified, code appended |
Course checkpoints
| When | Checkpoint |
|---|---|
| Y1 Term 3 | Topic exploration, problem chosen, Criterion A drafted |
| Y2 Term 1 (early) | Design and planning (Criterion B) approved before serious coding |
| Y2 Term 1 (mid–late) | Development log up to date; working solution (Criterion C/D) |
| Y2 Term 1 (end) | Video recorded |
| Y2 Term 2 (early) | Evaluation (Criterion E); final submission |
Academic integrity
- All code must be your own except clearly identified library use.
- Cite any adapted code in a comment at the point of use and in a bibliography.
- AI-generated code must be declared; undeclared AI use is academic misconduct.
- Keep the dated development log from week one — it is evidence of authorship as well as marks in Criterion B.
Final checklist
- Word count stated on page 1 and under 2,000 (code, comments, diagrams, tables, captions and appendices excluded).
- All five criteria in clearly headed sections; success criteria numbered and referenced in E.
- Dated development log; test plan with actual (not just expected) results.
- Three to five techniques explained and justified in D; complexity is not a built-in doing the interesting work.
- Evaluation honest, including unmet criteria; improvements specific.
- Video plays, is within the length limit, shows each criterion and invalid input handling; timestamps referenced.
- Full source code appended; bibliography and AI declaration included.
Tools and resources for the IA
- faq.computersciencewiki.org – IA sectionOfficial IA rubrics and the three biggest mistakes students make.
- Clastify – IB CS IA exemplarsGraded exemplars to see what a top-band write-up looks like (do not copy — examiners know them).
- draw.io / diagrams.netFlowcharts, structure diagrams, UML, ERDs for Criteria B and C.
- OBS StudioFree screen recorder for the video.
- DB Browser for SQLiteIf your solution stores data in a database.
- Real Python – Working with CSV filesFile persistence done properly.
- Python unittestAutomated tests make your Criterion B test plan reproducible.
Case study · Paper 1 Section B
Compulsory for SL and HL. 2027: “Generative AI for image creation — a diffuse vision”.
| SL | HL | |
|---|---|---|
| Section B marks | 12 (2 questions) | 24 (4 questions) |
| Paper 1 duration | 1 h 15 min | 2 h |
The case study is a pre-seen scenario released about twelve months before the May session. You do not get the document in the exam. Section B rewards two things: understanding the specific technologies it names (including ones outside the syllabus) and applying syllabus knowledge to that scenario rather than answering generically. An answer that could have been written without reading the case study scores poorly however accurate it is.
A six-step method (start the week it is released)
- Read it three times: once for the story, once highlighting every technical term, once for the tensions (cost vs performance, privacy vs functionality, reliability vs complexity). Examiners write questions about tensions.
- Build a glossary of 30–50 entries at four or five a week. For each term: definition, how it works, why it is used in this scenario, advantages, limitations, syllabus link.
- Map the case study onto the syllabus: one row per sub-topic it touches (for 2027 expect A1.1 GPU/TPU hardware, A1.1 compression and storage, A4.1 deep learning, A4.3 neural networks and CNNs, A4.4 ethics, A2.1 cloud infrastructure, A3.4 large-scale data).
- Write your own questions using the command terms — explain why X rather than Y (6), discuss the ethical implications (8), evaluate the security/safeguards (8), describe how a named technology operates (4), recommend an improvement (6) — and answer them to time.
- Research beyond the document: manufacturer documentation, technical overviews, standards summaries. Questions can target these terms directly.
- Practise applying, not reciting: anchor every point to the organisation, system or data in the scenario.
Glossary entry template
| Field | Content |
|---|---|
| Term | Exact term as it appears |
| Definition | One or two sentences in your own words |
| How it works | Two to four sentences of mechanism |
| Why it is used here | Its role in this scenario |
| Advantages | Two or three, relevant to this context |
| Limitations | Two or three, relevant to this context |
| Syllabus link | Which sub-topic it connects to |
Likely themes for a generative image AI case study
- How diffusion models generate images from noise, and what training them requires (GPU/TPU clusters, datasets, energy).
- Training data: where images come from, copyright and artist consent, bias in what the model has seen.
- Prompting, latent representations, resolution and compute cost at inference; edge vs cloud generation.
- Safeguards: content filtering, watermarking, provenance metadata, deepfakes and misinformation.
- Ethics (A4.4): fairness, transparency, accountability, environmental impact, effect on creative professions.
Resources
- faq.computersciencewiki.org – Case studyNotes on the 2027 generative-AI case study written for IB students.
- 3Blue1Brown – Neural networks and diffusion (YouTube)Visual intuition for how image generators work.
- Computerphile – Stable Diffusion / diffusion model videosSearch the channel for “stable diffusion” and “how AI image generators work”.
- Google ML Crash Course – FairnessVocabulary for bias and fairness answers.
- The Alan Turing Institute – AI ethicsReports on responsible AI to cite in ethics answers.
Exam technique
Turning what you know into marks — command terms, answer structure, Paper 2 habits and the week before.
Most people lose marks they did not need to lose: they answer “explain” as if it said “describe”, or write four marks of material for a two-mark question. Fixing that is worth more than another week of content revision.
Command terms
| Term | What is required | What earns marks |
|---|---|---|
| State / Identify | The answer only | One point, no development |
| Define | The precise meaning | An accurate definition |
| List / Outline | Brief points | Several separate, brief points |
| Describe | A detailed account | What happens, in sequence, with detail |
| Explain | Reasons or causes | Why — every point needs a “because” |
| Compare | Similarities and differences | Both items in every point |
| Contrast / Distinguish | Differences | Differences only, both items in every point |
| Analyse | Break down and interpret | Components, relationships, implications |
| Discuss | A balanced review | Multiple perspectives; a conclusion is optional |
| Evaluate | Strengths, weaknesses and a judgement | Both sides and a conclusion |
| Justify | Valid reasons for a choice | Reasons, and why alternatives are inferior |
| Suggest / Recommend | A proposal | A proposal with reasoning |
| Construct | Produce a diagram, algorithm or table | The artefact, correctly formed |
| Trace | Follow step by step | A completed trace table |
The three that cost the most
- “Explain” answered as “describe”. Test: does every point contain a “because”, “so that” or “which means”? If not, you are describing and capped at about half marks.
- “Compare” answered as two separate descriptions. Each sentence must reference both items: “Whereas a stack removes from the same end it inserts at, a queue removes from the opposite end.”
- “Evaluate” with no judgement. Both sides, then a reasoned, ideally conditional, conclusion: “X is preferable where the data is nearly sorted; Y at scale.”
Structure for a 6–8 mark Paper 1 answer
- One sentence defining or setting out the key concept.
- Three or four developed points: claim → because → example or consequence.
- For discuss/evaluate, at least one point on the other side.
- For evaluate/justify, a conclusion.
- Read the mark allocation: a 4-mark question wants four developed points. Budget about 1.5 minutes per mark.
- Top-band answers make synoptic links: cache locality → array performance → arrays vs linked lists; SQL injection → parameterised queries → input validation; abstraction → OS → three-schema architecture → encapsulation → ADTs → TCP/IP layers; recursion → call stack → stack overflow.
Paper 2 technique
- Underline the exact requirement: return vs print, index vs value, “without built-in functions”.
- Comment as you go; handle empty input, one element, not found, division by zero.
- Initialise correctly (a maximum set to 0 fails on negative data); check loop bounds (range(n) is 0 to n−1).
- Always draw the trace table — it earns marks even if the final answer is wrong.
- “Explain your choice of data structure”: name it, give its complexity for the operations that matter here, name the alternative, say why it loses.
- Do not panic over syntax; logic errors are what cost marks. If you forget a method name, write clear pseudocode and state your intent.
Common errors to avoid
- Confusing validation (is the data reasonable?) with verification (was it entered correctly?).
- Confusing abstraction with encapsulation; overriding with overloading; composition with aggregation.
- Saying NAT provides security.
- Treating a high accuracy figure as proof of a good ML model without checking class imbalance.
- Forgetting that binary search needs sorted data, or that in-order traversal of a BST gives sorted order.
- Drawing the UML inheritance triangle pointing at the subclass.
- Running out of time on Section A and leaving Section B unattempted — it is 12 marks at SL and 24 at HL. Budget for it first.
The week before
- Work through the key-ideas summaries on every topic page.
- Re-read your case study glossary and predicted questions.
- Hand-trace bubble, selection and insertion sort and binary search on small arrays until automatic.
- Practise drawing: the CPU diagram, a logic circuit and truth table, an ERD, a UML class diagram, a BST with its three traversals.
- Do one full past-style paper to time, including Section B, in your exam mode (paper or digital).
- Confirm your Paper 2 language (Python) and exam mode with your coordinator.
Resources
- IB command terms (via your teacher / PRC)The official list is in the subject guide appendix — ask for a copy and keep it in your folder.
- faq.computersciencewiki.orgTopic notes organised by the 2027 syllabus codes.
- Isaac Computer ScienceSelf-marking questions to test each sub-topic quickly.
- VisuAlgoRehearse sort and search traces.