Skip to content
Marlbridge

Free flashcards · Cambridge A Level · 9618

Computer Science flashcards

221 cards covering every topic of the 9618 syllabus (2026). Study one topic or mix them all, turn each card, and mark yourself honestly.

Study mode needs JavaScript. Every card is listed below, so you can still cover the answers and test yourself.

All 221 cards

For a quick read-through or printing. Cover the right-hand side to test yourself.

AS Topic 1: Information representation

How do you convert a denary number to binary?
Repeatedly divide by 2 and read the remainders upwards; or subtract the largest place values (128, 64, 32 …) that fit and write a 1 in each one used.
Why is hexadecimal used in computing?
It is far more compact than binary and each hex digit maps to exactly four bits, so conversion is easy and errors are less likely. Used for memory addresses, colour codes and MAC addresses.
How do you find the two’s complement of a binary number (to negate it)?
Invert all the bits and add 1. Example: +5 = 00000101 → 11111010 → 11111011 = −5.
What is the range of an 8-bit two’s complement integer?
−128 to +127. In general, n bits give −2ⁿ⁻¹ to 2ⁿ⁻¹ − 1.
What is binary-coded decimal (BCD)?
Each denary digit is stored separately as its own 4-bit binary code. 59 in BCD is 0101 1001. Used where digits are displayed or exact decimal values matter, such as in calculators and electronic displays.
What is the difference between a kibibyte and a kilobyte?
A kibibyte (KiB) is 2¹⁰ = 1024 bytes (binary prefix). A kilobyte (kB) is 10³ = 1000 bytes (decimal prefix). Likewise MiB = 2²⁰ bytes and MB = 10⁶ bytes.
ASCII and Unicode: how many bits, and why was Unicode needed?
ASCII uses 7 bits (128 characters); extended ASCII uses 8 bits (256). Unicode uses up to 32 bits per character, so it can represent non-Latin scripts and symbols that ASCII cannot.
What is image resolution, and what is colour depth?
Resolution: the number of pixels in the image (width × height). Colour depth: the number of bits per pixel; n bits give 2ⁿ colours.
How do you estimate the file size of a bitmap image?
File size (bits) = width in pixels × height in pixels × colour depth. Divide by 8 for bytes.
What is the difference between a bitmap and a vector graphic?
A bitmap stores the colour of every pixel. A vector graphic stores a drawing list of objects and their properties (e.g. coordinates, line colour, fill), so it scales without loss of quality but is unsuitable for photographs.
What are sampling rate and sampling resolution in digital sound?
Sampling rate: the number of samples taken per second (Hz). Sampling resolution: the number of bits used to store each sample.
How do sampling rate and resolution affect a sound file?
Increasing either gives a more accurate representation of the original sound, but a larger file. File size = sampling rate × sampling resolution × duration (× number of channels).
What is the difference between lossy and lossless compression?
Lossless: the original data can be fully recovered (used for text and program files). Lossy: some data is permanently discarded, usually detail people barely notice (used for photos, audio and video).
Why is file compression needed?
Smaller files use less storage space and transfer faster over a network, using less bandwidth.
How does run-length encoding (RLE) work?
A run of identical values is replaced by one copy of the value and a count. Example: AAAAABB → 5A2B.
When is run-length encoding a poor choice?
On noisy or photographic data with few repeated runs: the encoded file can end up larger than the original.

AS Topic 2: Communication

What is the difference between the client-server and peer-to-peer models?
Client-server: dedicated servers provide services (files, authentication, printing) to clients. Peer-to-peer: all computers have equal status and each acts as both client and server.
What is the difference between a thin client and a thick client?
A thin client relies heavily on the server for processing. A thick client does most of its processing locally.
How do the bus, star and mesh topologies differ?
Bus: one shared line all devices connect to. Star: every device connects to a central switch, so a faulty link is easy to isolate. Mesh: many interconnections, so there are alternative routes and high resilience.
What does CSMA/CD do on an Ethernet network?
Carrier Sense Multiple Access / Collision Detection: a device checks the medium is free before transmitting; if a collision is detected, each device waits a random time before trying again.
What is the difference between the internet and the World Wide Web?
The internet is the global network of interconnected networks (the infrastructure). The WWW is the collection of linked web pages and resources accessed over the internet using HTTP.
What does DNS do?
The Domain Name System translates the domain name in a URL into the IP address that is used to route the request.
What is the difference between a static and a dynamic IP address?
Static: fixed, does not change (suits a web server that must always be found). Dynamic: assigned from a pool each time a device connects, usually by DHCP, so addresses can be reused.
What is the difference between a switch and a router?
A switch forwards data between devices within one network. A router forwards packets between different networks, such as a LAN and the internet.

AS Topic 3: Hardware

What is the difference between RAM and ROM?
RAM: volatile, read and write, holds the programs and data currently in use. ROM: non-volatile, read only (in normal use), holds fixed start-up instructions such as the bootstrap.
What is the difference between SRAM and DRAM?
DRAM stores each bit as a charge on a capacitor and must be refreshed constantly; it is cheaper and denser, so used for main memory. SRAM uses flip-flops, needs no refresh and is faster, so used for cache.
What are PROM and EPROM?
PROM: programmable once after manufacture, then cannot be changed. EPROM: can be erased (using ultraviolet light) and reprogrammed.
What is the difference between magnetic, optical and solid-state storage?
Magnetic (hard disk): data stored as magnetised regions on spinning platters. Optical (CD, DVD): pits and lands read by a laser. Solid-state (flash): charge stored in transistors, no moving parts, so faster access.
What is an embedded system?
A computer system built into a larger device to perform one dedicated function, e.g. in a washing machine or a car engine management unit.
What is the role of sensors and actuators in a control system?
Sensors measure physical quantities (temperature, light, pressure) and send data to the processor. Actuators carry out physical actions (motors, valves, heaters) in response to the processor’s output. Feedback lets the system adjust its output.
How does EEPROM differ from EPROM?
EPROM is erased with ultraviolet light, usually after removing the chip from the device. EEPROM is erased and rewritten electrically while it stays in the circuit, so firmware can be updated in place.
What is a buffer used for?
A temporary area of memory that holds data being transferred between devices working at different speeds, e.g. the processor fills a printer buffer and continues other work while the printer empties it.
Monitoring system vs control system
Monitoring: sensors take readings, which are compared with stored values and displayed, recorded or used to warn; conditions are not changed. Control: actuators are also used to change the conditions.
Why is feedback important in a control system?
After an actuator acts, new sensor readings are taken and compared again, so the output affects the next input and conditions are kept near the target continuously.
When is the output of an AND gate and of an OR gate 1?
AND: only when both inputs are 1. OR: when at least one input is 1.
When is the output of a NAND gate and of a NOR gate 1?
NAND (NOT AND): 1 unless both inputs are 1. NOR (NOT OR): 1 only when both inputs are 0.
When is the output of an XOR gate 1?
When the inputs are different (one is 1 and the other 0).
How many rows does a truth table need for a circuit with n inputs?
2ⁿ rows. Three inputs need 8 rows, listed in binary order 000 to 111.

AS Topic 4: Processor Fundamentals

What is the Von Neumann model of a computer?
A single processor that fetches and executes instructions in sequence, with program instructions and data stored together in the same main memory (the stored program concept).
What do the PC, MAR, MDR and CIR hold?
PC: address of the next instruction. MAR: address of the location currently being accessed. MDR: data or instruction being transferred to or from memory. CIR: the instruction currently being decoded and executed.
What do the accumulator (ACC), index register (IX) and status register hold?
ACC: the result of ALU operations. IX: a value added to an address in indexed addressing. Status register: flag bits (carry, negative, overflow, zero) set by the last operation.
What are the steps of the fetch stage in register transfer notation?
MAR ← [PC] PC ← [PC] + 1, and MDR ← [[MAR]] CIR ← [MDR]
What do the address, data and control buses carry?
Address bus: addresses from the MAR to memory (one way). Data bus: data and instructions (both ways). Control bus: control signals such as memory read, memory write and the clock (both ways).
Which factors affect the performance of a CPU?
Clock speed, number of cores, size of cache memory, and the width of the address and data buses.
What is an interrupt and how is it handled?
A signal that a device or program needs attention. At the end of each fetch-execute cycle the CPU checks for interrupts; if one has priority, the current register contents are saved, the interrupt service routine runs, then the saved values are restored.
What is the relationship between assembly language and machine code?
Each assembly instruction is a mnemonic for one machine-code instruction. An assembler translates assembly language into machine code.
What is the difference between immediate and direct addressing?
Immediate: the operand is the value itself (LDM #5 loads 5). Direct: the operand is the address of the value (LDD 200 loads the contents of address 200).
What is the difference between indirect and indexed addressing?
Indirect: the operand holds the address of the address of the value (LDI). Indexed: the address used is the operand plus the contents of the index register (LDX).
What is relative addressing?
The operand is an offset; the address used is worked out relative to a base address, usually that of the current instruction.
How does a conditional jump such as JPE work after CMP?
CMP compares the ACC with the operand. JPE jumps to the given address only if the comparison was equal; otherwise execution continues with the next instruction.
What is a two-pass assembler?
Pass 1 reads the program and builds a symbol table of labels and their addresses. Pass 2 uses the table to translate every instruction, including forward references to labels, into machine code.
How do you clear, set or toggle chosen bits with a mask?
Clear: AND with 0s in those positions. Set: OR with 1s in those positions. Toggle: XOR with 1s in those positions.
What does a logical left shift do to an unsigned binary value?
Each bit moves left and 0 enters on the right. A shift of n places multiplies the value by 2ⁿ (bits shifted out are lost).
What is the difference between a logical and an arithmetic right shift?
Logical: 0 enters on the left. Arithmetic: the sign bit is copied in, so a negative two’s complement value stays negative. Either divides by 2 per place.
What is a cyclic shift?
Bits shifted out of one end are moved back in at the other end, so no bits are lost.

AS Topic 5: System Software

Why does a computer need an operating system?
It provides an interface between the user and the hardware, and manages the hardware and resources so that application software can run.
What are the key management tasks of an operating system?
Memory management, file management, security management, hardware (peripheral) management, process management, and providing a user interface.
What are utility programs? Give examples.
System software that helps maintain the computer, e.g. disk formatter, virus checker, defragmenter, disk contents analysis and repair, file compression, back-up software.
What is a program library and what is a DLL?
A library is a collection of pre-written, tested routines a program can use. A dynamic link library (DLL) is linked when the program runs, so one copy can be shared by several programs and the file sizes stay smaller.
What is the difference between a compiler and an interpreter?
A compiler translates the whole source program into an executable file before it runs. An interpreter translates and executes one statement at a time, every time the program runs.
Why is an interpreter useful during program development?
It stops at the first error it meets and reports it, so the error can be fixed and the program re-run straight away from that point.
Why does Java use partial compilation and interpretation?
Source code is compiled to intermediate bytecode, which is then interpreted (by the Java Virtual Machine) on any platform, so the same compiled code runs on different hardware.
What features does a typical IDE provide?
Coding aids (context-sensitive prompts, auto-completion), initial error detection (dynamic syntax checks), presentation aids (prettyprint, expand and collapse code blocks) and debugging tools (single stepping, breakpoints, report window for variables).

AS Topic 6: Security, privacy and data integrity

What is the difference between data security, data privacy and data integrity?
Security: protecting data from loss or unauthorised access. Privacy: keeping personal data from people not entitled to see it. Integrity: data being accurate, complete and up to date.
How does a firewall protect a computer system?
It monitors traffic between the computer or network and the outside, and blocks packets that do not meet set rules, such as those from unauthorised addresses.
What security measures protect data in a computer system?
User accounts and passwords, authentication (e.g. biometrics), firewalls, anti-virus and anti-spyware software, encryption, access rights, and regular back-ups.
What is malware? Name three types.
Software written to harm a system or steal data. Examples: a virus (attaches to files and replicates), a worm (replicates itself across a network), spyware (records what the user does and sends it on).
What is phishing and what is pharming?
Phishing: emails or messages that trick a user into giving personal details on a fake site. Pharming: malicious code redirects a user from a genuine website to a fake one, even when the correct address is typed.
What is the difference between validation and verification?
Validation: an automatic check that input data is reasonable and follows set rules. Verification: a check that data has been copied or entered accurately from its source.
Name five types of validation check.
Range check, format check, length check, presence check, existence check, limit check, check digit.
How is data verified during data entry?
Double entry (typed twice and compared by the computer) or a visual check (the user compares the entered data with the source document).
How do parity checks verify data during transfer?
A parity bit is added so each byte has an even (or odd) number of 1s. The receiver counts the 1s; a wrong count shows an error. A parity block check can locate a single-bit error.
What is a checksum?
A value calculated from a block of data before sending. The receiver recalculates it; if the two values differ, the data was corrupted in transit.

AS Topic 7: Ethics and Ownership

Why do professional bodies such as the BCS and IEEE publish codes of conduct?
To set ethical standards for computing professionals: acting in the public interest, being competent and honest, and acting with integrity towards employers and clients.
What is copyright, and why does software need it?
A legal right protecting the owner of an original work from it being copied or distributed without permission. Software is easy to copy, so the law protects the investment of the people who wrote it.
What is the difference between open source and freeware?
Open source: the source code is available and users may study, change and redistribute it. Freeware: free to use, but the source code is not provided and it may not be changed.
What is the difference between shareware and commercial software?
Shareware: free to try for a limited time or with limited features; a fee is paid to keep using it. Commercial software: must be paid for (a licence bought) before use; the code is protected.
What ethical and social issues does artificial intelligence raise?
Possible job losses, bias in decisions learned from data, accountability when an AI system causes harm, and privacy concerns over the data used.

AS Topic 8: Databases

What are the limitations of a file-based approach to storing data?
Data is often duplicated across files (data redundancy), copies can disagree (inconsistency), and programs depend on the file structure (data dependency).
What is a primary key, and what is a foreign key?
Primary key: an attribute (or combination) that uniquely identifies each tuple in a table. Foreign key: an attribute in one table that is the primary key of another table, used to link them.
What is a candidate key and a secondary key?
Candidate key: any attribute that could act as the primary key. Secondary key: a candidate key not chosen as the primary key, often used as an index for searching.
What is referential integrity?
Every foreign key value must match an existing primary key value in the linked table, so no record refers to a record that does not exist.
What are first, second and third normal form?
1NF: no repeated groups of attributes; all values atomic. 2NF: in 1NF and no partial dependencies (every non-key attribute depends on the whole primary key). 3NF: in 2NF and no non-key dependencies (non-key attributes depend only on the key).
What relationships can exist between entities in an E-R diagram?
One-to-one, one-to-many and many-to-many. A many-to-many relationship is resolved with a link table, giving two one-to-many relationships.
How does a DBMS address the problems of a file-based approach?
Data is stored once and shared, which reduces redundancy and inconsistency, and program–data independence means changes to the structure need not change every program.
What is the data dictionary in a DBMS?
Data about the data (metadata): table names, field names, data types, validation rules, relationships and access rights.
What do the developer interface and query processor of a DBMS do?
Developer interface: lets the developer create and maintain the database structure, forms and reports. Query processor: takes a query, works out how to carry it out and returns the results.
How does a DBMS help keep data secure?
Usernames and passwords, access rights (different views for different users), encryption, automatic back-ups, and an audit trail of changes.
What is the difference between DDL and DML?
Data Definition Language creates and changes the database structure (CREATE DATABASE, CREATE TABLE, ALTER TABLE). Data Manipulation Language queries and changes the data (SELECT, INSERT, UPDATE, DELETE).
What does this SQL do? SELECT Name, Age FROM Student WHERE Age > 16 ORDER BY Name;
Returns the Name and Age of every student older than 16, sorted alphabetically by name (ascending by default).
How do you add a record and change a record in SQL?
INSERT INTO Student (StudentID, Name) VALUES (1, 'Ali'); UPDATE Student SET Name = 'Sara' WHERE StudentID = 1;
What do GROUP BY and the aggregate functions do in SQL?
GROUP BY collects rows with the same value into groups. Aggregate functions summarise them: SUM, COUNT and AVG.
How do you join two tables in an SQL query?
With INNER JOIN … ON matching the foreign key to the primary key, e.g. SELECT … FROM Student INNER JOIN Class ON Student.ClassID = Class.ClassID;

AS Topic 9: Algorithm Design and Problem-solving

What is abstraction?
Removing unnecessary detail and keeping only the information needed to solve the problem, e.g. a map that shows only stations and lines.
What is decomposition?
Breaking a complex problem down into smaller sub-problems that are easier to understand and solve, often as separate modules.
What are the benefits of abstraction?
Simpler models are quicker to design and program, use less memory and processing, and are easier to understand and maintain.
What is an algorithm?
An ordered set of steps that solves a problem or completes a task.
Name three ways of documenting an algorithm.
Structured English, a program flowchart, and pseudocode.
What is stepwise refinement?
Breaking each step of an algorithm into smaller, more detailed steps, repeated until each step can be written directly as program code.
What is an identifier table?
A table listing each identifier (variable or constant) used in an algorithm, with its data type and a description of what it is used for.
What does a trace table show?
The value of each variable, and any output, after each step of an algorithm, used to dry-run it and find logic errors.

AS Topic 10: Data Types and Structures

Which basic data types does 9618 pseudocode use?
INTEGER, REAL, CHAR, STRING, BOOLEAN and DATE.
How do you declare a variable and a constant in 9618 pseudocode?
DECLARE Total : INTEGER CONSTANT VAT = 0.2 A constant’s value is fixed when it is declared and cannot be changed by the program.
What is a record data type?
A composite data type made of several fields, which can be of different data types, describing one item (such as one student).
How do you define a record type in 9618 pseudocode?
TYPE TStudent DECLARE Name : STRING DECLARE Age : INTEGER ENDTYPE Then DECLARE Pupil : TStudent and use dot notation: Pupil.Name ← "Ali"
What is an array?
A fixed-size data structure holding elements of the same data type under one identifier, each reached by its index.
How do you declare 1D and 2D arrays in 9618 pseudocode?
DECLARE Names : ARRAY[1:30] OF STRING DECLARE Grid : ARRAY[1:3, 1:5] OF INTEGER The bounds give the lower and upper index of each dimension.
How does a linear search work?
Check each element in turn from the start until the item is found or the end of the array is reached. The data need not be sorted.
How does a bubble sort work?
Compare each pair of adjacent elements and swap them if they are in the wrong order. Repeat passes until a pass makes no swaps.
How can a bubble sort be made more efficient?
Use a flag to stop as soon as a pass makes no swaps, and reduce the number of comparisons by one after each pass, since the largest value is already in place.
Why are files needed?
Data in variables is lost when a program ends. A file stores data permanently, so it can be read back by the program later or by other programs.
What are the three file modes for a text file in 9618 pseudocode?
READ, WRITE and APPEND, e.g. OPENFILE "Scores.txt" FOR READ. WRITE replaces any existing contents; APPEND adds to the end.
How do you read every line of a text file in 9618 pseudocode?
OPENFILE "Data.txt" FOR READ WHILE NOT EOF("Data.txt") READFILE "Data.txt", Line … ENDWHILE CLOSEFILE "Data.txt"
How do you write a line to a text file in 9618 pseudocode?
OPENFILE "Log.txt" FOR WRITE (or FOR APPEND) WRITEFILE "Log.txt", Line CLOSEFILE "Log.txt"
What is an abstract data type (ADT)?
A collection of data together with a set of operations on that data, defined by what it does rather than how it is implemented.
How does a stack work?
Last in, first out (LIFO). Items are pushed onto and popped off the top. A top-of-stack pointer tracks the last item.
How does a queue work?
First in, first out (FIFO). Items join at the rear (enqueue) and leave from the front (dequeue), tracked by front and rear pointers. A circular queue reuses freed spaces.
What is a linked list?
A list of nodes, each holding data and a pointer to the next node. A start pointer gives the first node and a null pointer marks the end. Items can be inserted or deleted by changing pointers, without moving data.
How can a stack, queue or linked list be implemented using arrays?
Store the items in a 1D array and keep integer pointers (indices) for the top, front/rear or next node. A linked list also keeps a free list of unused array positions.

AS Topic 11: Programming

What is the assignment operator in 9618 pseudocode?
← , for example Count ← Count + 1. The = sign is used for comparison and in CONSTANT declarations, not for assignment.
How do you take input and give output in 9618 pseudocode?
INPUT Name OUTPUT "Hello ", Name OUTPUT can print several items separated by commas.
Which string functions does the 9618 pseudocode guide give?
Examples: LENGTH(s) gives the number of characters; LEFT(s, x) and RIGHT(s, x) give x characters from either end; MID(s, x, y) gives y characters starting at position x. & joins (concatenates) strings.
What do INT and RAND do in 9618 pseudocode?
INT(x) returns the integer part of x (e.g. INT(27.9) is 27). RAND(x) returns a random real number from 0 up to but not including x.
What are integer division and modulo? Give 17 and 5 as an example.
Integer division gives the whole-number quotient: 17 divided by 5 gives 3. Modulo gives the remainder: 17 modulo 5 gives 2.
What is the structure of an IF statement in 9618 pseudocode?
IF condition THEN statements ELSE statements ENDIF
What is the structure of a CASE statement in 9618 pseudocode?
CASE OF identifier value1 : statement value2 : statement OTHERWISE statement ENDCASE
What is the structure of a count-controlled loop in 9618 pseudocode?
FOR Count ← 1 TO 10 statements NEXT Count STEP can set the increment, e.g. FOR i ← 10 TO 0 STEP -2.
What is the difference between a pre-condition and a post-condition loop?
Pre-condition (WHILE condition … ENDWHILE): the condition is tested first, so the body may run zero times. Post-condition (REPEAT … UNTIL condition): the body always runs at least once.
When does a WHILE loop stop and when does a REPEAT loop stop?
WHILE repeats while its condition is TRUE and stops when it becomes FALSE. REPEAT … UNTIL repeats until its condition becomes TRUE.
What is the difference between a procedure and a function?
A function returns a single value and is used in an expression. A procedure performs a task and is run with CALL; it returns no value directly.
How do you write a function in 9618 pseudocode?
FUNCTION Square(Num : INTEGER) RETURNS INTEGER RETURN Num * Num ENDFUNCTION
How do you write and call a procedure in 9618 pseudocode?
PROCEDURE Greet(Name : STRING) OUTPUT "Hello ", Name ENDPROCEDURE CALL Greet("Ali")
What is the difference between passing a parameter BYVAL and BYREF?
BYVAL: a copy of the value is passed, so the original variable is not changed. BYREF: the address is passed, so changes made in the subroutine change the original. If neither is stated, BYVAL is assumed.
What is the difference between a parameter and an argument?
A parameter is the variable named in the subroutine header. An argument is the actual value passed to it when the subroutine is called.

AS Topic 12: Software Development

What are the stages of the program development life cycle?
Analysis, design, coding, testing and maintenance.
How does the waterfall model work?
Each stage is completed in order before the next begins, with little going back. Suits projects with clear, fixed requirements; changes late on are costly.
How does the iterative model work?
A simple version is developed first and then improved in repeated cycles of design, coding and testing, adding features each time.
What is rapid application development (RAD)?
Prototypes are built quickly and refined with frequent user feedback, with little formal planning. Suits projects where requirements are unclear, but needs users to be closely involved.
What does a structure chart show?
How a program is broken into modules, in a hierarchy, and the parameters passed between them. It can also show selection and repetition.
What is a state-transition diagram?
A diagram showing the states a system can be in, the events (inputs) that cause a change of state, and the transitions between states.
Which symbols in a program flowchart show a decision and a process?
Decision: a diamond with two exits (yes/no). Process: a rectangle. Input/output: a parallelogram. Start/stop: a rounded terminator.
What is the difference between a syntax, a logic and a run-time error?
Syntax: breaks the rules of the language, so it will not translate. Logic: the program runs but gives the wrong result. Run-time: the program crashes while running, e.g. dividing by zero.
What are normal, abnormal (erroneous) and boundary test data?
Normal: valid data the program should accept. Abnormal: invalid data it should reject. Boundary (extreme): values on and either side of the limits of the valid range.
What is the difference between white-box and black-box testing?
White-box: tests every path through the code, chosen by looking at the code. Black-box: tests inputs against expected outputs without looking at the code.
What are alpha and beta testing?
Alpha: in-house testing by the developer’s own team. Beta: a near-finished version given to a group of real users outside the company, who report faults.
What are the three types of maintenance?
Corrective: fixing errors found after release. Adaptive: changing the program for new requirements or a new environment. Perfective: improving performance or usability.
What is a dry run?
Working through an algorithm by hand with test data, recording variable values in a trace table, to check the logic without running the code.

A Level Topic 13: Data Representation

What is a user-defined data type and why is it used?
A data type created by the programmer from the built-in types, to model the data of a particular problem more closely.
What is an enumerated data type? Give a 9618 pseudocode example.
A non-composite type whose values are a fixed ordered list of names. TYPE Season = (Spring, Summer, Autumn, Winter)
What is a pointer data type? Give a 9618 pseudocode example.
A type whose values are memory addresses. TYPE TIntPointer = ^INTEGER MyPtr^ refers to the value at the address MyPtr holds (dereferencing).
What is the difference between composite and non-composite data types?
Non-composite: defined without referring to another type (e.g. enumerated, pointer). Composite: built from other data types (e.g. record, set, class).
What is a set data type?
A composite type holding an unordered collection of values with no duplicates, supporting set operations such as union, intersection and membership.
What are serial, sequential and random file organisation?
Serial: records stored in the order they were added. Sequential: records stored in order of a key field. Random: each record is stored at an address calculated from its key by a hashing algorithm.
What is the difference between sequential and direct access?
Sequential access reads records one after another from the start. Direct (random) access goes straight to a record’s location, using an index or a hashing algorithm.
What is a hashing collision and how can it be handled?
Two keys give the same address. The record can be stored in the next free position (searching forwards) or in a separate overflow area.
How do you write a record to a random file in 9618 pseudocode?
OPENFILE "Seats.dat" FOR RANDOM SEEK "Seats.dat", Position PUTRECORD "Seats.dat", NewRecord CLOSEFILE "Seats.dat" (GETRECORD reads one.)
Which file organisation suits a payroll run and which suits a booking system?
Payroll processes every record in order, so sequential suits it. A booking system needs one record found quickly, so random (direct access) suits it.
What are the mantissa and exponent in floating-point representation?
The number is mantissa × 2^exponent. The mantissa holds the significant digits (precision); the exponent sets where the binary point goes (range). Both are in two’s complement.
What is the trade-off between mantissa and exponent size?
More bits for the mantissa give greater precision. More bits for the exponent give a greater range of values.
What does it mean for a floating-point number to be normalised?
The mantissa starts 01 (positive) or 10 (negative), so the first two bits differ. This gives the maximum precision for the bits available and a unique representation of each value.
Why can some numbers not be stored exactly in floating point?
Values such as 0.1 have no exact binary fraction, so they are rounded, giving rounding errors. Results too large give overflow; too small to represent give underflow.

A Level Topic 14: Communication and internet technologies

Why are protocols needed in networking?
A protocol is a set of rules for transmitting data. Devices from different manufacturers can communicate only if they follow the same rules.
What are the four layers of the TCP/IP protocol suite?
Application (e.g. HTTP, FTP, SMTP), Transport (TCP), Internet (IP), and Link (e.g. Ethernet).
What is the role of TCP and of IP?
TCP splits data into packets, numbers them, and makes sure all arrive and are reassembled in order (re-requesting lost ones). IP adds addresses and routes each packet across networks.
What are HTTP, FTP, SMTP, POP3 and IMAP used for?
HTTP: transferring web pages. FTP: transferring files. SMTP: sending email. POP3 and IMAP: retrieving email from a server (IMAP keeps it synchronised on the server).
What is BitTorrent?
A peer-to-peer protocol for sharing large files: the file is split into pieces, and each peer (in a swarm) downloads pieces from others while uploading the pieces it has. A tracker helps peers find each other.
What is circuit switching?
A dedicated path is set up between sender and receiver for the whole communication; all data follows that path, in order. Used for traditional telephone calls.
What is packet switching?
Data is split into packets, each with a header holding addresses and a sequence number. Packets may take different routes and are reassembled in order at the destination.
What are the advantages of packet switching over circuit switching?
No line is tied up, so bandwidth is shared efficiently; packets can be re-routed around faults or congestion. Drawback: packets can arrive out of order or be delayed.
What does a router do in packet switching?
It reads each packet’s destination address and uses its routing table to forward the packet to the next router on a suitable route.

A Level Topic 15: Hardware and Virtual Machines

What is the difference between RISC and CISC processors?
RISC: a small set of simple instructions, each taking one clock cycle; more general-purpose registers; suits pipelining. CISC: many complex instructions, some taking several cycles; shorter programs.
What is pipelining?
Different stages of several instructions (fetch, decode, execute …) are carried out at the same time, one stage per instruction, so more instructions complete per unit time.
What are SISD, SIMD, MISD and MIMD?
Basic computer architectures: Single/Multiple Instruction stream with Single/Multiple Data stream. SIMD applies one instruction to many data items at once (e.g. graphics); MIMD has processors running different instructions on different data.
What is a massively parallel computer?
A large number of processors working together on the same problem, each with its own memory, linked by a network.
What is a virtual machine? Give a benefit and a drawback.
Software that emulates a computer, so one system can run another operating system as a guest. Benefit: run software for another platform or test safely. Drawback: slower than running directly on the hardware.
What are De Morgan’s laws?
NOT (A AND B) = (NOT A) OR (NOT B) NOT (A OR B) = (NOT A) AND (NOT B)
What does a half adder do?
Adds two bits, A and B. Sum = A XOR B; Carry = A AND B.
What does a full adder do?
Adds two bits and a carry-in, giving a sum and a carry-out. It can be built from two half adders and an OR gate; full adders are chained to add multi-bit numbers.
What is a flip-flop?
A sequential circuit that stores one bit: its output depends on its inputs and its previous state. SR and JK flip-flops are used in memory and registers.
What is a Karnaugh map used for?
Simplifying a Boolean expression: 1s are placed in a grid labelled in Gray code order, and adjacent groups of 1, 2, 4 or 8 are combined to remove variables.

A Level Topic 16: System Software

What is the difference between a program and a process?
A program is the code stored on disk. A process is a program that has been loaded into memory and is being executed.
What are the three main process states?
Running (using the processor), ready (waiting for its turn) and blocked (waiting for an event such as input/output to finish).
Name four process scheduling routines.
First come first served, shortest job first, shortest remaining time first, and round robin (each process gets a fixed time slice in turn).
What is the difference between paging and segmentation?
Paging: memory is split into fixed-size pages and frames. Segmentation: memory is split into variable-size segments matching logical parts of a program.
What is virtual memory, and what is disk thrashing?
Virtual memory uses secondary storage as an extension of RAM, swapping pages in and out. Disk thrashing happens when pages are swapped so often that the computer spends more time swapping than processing.
What are the stages of compilation?
Lexical analysis, syntax analysis, code generation and optimisation.
What happens in lexical analysis?
White space and comments are removed, and the code is split into tokens; identifiers are added to the symbol table.
What happens in syntax analysis?
The tokens are parsed and checked against the grammar of the language; syntax errors are reported.
What are BNF and syntax diagrams used for?
To define the grammar of a language. Backus–Naur Form uses rules such as ⟨digit⟩ ::= 0|1|…|9 and can define items recursively; syntax diagrams show the same rules graphically.
What is Reverse Polish Notation (RPN)?
A way of writing expressions with the operator after its operands, so no brackets are needed: (a + b) × c becomes a b + c ×. It is evaluated with a stack.

A Level Topic 17: Security

What is the difference between symmetric and asymmetric encryption?
Symmetric: the same key encrypts and decrypts, so the key must be shared securely. Asymmetric: a public key encrypts and only the matching private key decrypts.
What are plaintext and ciphertext?
Plaintext: the original readable data. Ciphertext: the data after encryption, unreadable without the key.
What do SSL and TLS provide?
Secure communication between a client and server: they authenticate the server, agree encryption keys in a handshake, and encrypt the data sent (as in HTTPS).
How is a digital signature created and checked?
The sender hashes the message to a digest and encrypts the digest with their private key. The receiver decrypts it with the sender’s public key and compares it with a fresh hash of the message.
What is a digital certificate?
An electronic document issued by a Certificate Authority that links a public key to its owner’s identity, so others can trust that the key is genuine.
What is quantum cryptography?
Using the properties of photons to send encryption keys (quantum key distribution): any attempt to intercept the key disturbs it and can be detected.

A Level Topic 18: Artificial Intelligence (AI)

What is the difference between Dijkstra’s algorithm and A*?
Both find the shortest path in a weighted graph. Dijkstra’s explores by distance from the start only. A* adds a heuristic estimate of the distance to the goal, so it usually explores fewer nodes.
What is machine learning?
A system improves its performance on a task by learning from data, rather than by being explicitly programmed with rules.
What is the difference between supervised, unsupervised and reinforcement learning?
Supervised: learns from labelled data. Unsupervised: finds patterns in unlabelled data. Reinforcement: learns by trial and error, guided by rewards and penalties.
What is an artificial neural network?
Layers of connected nodes (input, hidden and output layers). Each connection has a weight, adjusted during training so the network’s outputs improve.
What is deep learning?
Machine learning using artificial neural networks with many hidden layers, used for tasks such as image and speech recognition.
What is back propagation?
A training method: the error at the output is passed backwards through the network and the weights are adjusted to reduce it, repeated over many examples.

A Level Topic 19: Computational thinking and Problem-solving

How does a binary search work, and what does it need?
The data must be sorted. Compare the item with the middle element; discard the half that cannot contain it; repeat on the remaining half until found or no items remain.
How does an insertion sort work?
Take each element in turn from the second onwards and move it back through the sorted part of the list until it is in the correct position.
What is Big O notation?
A way of describing how the time (or memory) an algorithm needs grows as the size of the input, n, grows, using the worst case.
What are the time complexities of linear search, binary search and bubble sort?
Linear search: O(n). Binary search: O(log n). Bubble sort and insertion sort: O(n²).
How do you add a value to a binary search tree?
Start at the root; go left if the value is smaller than the node, right if larger; repeat until an empty position is reached and add the new node there.
What is recursion?
A subroutine that is defined in terms of itself: it calls itself with a smaller version of the problem.
What are the essential features of a recursive subroutine?
A base case that stops the recursion, a general case that calls itself, and each call moving closer to the base case.
How does a compiler implement recursion?
Each call pushes a stack frame (return address, parameters, local variables) onto the call stack; when a call ends its frame is popped and control returns, unwinding the stack.
What happens if a recursive subroutine has no reachable base case?
It keeps calling itself until the call stack runs out of memory: a stack overflow.
Write a recursive factorial function in 9618 pseudocode.
FUNCTION Factorial(n : INTEGER) RETURNS INTEGER IF n = 0 THEN RETURN 1 ELSE RETURN n * Factorial(n - 1) ENDIF ENDFUNCTION

A Level Topic 20: Further Programming

What is the difference between low-level, imperative, object-oriented and declarative paradigms?
Low-level: works directly with the processor’s instructions and registers. Imperative (procedural): a sequence of statements that change state. Object-oriented: objects combining data and methods. Declarative: states facts and rules; the system works out how to answer a goal.
What are a class, an object and a constructor?
Class: a template defining attributes and methods. Object: an instance of a class. Constructor: the method that creates and initialises a new object.
What are encapsulation and inheritance?
Encapsulation: attributes are kept private and accessed only through the object’s methods (getters and setters). Inheritance: a subclass takes on the attributes and methods of its parent class and can add its own.
What is polymorphism?
A method with the same name behaves differently depending on the class of the object; a subclass can override an inherited method.
How does a declarative (logic) program answer a query?
It holds facts, e.g. parent(ali, sara), and rules, e.g. grandparent(X, Z) IF parent(X, Y) AND parent(Y, Z). A goal (query) is answered by matching it against the facts and rules.
What is an exception?
An unexpected event during program execution that disrupts the normal flow, such as a missing file, division by zero or invalid input.
What is exception handling and why is it used?
Code that catches an exception and deals with it (e.g. with try … except/catch) so the program does not crash and can report the problem or recover.
How do you read a record from a random file in 9618 pseudocode?
OPENFILE "Stock.dat" FOR RANDOM SEEK "Stock.dat", Position GETRECORD "Stock.dat", ThisItem CLOSEFILE "Stock.dat"
How do you add a record to a sequential file while keeping it in key order?
Read each record from the old file and write it to a new file until the correct position is reached; write the new record; copy the rest; then replace the old file with the new one.