All subjects · Computer Science · Unit 3
WCP03 Advanced Principles of Computer Science
Edexcel IAL Computer Science, Unit 3 (A2 unit, usually Year 13). 44 lessons so far, in the suggested order.
Lessons in WCP03
- Harvard and von Neumann architecture
Von Neumann: one memory and one bus set for instructions and data (bottleneck). Harvard: separate memories and buses, so instruction fetch and data access happe - CISC and RISC processors
CISC: many complex, variable-length, multi-cycle instructions; short programs; complex power-hungry hardware. RISC: few simple, fixed-length, single-cycle instr - Five-stage instruction pipelining
IF, ID, EX, MEM, WB. Pipelined cycles = k + n - 1. A taken branch means the instructions fetched behind it are flushed, leaving bubbles. - Parallel processing: multicore, MIMD, GPUs and SIMD
Multicore CPU = MIMD (many instruction streams on many data). GPU = SIMD (one instruction on many data at once). Parallelism beats the heat limit, but sequentia - Embedded systems: hardware and software
Embedded system: a dedicated computer inside a larger device. Hardware: MCU, memory, I/O, sensors, actuators, power, ADC/DAC. Software: firmware, often a small - ADC and DAC: sampling, quantisation and encoding
ADC: sample at regular intervals, quantise to one of 2n levels, encode as n bits. Data = rate x bits x time. DAC turns numbers back into voltages. - Input/output management in the operating system
Device driver: translates OS requests for a specific device. BIOS: start-up firmware. Buffer: temporary store between different-speed devices. Cache: keeps reus - Virtualisation: virtual machines and containers
VM: hypervisor emulates whole computers, each with its own guest OS; strong isolation, heavy. Container: app plus libraries sharing the host kernel; light and f - Floating point: the IEEE 754 half precision format
16 bits = 1 sign + 5 exponent (bias 15) + 10 significand with a hidden leading 1. Value = (-1)s x 1.f x 2e - 15. More exponent bits: range; more significand b - Floating point: converting between denary and binary
Denary to float: sign, binary, normalise to 1.f x 2E, store E + 15 in 5 bits, f padded right to 10 bits. Float to denary: reverse it, remembering the hidden 1. - The OSI reference model, encapsulation and decapsulation
OSI, top down: application, presentation, session, transport, network, data link, physical. Sending: encapsulate (add headers going down). Receiving: decapsulat - The TCP/IP protocol stack and the TLS handshake
TCP/IP: application, transport (TCP: ports, sequence numbers, segments), internet (IP addresses, packets), link (MAC, frames). TLS handshake: hello, certificate - Packet switching and internet routers
Packet switching: split into packets with headers (IPs, sequence number, TTL); routers forward each packet independently using routing tables; reassemble in ord - The Domain Name System (DNS)
DNS translates domain names to IP addresses. Lookup: cache, recursive resolver, root server, TLD server, authoritative server, IP returned and cached. Distribut - The Internet of Things (IoT) stack
IoT stack: device hardware and software; connectivity (networks and protocols); cloud platform (collection, analytics, APIs); cloud applications. Big benefits, - The CIA triad: confidentiality, integrity and availability
Confidentiality: only authorised people can read. Integrity: data is accurate and unaltered. Availability: accessible when needed. Encryption, hashing/signature - RSA public key encryption
n = pq, φ = (p - 1)(q - 1), e coprime to φ, ed mod φ = 1. Public (e, n), private (d, n). c = me mod n, m = cd mod n. Secure because factorising n is infeasibl - Error detection: parity, block parity and checksums
Parity: make the count of 1s even (or odd); misses even numbers of errors. Block parity: row and column parity locate and correct a single error. Checksum: sum - Computing paradigms: cloud and edge computing
Cloud: remote data centres, scalable IaaS/PaaS/SaaS, but latency and internet dependence. Edge: processing near the source for low latency, less bandwidth and o - Object-oriented programming: classes, objects and encapsulation
Class = blueprint; object = instance made by the constructor (instantiation). Attributes = data, methods = behaviour. Public +, private -, protected #. Encapsul - OOP: inheritance, composition, polymorphism and UML class diagrams
Inheritance = 'is a' (hollow triangle to parent). Composition = 'has a', owned parts (filled diamond at the whole). Polymorphism = same call, different behaviou - Functional programming
Pure functions: same input, same output, no side effects. Immutable data; recursion instead of loops. First-class functions; higher-order functions map, filter, - Assembly language: instructions, addressing and operations
Mnemonic = opcode; operands follow. #n is immediate (the value); a plain number is a direct memory address. Data movement MOV/LDR/STR, arithmetic ADD/SUB, bitwi - Tracing and writing assembly programs
Trace one instruction at a time, recording only changes. CMP plus a conditional branch makes selection and loops. Always finish by stating the program's purpose - Linked lists
Linked list: nodes of data plus next pointer; head points to the first; last points to None. Insert and delete change pointers only; search and access are linea - Hash tables: hashing, collisions, load factor and rehashing
Index = hash(key), for example key mod size. Collisions: linear probing (next free slot, wrap round) or chaining. Load factor = items / slots; above a threshold - Graphs: types and representations
Graphs: vertices and edges; undirected, directed, weighted. Adjacency matrix: n x n, O(1) edge checks, wasteful when sparse. Adjacency list: neighbours per vert - Graph traversal: depth-first and breadth-first
DFS: stack or recursion, go deep then backtrack. BFS: queue, all neighbours first, level by level; finds fewest-edge paths in unweighted graphs. - Binary trees and binary search trees
BST: left smaller, right larger. Insert and search follow the same path. Pre-order NLR, in-order LNR (sorted output), post-order LRN. Delete a two-child node us - Circular queues
Circular queue: fixed array, front and rear pointers that wrap with (p + 1) mod capacity, plus a count for empty and full tests. Reuses space; O(1) enqueue and - Problem-solving techniques and trace tables
Brute force: try everything. Divide and conquer: split, solve, combine. Greedy: best choice now. Heuristic: good-enough rule of thumb. Backtracking: undo dead e - Merge sort
Merge sort: split to single items, then merge sorted pairs. O(n log n) in every case, stable, but needs O(n) extra memory. - Quick sort
Quick sort: pick a pivot, partition into smaller and larger, recurse on each side. O(n log n) on average, O(n2) worst case when pivots are extreme (sorted data - Dijkstra's shortest path algorithm
Dijkstra: start 0, others infinity; repeatedly visit the closest unvisited vertex and relax its neighbours (keep the smaller distance and the previous vertex); - The A* path-finding algorithm
A* expands the open vertex with the lowest f = g + h. g = cost so far; h = heuristic estimate to the goal. Admissible h (never overestimates) guarantees a short - Algorithmic efficiency and Big O notation
Big O keeps the dominant term: O(1) < O(log n) < O(n) < O(n log n) < O(n2) < O(2n). Nested loops multiply; halving gives log n. Know best and worst cases of t - Boolean algebra: laws and simplification
Laws: commutative, associative, distributive, absorption (A + A.B = A), De Morgan's (¬(A.B) = ¬A + ¬B; ¬(A + B) = ¬A.¬B), double negation. Plus A + ¬A = 1, A.¬A - Karnaugh maps
Gray code order 00, 01, 11, 10. Group 1s in rectangles of 1, 2, 4, 8; as large and as few as possible; overlap and wrap allowed. Keep variables that stay consta - Digital signatures, certificates and hash digests
Hash digest: fixed-length, one-way fingerprint. Signature: hash the message, encrypt the digest with the sender's private key; verify with the sender's public k - Blockchain
Blockchain: distributed ledger of blocks, each holding data, timestamp, previous block's hash and its own hash. Changing a block breaks every later link. Consen - Quantum computing
Qubit: superposition of 0 and 1; n qubits span 2n states. Entanglement links qubits; interference boosts right answers; decoherence causes errors. Shor's algor - Deep learning and neural networks
Neuron: activation(sum of inputs x weights + bias). Layers: input, hidden (many in deep learning), output. Forward propagation makes a prediction; back propagat - Responsible practice: ethics, legal frameworks and codes of conduct
Ethics: privacy, bias, accountability, jobs, environment, safety. Law (UK examples): Computer Misuse Act 1990; Data Protection Act 2018/UK GDPR seven principles - Unit 3 exam technique
90 minutes, 80 marks, all questions, no calculator, instruction set provided. Explain = point plus reason. Complete tables exactly. Trace every change. Check bi