Answer
Free flashcards · OxfordAQA IGCSE · 9210
Computer Science flashcards
115 cards covering every topic of the 9210 syllabus (For teaching from September 2017, exams from May/June 2019). 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.
Choose your cards
Session complete
Worth another look:
All 115 cards
For a quick read-through or printing. Cover the right-hand side to test yourself.
Topic 1: Algorithms
- What is an algorithm?
- A sequence of steps that solves a problem or completes a task. It must be unambiguous, finite and produce a result. A program is one implementation of an algorithm in a particular language.
- What is decomposition?
- Breaking a problem into smaller, manageable sub-problems.
- What is abstraction?
- Removing unnecessary detail to focus on what matters, e.g. an underground map keeps the connections but drops real distances.
- What is algorithmic thinking?
- Devising the sequence of steps that solves the problem.
- What do the four main flowchart symbols mean?
- Oval/rounded: start and stop. Parallelogram: input and output. Rectangle: process. Diamond: decision, with two labelled exits, Yes and No.
- What is the difference between a linear search and a binary search?
- Linear: checks each item in turn; works on data in any order; slow on large sets. Binary: compares the middle item and discards half each time; the data must be sorted; much faster.
- How does a bubble sort work?
- Repeatedly compare adjacent pairs and swap them if out of order. After each pass the largest remaining item has moved to the end. Stop when a pass makes no swaps.
- How does a merge sort work?
- Divide the list in half repeatedly until each part holds one item, then merge the parts back together in order. Faster than bubble sort on large lists but more complex.
- What is a trace table used for?
- Recording the value of each variable (one column each) as an algorithm runs line by line, to work out its output and find logic errors.
Topic 2: Programming
- What are the integer and real data types?
- Integer: whole numbers. Real: numbers with a fractional part (some languages call this float).
- What are the Boolean, character and string data types?
- Boolean: True or False. Character: a single character. String: a sequence of characters.
- Which data type would you use for a phone number, and why?
- String: it may start with 0 or contain + or spaces, and no arithmetic is done on it.
- What is the difference between a variable and a constant?
- A variable’s value can change while the program runs. A constant’s value is set once and cannot change.
- What are the three basic programming constructs?
- Sequence (instructions in order), selection (IF … THEN … ELSE) and iteration (repetition).
- What is the difference between WHILE and REPEAT … UNTIL loops?
- WHILE tests its condition before the loop body, so the body may run zero times. REPEAT … UNTIL tests after, so the body always runs at least once.
- When should you use a FOR loop?
- When the number of repetitions is known in advance (count-controlled iteration), e.g. FOR i ← 1 TO 10 … ENDFOR.
- What is nesting?
- Placing one construct inside another, such as an IF inside a FOR loop or one loop inside another.
- What is the difference between real division and integer division?
- Real division gives the exact result: 11 ÷ 2 = 5.5. Integer division gives only the whole-number part: 11 DIV 2 = 5.
- What does the modulus (MOD) operation give?
- The remainder after integer division: 11 MOD 2 = 1. Useful for testing whether a number is even (n MOD 2 = 0).
- Name the basic arithmetic operations used in programs.
- Addition, subtraction, multiplication, real division, integer division, modulus, and rounding or truncation.
- What are the relational operators?
- Equal to, not equal to, less than, greater than, less than or equal to, greater than or equal to (=, ≠, <, >, ≤, ≥).
- What type of value does a relational operation produce?
- A Boolean: True or False. For example, 7 > 3 is True.
- What is the difference between < 50 and ≤ 50 in a condition?
- < 50 is False when the value is exactly 50; ≤ 50 is True for 50. Getting this wrong causes off-by-one errors at boundaries.
- When is A AND B true, and when is A OR B true?
- A AND B: only when both are true. A OR B: when at least one is true.
- What does NOT do?
- It reverses a Boolean value: NOT True is False.
- Write a condition that is true when Score is at least 50 and Lives is more than 0.
- Score ≥ 50 AND Lives > 0
- What is an array?
- A data structure that holds a fixed number of items of the same data type under one name, each reached by its index.
- What is a two-dimensional array?
- An array arranged as a table of rows and columns; each item is reached with two indices, such as scores[2][3].
- What is a record?
- A data structure that groups related fields, which can be of different data types, about one item, such as a student’s name, age and form.
- Why use an array instead of many separate variables?
- One name holds all the values, so a loop can process every item, and the code is shorter and easier to change.
- Why do programs read from and write to files?
- Data in variables is lost when the program ends. A file stores data permanently so it can be used next time the program runs.
- What are the steps to read data from a text file?
- Open the file for reading, read the data (often line by line in a loop until the end of the file), then close the file.
- What is the difference between writing and appending to a file?
- Writing replaces any existing contents of the file. Appending adds the new data to the end, keeping what is already there.
- What is concatenation?
- Joining two or more strings together end to end, e.g. "Pass" and "word" give "Password".
- What is a substring?
- Part of a string taken from a start position for a given length, e.g. the first three characters of "London" are "Lon".
- Name common string handling operations.
- Finding the length, finding the position of a character, extracting a substring, concatenation, and converting between characters and their character codes or between strings and numbers.
- Why might you convert a string to an integer?
- Input is often read as a string; it must be converted to a number before arithmetic can be done on it.
- What is random number generation used for in programs?
- Games (dice rolls, shuffling), simulations, and picking test data or quiz questions at random.
- How would you simulate rolling a six-sided die?
- Generate a random integer between 1 and 6 inclusive, using the language’s random number function.
- Why are computer-generated random numbers called pseudo-random?
- They are produced by an algorithm from a starting value (seed), so they only appear random; the same seed gives the same sequence.
- What is a subroutine?
- A named block of code that performs a specific task and can be called from elsewhere in the program.
- What is the difference between a procedure and a function?
- A function returns a value to the code that called it. A procedure carries out a task but does not return a value.
- What are parameters?
- Values passed into a subroutine when it is called, so the same subroutine can work on different data.
- What is the difference between a local and a global variable?
- A local variable is declared inside a subroutine and only exists there. A global variable can be used anywhere in the program.
- What are the advantages of using subroutines?
- Code is reused rather than repeated, programs are easier to read, test and maintain, and different programmers can work on different subroutines.
- What is structured programming?
- Designing a program as a set of modules (subroutines) using only sequence, selection and iteration, with clear interfaces (parameters and return values).
- What are the advantages of the structured approach?
- Modules are easier to understand, test and debug on their own, can be reused, and make the program easier to maintain.
- Why does good code use meaningful identifiers, indentation and comments?
- They make the code easier for other people (and the author later) to read, understand and maintain.
- What is data validation? Give three checks.
- Checking that input is sensible and allowed before it is used. Examples: range check, length check, presence check, type check, format check.
- What is authentication in a program?
- Checking that a user is who they claim to be, for example by asking for a username and password.
- What are normal, boundary and erroneous test data?
- Normal: typical valid data, should be accepted. Boundary: on and just either side of the limits. Erroneous: invalid data, should be rejected.
- What is the difference between a syntax error and a logic error?
- Syntax error: breaks the rules of the language, so the program will not run. Logic error: the program runs but produces the wrong output.
- What is the difference between high-level and low-level languages?
- High-level: English-like, easier to write and debug, portable between processors. Low-level (machine code and assembly): close to the hardware, processor-specific, give direct control and can be very efficient.
- What is machine code?
- Instructions in binary that the processor can execute directly.
- What is the difference between a compiler and an interpreter?
- A compiler translates the whole program into machine code before it runs, producing an executable file. An interpreter translates and runs the program one line at a time, each time it runs.
- What does an assembler do?
- Translates assembly language (mnemonics such as ADD and LDA) into machine code.
Topic 3: Data representation
- Why do computers use binary?
- Their circuits are made of switches (transistors) with two states, on and off, which represent 1 and 0.
- How do you convert binary 1011 0110 to hexadecimal?
- Split into groups of four bits: 1011 = B and 0110 = 6, so B6.
- Why is hexadecimal used?
- It is a shorter way of writing binary that is easier for people to read and less error-prone; each hex digit stands for four bits.
- What are the units of storage from bit to gigabyte?
- A bit (b) is a 0 or 1; a byte (B) is 8 bits. 9210 uses decimal prefixes: 1 kB = 1,000 bytes, 1 MB = 1,000 kB, 1 GB = 1,000 MB, 1 TB = 1,000 GB.
- What does a binary shift do?
- A left shift by one place multiplies a number by 2; a right shift by one place divides it by 2 (any remainder is lost).
- What is a character set? Compare ASCII and Unicode.
- A set of characters with a binary code for each. 7-bit ASCII has 128 codes (English). Unicode represents many alphabets and special symbols, a far greater range, and uses the same codes as ASCII up to 127.
- How do you calculate the file size of a bitmap image?
- Width in pixels × height in pixels × colour depth (bits per pixel) gives the size in bits; divide by 8 for bytes.
- How do you calculate the file size of a sound recording?
- Sample rate (Hz) × sample resolution (bits) × duration (seconds) gives the size in bits.
- How do you build a Huffman tree?
- Count the frequency of each character, then repeatedly join the two items with the lowest totals into a new node holding their sum until one root remains. Label branches 0 and 1; a code is the path from the root.
- How do you calculate the bits needed for Huffman-compressed data?
- Add up frequency × code length for every character. Compare with uncompressed 7-bit ASCII: number of characters × 7.
- Why do frequent characters get short Huffman codes?
- They are joined last, so they sit near the root and need fewer branches (bits), which minimises the total size.
- Write 0000011100000011 in run length encoding
- 5 0 3 1 6 0 2 1. Each pair is a frequency then the data value (the specification's own example).
- What range of values must you convert between bases in 9210?
- Decimal 0 to 255, which is binary 0000 0000 to 1111 1111 and hexadecimal 00 to FF.
Topic 4: Computer systems
- What do the ALU and the control unit do?
- ALU: carries out calculations and logical comparisons. Control unit: fetches and decodes instructions and directs the other parts of the CPU.
- What are registers and cache?
- Registers: very small, very fast storage locations inside the CPU. Cache: a small amount of fast memory holding frequently used data and instructions, so the CPU waits less for main memory.
- What is the von Neumann architecture?
- Program instructions and data are both stored in main memory, and the processor fetches both from there.
- What happens in the fetch-decode-execute cycle?
- Fetch: the next instruction (address in the program counter) is copied from memory into the CPU. Decode: the control unit works out what it means. Execute: it is carried out. The cycle repeats.
- How do clock speed, number of cores and cache size affect CPU performance?
- Higher clock speed: more cycles, so more instructions, per second. More cores: several instructions processed at once, if the program can be split. Larger cache: fewer waits for main memory.
- What is the difference between RAM and ROM?
- RAM: volatile, read and write, holds the programs and data in use. ROM: non-volatile, read only, holds the start-up (boot) instructions.
- Compare magnetic, optical and solid-state storage.
- Magnetic (hard disk): large capacity, cheap per gigabyte, moving parts. Optical (CD, DVD, Blu-ray): cheap and portable, low capacity, slower. Solid-state (SSD, flash): fast, no moving parts, robust, but more expensive per gigabyte.
- What is an embedded system?
- A computer built into a larger device to do one dedicated task, such as the controller in a washing machine or microwave.
- What are the main functions of an operating system?
- Managing memory, files, the processor (so several programs can run), peripherals and security, and providing a user interface.
- What do the NOT, AND and OR gates do?
- NOT: inverts its single input. AND: output 1 only when both inputs are 1. OR: output 1 when at least one input is 1.
Topic 5: Computer networks
- What is the difference between a LAN and a WAN?
- LAN: covers a small area such as one building, usually with its own hardware. WAN: covers a large geographical area, often using communication links owned by others. The internet is the largest WAN.
- What are the advantages of networking computers?
- Sharing files, printers and an internet connection; central back-up and security; and communication between users.
- What is the difference between a star and a bus topology?
- Star: each device connects to a central switch; one cable failing affects only that device. Bus: all devices share one main cable; cheap, but a break stops the network and collisions increase with traffic.
- What is a network protocol?
- A set of rules that devices follow to communicate, covering the format and the order of messages.
- What are HTTP and HTTPS used for?
- HTTP transfers web pages between a web server and a browser. HTTPS does the same but encrypts the data.
- What are TCP and IP responsible for?
- TCP splits data into packets, checks they all arrive and puts them back in order. IP addresses the packets and routes them across networks.
- What is the difference between an IP address and a MAC address?
- An IP address identifies a device on a network and can change. A MAC address is a unique hardware address fixed into the network interface card.
- What is the difference between wired and wireless connections?
- Wired: faster, more reliable and more secure. Wireless (WiFi): devices can move around and no cables are needed, but signals are affected by distance and walls and can be intercepted.
Topic 6: Cyber security
- What is cyber security?
- The processes, practices and technologies that protect networks, computers, programs and data from attack, damage or unauthorised access.
- What is social engineering? Give two examples.
- Manipulating people into giving away information or access. Examples: phishing (fake emails or sites), blagging (an invented story to persuade someone), shouldering (watching someone type a PIN or password).
- What is malware? Name three types.
- Software written to cause harm or gain unauthorised access. Types: viruses, worms, trojans, spyware and ransomware.
- What is a brute force attack and how can it be prevented?
- Trying every possible password until one works. Prevented by long, complex passwords and by locking an account after several failed attempts.
- What is SQL injection?
- Typing SQL code into a website’s input box so that it runs on the database, to read or change data. Prevented by validating input and using parameterised queries.
- How does a firewall protect a network?
- It checks incoming and outgoing traffic against a set of rules and blocks traffic that is not allowed.
- What is encryption?
- Scrambling data using a key so that it cannot be understood if it is intercepted; only someone with the right key can decrypt it.
- What is penetration testing?
- Authorised, simulated attacks on a system to find its weaknesses before real attackers do.
- Why is two-factor authentication more secure than a password alone?
- The user needs two different kinds of evidence, such as a password and a code sent to their phone, so a stolen password alone is not enough.
Topic 7: Relational databases and structured query language (SQL)
- What are a table, a record and a field in a database?
- Table: data about one type of thing. Record: one row, all the data about one item. Field: one column, one item of data about each record.
- What is a primary key?
- A field that uniquely identifies each record in a table, such as StudentID.
- What is a foreign key?
- A field in one table that is the primary key in another table, used to link the two tables.
- Why is a relational database better than one flat file?
- Data is stored once in linked tables, so there is less data redundancy, fewer inconsistencies, and less storage is needed.
- What does this SQL do? SELECT Name FROM Pupil WHERE Age > 14
- Lists the Name of every pupil older than 14. Retrieval in 9210 uses only SELECT, FROM and WHERE (ORDER BY is not in the specification).
- How do you add a new record in SQL?
- INSERT INTO Pupil VALUES (25, 'Ali', 15) The 9210 specification requires only the form that gives a value for every field, in field order.
- How do you change and remove records in SQL?
- UPDATE Pupil SET Age = 16 WHERE PupilID = 25 DELETE FROM Pupil WHERE PupilID = 25 Without WHERE, every record would be changed or deleted.
- How do you get data from two linked tables in SQL?
- List both tables and match the foreign key to the primary key, e.g. SELECT Pupil.Name, Form.Tutor FROM Pupil, Form WHERE Pupil.FormID = Form.FormID
Topic 8: Web page design
- What is the difference between HTML and CSS?
- HTML (hypertext markup language) describes the structure and content of a page. CSS (cascading style sheets) describes how it looks: colours, fonts and layout.
- What are the head and body sections of an HTML page for?
- Head: information about the page that is not shown in the main window, such as the title and links to style sheets. Body: the content displayed in the browser.
- Which HTML elements are used for headings, paragraphs and lists?
- h1 to h6 for headings (most to least important), p for a paragraph, ul for an unordered list, ol for an ordered list and li for each list item.
- Which HTML elements create a hyperlink and an image, and which attributes do they need?
- a creates a link, with href giving the destination. img inserts an image, with src giving the file and alt giving a text description.
- Why should every image have alt text?
- It is displayed if the image does not load and is read out by screen readers for visually impaired users.
- What are the parts of a CSS rule?
- A selector, which says which elements to style, and a declaration block in curly brackets holding property: value pairs, each ending with a semicolon.
- What is the difference between a type selector and a class selector in CSS?
- Type selector (h1): styles every element of that type. Class selector (.price): styles any element with class="price". These are the two selector kinds named in the 9210 specification.
- Which CSS properties does the 9210 specification list?
- background-color, color, text-align, font-family, font-size, font-weight and font-style. A rule is written selector { property : value }.
- Where is CSS placed in 9210 exam questions?
- In an embedded style sheet: a style element inside the page. Exam questions only use embedded style sheets.
- Give three key differences between HTML5 and earlier versions of HTML
- Any three: supports facilities previously needing add-ons; better support for web applications through scripting and new APIs; easier graphics and multimedia with the svg, canvas, audio and video tags; new semantic elements such as header and article.
- Server-side vs client-side scripting
- Server-side scripts run on the web server to generate pages dynamically. Client-side scripts run in the browser to add extra functionality to a page.
Flashcards by topic
- Topic 1 Algorithms 9 cards
- Topic 2 Programming 47 cards · 13 subtopics
- Topic 3 Data representation 13 cards
- Topic 4 Computer systems 10 cards
- Topic 5 Computer networks 8 cards
- Topic 6 Cyber security 9 cards
- Topic 7 Relational databases and structured query language (SQL) 8 cards
- Topic 8 Web page design 11 cards
Written for OxfordAQA International GCSE Computer Science (9210), syllabus 9210 (For teaching from September 2017, exams from May/June 2019).
Cards by Marlbridge Academic Team; 3 restate definitions from the 9210 revision notes. This deck has not yet been reviewed as a whole by a subject teacher. Report an error.