Educerie
Level
Mocks: in the future, hold tight!

Educerie · IB Diploma · Computer Science

Theme A — Concepts of computer science

Theme A is the "how does the machine work" half of the course, examined in Paper 1. It runs from individual bits up to a trained model, and Section B of the paper applies it all to the pre-seen case study.


A1 Computer fundamentals

Number systems

Computers store everything in binary. Hexadecimal is shorthand: one hex digit is exactly four bits, so a byte is two hex digits — which is why colours, memory addresses and MAC addresses are written in hex.

To convert denary to binary, repeatedly divide by 2 and read the remainders upwards. To convert binary to denary, add the place values of the 1s: 128 64 32 16 8 4 2 1.

173 → 10101101      (128 + 32 + 8 + 4 + 1)
10101101 → AD       (1010 = A, 1101 = D)

Always check by converting back. It takes five seconds and it is the only reliable way to catch a dropped bit.

Overflow happens when a result needs more bits than the register holds; the extra bits are lost and the value wraps around. In an 8-bit unsigned register, 255 + 1 gives 0.

Logic gates

AND outputs 1 only when both inputs are 1. OR outputs 1 when at least one is. NOT inverts. NAND, NOR and XOR follow. XOR outputs 1 when the inputs differ — the gate behind parity checking and simple encryption.

Build truth tables systematically: n inputs need 2ⁿ rows, listed in binary counting order so none is missed.

CPU architecture

The von Neumann model has a CPU, memory and buses, with instructions and data sharing the same memory. Inside the CPU:

  • Control unit — decodes instructions and directs the other components.
  • ALU — performs arithmetic and logic.
  • Registers — very fast, very small storage. The MAR holds the address being accessed, the MDR the data at it, the PC the address of the next instruction, and the accumulator intermediate results.

The fetch–decode–execute cycle, which must be written in order:

  1. The address in the PC is copied to the MAR.
  2. The instruction at that address is fetched into the MDR; the PC increments.
  3. The control unit decodes it.
  4. The ALU executes it, with any result stored in the accumulator.

Cache is small, fast memory holding recently used data, exploiting the fact that programs reuse the same instructions. Primary memory (RAM) is volatile — it loses its contents when power is removed. Secondary storage is non-volatile but far slower.


A2 Networks

A network shares resources between connected devices. LAN is local; WAN spans large distances; the internet is a network of networks.

Topologies — star (all devices to a central switch: robust, but the switch is a single point of failure), mesh (many redundant paths: resilient, expensive), bus and ring (largely historic).

Layered models matter because each layer can change without disturbing the others. In the TCP/IP model: application, transport, internet, link. Two protocols to distinguish:

Packet switching breaks data into packets, each with a header carrying source and destination addresses and a sequence number. Packets may travel different routes and arrive out of order; the receiver reassembles them by sequence number. This is what makes the internet resilient — a failed link reroutes rather than disconnects.

Security. Encryption makes intercepted data unreadable without the key: symmetric uses one shared key (fast, but the key must be distributed safely), asymmetric uses a public key to encrypt and a private key to decrypt (solves distribution, but is slower). In practice the two are combined — asymmetric encryption is used to exchange a symmetric key, which then does the bulk work. A firewall filters traffic by rules; authentication confirms identity.


A3 Databases

A relational database stores data in tables of rows (records) and columns (fields).

Normalisation removes redundancy, which is what prevents update anomalies:

The reason to normalise is not tidiness. Storing a customer's address in every order means changing it requires updating every row, and missing one leaves the database contradicting itself.

SQL basics: SELECT fields FROM table WHERE condition, with JOIN to combine tables on a key, and GROUP BY with aggregates such as COUNT and SUM.

Transactions must be ACID — atomic (all or nothing), consistent, isolated from other transactions, and durable once committed. The standard illustration is a bank transfer: debiting one account and crediting another must both happen or neither.


A4 Machine learning

A machine learning system learns patterns from data rather than following rules written by a programmer.

Data is split into a training set, used to fit the model, and a test set, held back to measure performance on data the model has never seen. Evaluating on the training set tells you nothing, because the model has already seen the answers.

Overfitting is when a model learns the noise in the training data as though it were signal: it performs excellently on training data and poorly on new data. Underfitting is a model too simple to capture the real pattern, performing poorly on both.

Bias enters through the data. If the training set under-represents a group, the model performs worse for that group — not because of a coding error, but because the data taught it to. This is examinable as an ethical issue, and the strongest answers identify the source of the bias rather than merely deploring the outcome.


What actually loses marks in this theme

  1. Reading division remainders downwards instead of upwards in denary-to-binary conversion.
  2. Giving the fetch–decode–execute cycle out of order, or omitting the PC increment.
  3. Confusing MAR and MDR.
  4. Describing TCP and UDP separately when the question said distinguish.
  5. Saying packets "arrive in order" — they do not; they are reassembled in order.
  6. Confusing primary and foreign keys.
  7. Justifying normalisation as "tidier" rather than as preventing update anomalies.
  8. Defining supervised learning without the word labelled.
  9. Explaining overfitting as "the model is wrong" rather than as excellent training performance with poor generalisation.

Educerie · written from the published IB syllabus structure for Computer Science Theme A, first assessment 2027. Original text. Last reviewed 5 September 2026.