AS Level content
A student wrote · Data representation, multimedia and compressionA student wrote: 'One kilobyte is 1024 bytes, so a 4 GB memory card holds 4096 megabytes.'
Why it loses marksThe first half uses the binary value under the decimal name, and the second half then applies a decimal prefix to a capacity that the question did not specify. The two systems are being mixed inside one answer, and the final figure is wrong whichever system was intended.
The answer that scoresOne kilobyte (kB) is 1000 bytes and one kibibyte (KiB) is 1024 bytes. A card sold as 4 GB holds 4 x 10^9 bytes, which is 4 000 000 000 bytes, and an operating system working in binary prefixes will report that as about 3.73 GiB, because 4 000 000 000 / 2^30 = 3.73. If the question had said 4 GiB, the capacity would be 4 x 2^30 = 4 294 967 296 bytes. The rule is to read the prefix in the question and to keep to one system throughout the calculation.
Revise this topicData representation, multimedia and compression
A student wrote · Data representation, multimedia and compressionA student wrote: 'In 8-bit two's complement the range is -127 to +127, and there are two ways of writing zero.'
Why it loses marksThat is the one's complement range and one's complement zero, not two's complement. Two's complement has a single zero, which is exactly why it is used in hardware, and its range reaches one further in the negative direction.
The answer that scoresIn 8-bit two's complement the range is -128 to +127. The sign bit has a place value of -128, so 1000 0000 is -128 and 0111 1111 is +127. Zero has one representation only, 0000 0000, because the negative of zero by invert-and-add-1 produces a carry out that is discarded. One's complement, by contrast, covers -127 to +127 and has both 0000 0000 (+0) and 1111 1111 (-0), which is the weakness that two's complement removes.
Revise this topicData representation, multimedia and compression
A student wrote · Data representation, multimedia and compressionA student wrote: 'If you double the image resolution of a bitmap, the file size doubles, because there are twice as many pixels.'
Why it loses marksResolution is quoted as width x height, so doubling the resolution doubles both dimensions and multiplies the number of pixels by four. The arithmetic in the explanation contradicts the conclusion.
The answer that scoresIf the resolution of a bitmap is doubled, both the width and the height are doubled, so the number of pixels becomes 2 x 2 = 4 times as large and the file size is four times as large, assuming the colour depth is unchanged. Doubling the colour depth, on the other hand, doubles the file size, because each pixel simply uses twice as many bits. So resolution changes the size by the square of the scale factor and colour depth changes it in direct proportion, and reducing either one saves space at a cost in detail or in the number of colours available.
Revise this topicData representation, multimedia and compression
A student wrote · Data representation, multimedia and compressionA student wrote: 'Run-length encoding is a lossy method, and it always makes a file smaller.'
Why it loses marksRLE is completely lossless - the count and value pairs reproduce the original exactly - and it does not always reduce the size. On a photograph, where almost every neighbouring pixel differs, each short run still needs a count, so the encoded file can be larger than the original.
The answer that scoresRun-length encoding is lossless: a run of identical values is replaced by a count and the value, so 12 white pixels become 12W, and decoding reproduces the original pixel values exactly. It reduces the file size greatly when there are long runs of the same value, as in icons, scanned line drawings and fax pages, which are mostly white. It performs badly on photographs, because neighbouring pixels rarely share a value for long and the count-value pairs add data instead of removing it, so RLE must be chosen to suit the content.
Revise this topicData representation, multimedia and compression
A student wrote · Data representation, multimedia and compressionA student wrote: 'A bigger sampling rate always gives a better recording, so you should use the highest rate possible, and a vector graphic loses quality when it is enlarged because the extra pixels are made up.'
Why it loses marksThe first half ignores the cost: raising the sampling rate increases the file size in direct proportion, and there is no audible benefit once the highest frequency present has been captured. The second half describes what happens to a bitmap, and applies it to a vector, which stores shapes rather than pixels.
The answer that scoresRaising the sampling rate records the wave more often, so higher frequencies are captured and the recording is more accurate, but the file size rises in direct proportion and storage and bandwidth are finite, so the rate is chosen to match the content - 44 100 Hz for music, around 8 000 Hz for speech. A vector graphic does not lose quality when enlarged, because it is stored as a drawing list of objects with properties and is redrawn at the resolution of the output device, so the edges stay sharp. It is a bitmap that pixelates when enlarged beyond its own resolution, because the extra pixels have to be interpolated and contain no new detail.
Revise this topicData representation, multimedia and compression
A student wrote · Networks including the internetA student wrote: 'A switch and a router do the same job, because both of them send data to the correct computer.'
Why it loses marksThey work at different levels and use different addresses. A switch forwards frames inside one LAN using MAC addresses and never changes the IP packet; a router forwards packets between different networks using IP addresses and routing tables. If the question asks what connects a LAN to the internet, 'switch' scores nothing.
The answer that scoresA switch connects the devices within one LAN. It learns which MAC address is on each port and forwards each frame out of the port where the destination is, so traffic does not reach every device. It does not change the IP packet and cannot pass data between two different networks. A router connects different networks, and each of its interfaces has an IP address. It reads the destination IP address of each packet, looks it up in its routing table and forwards the packet to the best next hop, which is how a LAN reaches the internet through the default gateway. A home router usually contains a switch and an access point as well, which is why the two are confused.
Revise this topicNetworks including the internet
A student wrote · Networks including the internetA student wrote: 'The internet and the world wide web are the same thing - the web is just another name for the internet.'
Why it loses marksThis cannot answer a question that asks for the difference, and it misleads the rest of the answer, because email and video calls are on the internet but not on the web. The internet is infrastructure; the web is one service running on it.
The answer that scoresThe internet is the global infrastructure: the interconnected networks, submarine cables, routers and exchange points that carry data using TCP/IP. The World Wide Web is one service that uses that infrastructure - the collection of web pages and resources, addressed by URLs and fetched with HTTP or HTTPS by a browser. Email, file transfer, voice calls and streaming are other services on the same internet. A device can be connected to the internet without anyone opening a web page, but a web page cannot be delivered without an internet connection.
Revise this topicNetworks including the internet
A student wrote · Networks including the internetA student wrote: 'IPv6 is 64 bits long and uses hexadecimal, which is why it is faster than IPv4.'
Why it loses marksTwo errors in one sentence. IPv6 is 128 bits, not 64, and its purpose is a far larger address space, not speed. A longer address does not make data travel faster; if anything it adds a little overhead.
The answer that scoresAn IPv4 address is 32 bits, written as four decimal numbers from 0 to 255 separated by dots, giving about 4.3 billion addresses. An IPv6 address is 128 bits, written as eight groups of four hexadecimal digits separated by colons, giving an address space large enough for every device to have a globally unique address, which removes the need for NAT. IPv6 also has a simpler fixed header, which can make routing slightly more efficient, but the reason for the change is the exhaustion of IPv4 addresses, not speed.
Revise this topicNetworks including the internet
A student wrote · Networks including the internetA student wrote: 'When two computers collide, they both just send the frame again straight away.'
Why it loses marksRetrying immediately produces another collision with the same host, and the network can lock up. The mark is for the jam signal and for a random back-off, with the delay range increasing after repeated attempts.
The answer that scoresEach host senses the medium before transmitting and only starts when it is idle, but two hosts can still begin at the same moment. While transmitting, each host compares the signal on the cable with what it is sending; when the two differ, it knows a collision has occurred. It stops transmitting, sends a short jam signal so that all stations detect the collision, and then waits for a random period chosen from a range of time slots before it senses the medium and tries again. If it collides again the range doubles, which spreads the competing hosts out and makes repeated collisions unlikely.
Revise this topicNetworks including the internet
A student wrote · Networks including the internetA student wrote: 'A private IP address makes the device secure, because nobody on the internet can see it.'
Why it loses marksNAT does keep unsolicited inbound connections away, but it is not a firewall. It does not stop malware that makes an outbound connection, it does not protect against an attacker already inside the network, and a forwarded port exposes the device completely.
The answer that scoresA private address comes from a reserved range such as 192.168.0.0/16 and is not routed on the internet, so no host outside can address the device directly; the router's NAT translates the private address to the public one and matches the replies. That removes a large class of unsolicited inbound attacks and hides the internal layout of the network. It is not, however, a security control in its own right: outbound connections are still allowed, a port forward deliberately exposes an internal server, and anyone who gains access to the LAN can reach the device. A firewall and up-to-date software are still needed.
Revise this topicNetworks including the internet
A student wrote · Computer components and logic circuitsA student wrote: 'ROM is used to store the operating system, which is why a computer can start up when the power is switched on.'
Why it loses marksThe operating system is stored in secondary storage and copied into RAM while the machine loads. ROM is far too small to hold it and, in normal use, cannot be written to at all. What ROM holds is the bootstrap and the firmware.
The answer that scoresROM holds the bootstrap program: the first instructions that run when the power is applied, which test the hardware, find the boot device and load the operating system from secondary storage into RAM. It is used because it is non-volatile, so the instructions are there every time the machine is switched on, and read-only, so they cannot be altered by a program or by a virus. The operating system itself, and every application and file, lives in secondary storage and is copied into RAM to run, because RAM is fast and can be written to but loses its contents when the power goes.
Revise this topicComputer components and logic circuits
A student wrote · Computer components and logic circuitsA student wrote: 'A buffer is a small hard disk inside the printer that stores documents until they are printed.'
Why it loses marksA buffer is memory, not storage. It is small, volatile and temporary, and it exists to absorb the difference in speed between two devices, not to keep documents safely. Calling it a hard disk makes it sound permanent, which is the opposite of what a buffer is for.
The answer that scoresA buffer is a temporary area of memory, usually RAM, that holds data while it is being transferred between two parts of a system working at different speeds. The printer buffer holds the document because the processor can send it far faster than the printer can print it: the processor writes into the buffer and carries on with other work, and the printer takes data out as it needs it. Nothing in the buffer is kept permanently - when it has been printed it is overwritten, and when the power goes it is lost.
Revise this topicComputer components and logic circuits
A student wrote · Computer components and logic circuitsA student wrote: 'In a control system the sensor compares the reading with the set value, and the actuator switches on the heater.'
Why it loses marksA sensor only measures; it cannot compare or decide. The comparison is done by the microprocessor, which holds the set value in memory and sends a signal to the actuator. Putting the decision in the sensor removes the processor from the system altogether.
The answer that scoresThe sensor measures the condition - the thermistor's resistance changes with temperature - and an ADC converts the signal into a digital value. The microprocessor compares that value with the set value stored in memory. If the reading is below the set value the microprocessor sends a signal to the actuator, which switches the heater on; when the next reading reaches the set value it switches the heater off. The sensor is read again after each action and the result is fed back, so the system corrects itself and does not overshoot.
Revise this topicComputer components and logic circuits
A student wrote · Computer components and logic circuitsA student wrote: 'The output of A XOR B is 1 when A is 1 or B is 1, so it is 1 when both inputs are 1.'
Why it loses marksThat is the OR gate. XOR is exclusive OR: it gives 1 only when the inputs are different, so the row where both inputs are 1 gives 0. The student has defined OR and then written the name XOR beside it.
The answer that scoresXOR (EOR) gives an output of 1 when the two inputs are different and 0 when they are the same, so its truth table is 00 -> 0, 01 -> 1, 10 -> 1, 11 -> 0. OR gives 1 when at least one input is 1, so its table is 00 -> 0 and 1 for the other three rows. The difference is the last row, and it is the row an examiner will look at first.
Revise this topicComputer components and logic circuits
A student wrote · Computer components and logic circuitsA student wrote: 'SRAM is slower than DRAM because static means it does not change, and DRAM is dynamic so it is refreshed and therefore faster.'
Why it loses marksIt is the wrong way round, and the words have been guessed from their everyday meaning. 'Static' refers to the bit holding its value without being refreshed, which is what makes SRAM fast; 'dynamic' refers to the charge having to be refreshed constantly, which is what makes DRAM slower but much cheaper and denser.
The answer that scoresSRAM stores each bit in a flip-flop of four to six transistors, so the bit stays put with no refresh, which makes it very fast; but each cell is large and expensive, so it is used in small amounts for cache and high-speed buffers. DRAM stores each bit as charge on a capacitor beside a single transistor; the charge leaks, so every cell must be refreshed thousands of times a second, which makes it slower, but a cell is far smaller and cheaper, so main memory is built from DRAM.
Revise this topicComputer components and logic circuits
A student wrote · CPU architecture, assembly language and bit manipulationA student wrote: 'The memory address register holds the data that has been fetched from memory so that the CPU can use it.'
Why it loses marksThat describes the memory data register. The MAR holds the address of the location being accessed, not the data found there, and the marker will not give the mark for a description of the wrong register.
The answer that scoresThe memory address register holds the address of the memory location that is currently being read from or written to, and it is connected to the address bus. The memory data register holds the data or instruction that has just been read from that location, or the data that is about to be written to it, and it is connected to the data bus. During the fetch stage the address in the PC is copied to the MAR, the instruction at that address is read into the MDR over the data bus, and it is then copied to the CIR.
Revise this topicCPU architecture, assembly language and bit manipulation
A student wrote · CPU architecture, assembly language and bit manipulationA student wrote: 'When an interrupt happens the processor stops immediately, jumps to the interrupt service routine, and afterwards starts the program again from the beginning.'
Why it loses marksThree errors in one sentence: the interrupt is only detected at the end of the execute stage, so the current instruction is completed; the state must be saved before the ISR runs; and the program resumes where it left off, not from the beginning.
The answer that scoresAn interrupt is detected at the end of the execute stage of the fetch-execute cycle, so the instruction being executed is completed first. The processor then saves the contents of its registers, including the program counter, on the stack, checks the priority of the interrupt, and loads the start address of the relevant interrupt service routine into the program counter so that the ISR runs. When the ISR finishes, the saved register values and the program counter are restored from the stack, so the interrupted program continues from the instruction it had not yet executed.
Revise this topicCPU architecture, assembly language and bit manipulation
A student wrote · CPU architecture, assembly language and bit manipulationA student wrote: 'To test whether bit 2 of the status byte is set, OR the accumulator with B00000100 and then compare the result with 0.'
Why it loses marksOR with a 1 forces the bit to 1, so the result would be the same whether the bit was set or clear - all the information would be destroyed. AND is the operation that isolates a bit, because a bit that was 0 stays 0 while a bit that was 1 stays 1.
The answer that scoresLoad the status byte, then AND the accumulator with a mask that has a 1 only in bit 2, so that every other bit becomes 0 and bit 2 is unchanged. If the bit was clear the accumulator now holds 0, and if it was set the accumulator holds 4. Compare the accumulator with 0 and branch: JPE (the compare was true, so the results were equal) means the bit was clear, and JPN (the compare was false) means the bit was set. OR would be used to set a bit, and XOR to toggle one.
Revise this topicCPU architecture, assembly language and bit manipulation
A student wrote · CPU architecture, assembly language and bit manipulationA student wrote: 'An arithmetic right shift of B10010110 gives B01001011, so the number is halved.'
Why it loses marksThat is a logical right shift: it puts a 0 into the sign position, so a negative number becomes positive and the value is not halved at all. An arithmetic shift must copy the sign bit into the vacated positions.
The answer that scoresThe leftmost bit is the sign bit, and here it is 1, so the number is negative and the shift must keep it negative. An arithmetic right shift copies the sign bit into the vacated positions on the left, so B10010110 shifted one place right becomes B11001011, and shifted two places right becomes B11100101. The value is halved by each place, with the result rounded down towards minus infinity, so the sign is preserved. A logical right shift of the same pattern would fill with zeros and give B01001011, which is a completely different, positive, number.
Revise this topicCPU architecture, assembly language and bit manipulation
A student wrote · CPU architecture, assembly language and bit manipulationA student wrote: 'LDX 200 loads the contents of address 200 into the accumulator, and LDI 300 loads the address 300 into the accumulator.'
Why it loses marksLDX is indexed addressing, so the address used is 200 plus the contents of the index register, which is 200 only when IX happens to be zero. LDI is indirect addressing, so 300 holds an address, and it is the contents of that second address that are loaded, not the address itself.
The answer that scoresLDX 200 uses indexed addressing: the processor adds the operand to the contents of the index register and reads the location at that address, so with IX holding 4 it reads address 204. LDI 300 uses indirect addressing: the processor reads address 300, finds an address stored there, and then reads the contents of that second address - two memory accesses rather than one. Direct addressing, LDD 200, is the instruction that simply loads the contents of address 200, and immediate addressing, LDM #200, would load the number 200 itself.
Revise this topicCPU architecture, assembly language and bit manipulation
A student wrote · Operating systems and language translatorsA student wrote: 'A computer needs an operating system because it is the software you use to write documents, browse the internet and send email.'
Why it loses marksThose are application programs. The operating system is the system software underneath them, and the reasons the syllabus wants are about managing resources, hiding the hardware and providing a platform for those applications to run on.
The answer that scoresA computer needs an operating system because the resources of the machine are limited and shared. The OS allocates processor time and memory to each program and keeps programs apart, so that one cannot overwrite another's data; it manages files and storage, decides who may access them, and controls the peripherals through device drivers so that a program can print without knowing how the printer works. It provides the user interface and the platform that application software is written against, and it handles errors so that a single faulty program does not stop the machine. A word processor is application software: it needs the operating system, not the other way round.
Revise this topicOperating systems and language translators
A student wrote · Operating systems and language translatorsA student wrote: 'The operating system translates the program into machine code and then runs it.'
Why it loses marksTranslation is the job of a translator - an assembler, compiler or interpreter - not of the operating system. The OS loads a program that is already in machine code and gives it processor time; it does not convert source code into machine code.
The answer that scoresA translator converts the program into machine code. An assembler translates an assembly language program, a compiler translates a whole high-level language program into an executable before it is run, and an interpreter translates and executes a high-level language program one statement at a time. The operating system's part comes afterwards: it loads the executable (or loads the interpreter, which then loads the source file), allocates it memory, and schedules the resulting process on the processor. Mixing the two up loses marks in both parts of the question.
Revise this topicOperating systems and language translators
A student wrote · Operating systems and language translatorsA student wrote: 'An interpreter is used to distribute software because it produces an executable file that the user can run.'
Why it loses marksAn interpreter does not produce an executable file at all: it translates and executes the source one statement at a time and saves nothing. Distribution is the compiler's advantage, precisely because the customer receives machine code and not source code.
The answer that scoresA compiler produces an executable file of machine code, and that file can be supplied to a user who has neither the compiler nor the source code; the code is therefore protected and the program runs quickly. An interpreter produces no separate translated file. It reads the source program and executes each statement as it translates it, so the user needs the interpreter installed and can read the source code. That makes an interpreter suitable for development and for teaching, where immediate feedback on the statement containing an error matters more than run-time speed, and a compiler suitable for software that is to be sold and run by people who must not see the code.
Revise this topicOperating systems and language translators
A student wrote · Operating systems and language translatorsA student wrote: 'The defragmentation software should be run every week on a solid-state drive to keep it fast.'
Why it loses marksDefragmentation works by moving blocks so that a file's parts are next to each other, which shortens the distance the read/write head of a magnetic disk has to travel. A solid-state drive has no head and no moving parts, so there is no access time to save, and the extra writing uses up the drive's limited write cycles.
The answer that scoresDefragmentation is for magnetic hard disks. As files are created, resized and deleted, the blocks belonging to one file become scattered across the disk, so reading the file requires the read/write head to move to several places; defragmentation rewrites the blocks so that each file is contiguous and the free space is collected together, which reduces head movement and speeds up access. A solid-state drive stores data in flash memory with no moving parts and the same access time wherever the data is, so defragmentation brings no speed benefit and the additional writes shorten its life. The operating system uses TRIM on a solid-state drive instead, to tell the drive which blocks are no longer needed.
Revise this topicOperating systems and language translators
A student wrote · Operating systems and language translatorsA student wrote: 'A program that uses a DLL is smaller because the library code is copied into the executable when it is compiled.'
Why it loses marksThe sentence contradicts itself and reverses how a DLL works. If the code were copied in, the executable would be larger - that is what happens with a static library. The whole point of a DLL is that the code is not copied in but loaded at run time.
The answer that scoresWith a dynamic link library the routine's code stays in a separate file. The program records that it needs the DLL, and when the program runs the operating system loads the DLL into memory and the program calls into it. Because the code is not copied into the executable, the executable is smaller and takes less disk space; one copy of the DLL can be shared in memory by several programs running at once; and the DLL can be replaced with a corrected version without the programs being recompiled. A static library works the other way: the code is copied in at link time, so the executable is larger but does not depend on a separate file being present.
Revise this topicOperating systems and language translators
A student wrote · Data security and data integrityA student wrote: 'Encryption protects the integrity of the data, because nobody can change it without the key.'
Why it loses marksEncryption protects confidentiality, not integrity in the sense the syllabus uses. It does not stop an authorised user altering the record, it does not stop a disk failing, and unless the system checks for it, a corrupted ciphertext decrypts to corrupted plaintext without any warning. Integrity is protected by validation, verification, access rights and audit trails.
The answer that scoresEncryption converts plaintext into ciphertext so that the data cannot be read without the key, which protects confidentiality in transit and at rest. It does not guarantee integrity: an authorised user with the key can still change the data, and corruption on the disk or in transit still happens. Integrity is protected by validation at entry, verification during entry and transfer, access rights that limit who may write, and an audit trail that records who changed what.
Revise this topicData security and data integrity
A student wrote · Data security and data integrityA student wrote: 'A range check checks that the customer's age is correct.'
Why it loses marksA range check only tests that the value lies between two limits, so any age that is possible passes - including the wrong one. Validation tests plausibility, not truth, and the mark is lost for claiming it confirms accuracy.
The answer that scoresA range check confirms only that the value lies between a lower and an upper limit, for example that an age is between 11 and 18. An age of 15 for a customer who is really 16 passes the check, so validation cannot establish that the data is true. Confirming accuracy needs verification against the source, such as a visual check against the passport or a second entry of the same data.
Revise this topicData security and data integrity
A student wrote · Data security and data integrityA student wrote: 'A parity check finds the bit that is wrong and corrects it.'
Why it loses marksWith byte parity the receiver only knows that the count of 1 bits is now wrong; it has no way of telling which of the eight bits changed, so the byte must be re-sent. Correction is only possible with block parity, and then only for a single bit, because the failing row and the failing column identify the position.
The answer that scoresWith byte parity an extra bit is added to each byte so that the number of 1 bits is always odd, or always even. The receiver counts again and detects that an error has occurred, but not where it is, so the byte is re-sent and nothing is corrected. With block parity there is a parity bit for every row and every column, so a single flipped bit fails both its row check and its column check and the intersection gives its position, which allows the receiver to flip that bit back.
Revise this topicData security and data integrity
A student wrote · Data security and data integrityA student wrote: 'Phishing is when the user is sent to a fake website, and pharming is when they are sent a fake email.'
Why it loses marksThat is the wrong way round on both counts. Phishing is the message that lures the user; pharming is the redirection of a correctly typed address with no message and no action by the user at all.
The answer that scoresPhishing is a fraudulent email or message that appears to come from a trusted organisation and persuades the recipient to click a link to a fake login page or open an attachment, so credentials are captured or malware is installed. Pharming needs no message and no click: the attacker poisons a DNS server's cache or alters the local hosts file so that a correctly typed domain name resolves to the attacker's server, and the browser shows the genuine URL while the user is on a copy of the site.
Revise this topicData security and data integrity
A student wrote · Data security and data integrityA student wrote: 'The firewall stops viruses from getting onto the network.'
Why it loses marksA firewall filters connections by IP address, port and protocol. It has no idea what is inside a connection it has allowed, so a virus inside an email on port 25 or a download over port 443 passes straight through. The mark is for the control that inspects files.
The answer that scoresA firewall controls which connections may pass between networks, using rules based on source and destination IP address, port number and protocol, so it stops an attacker reaching a service that should not be exposed and can block outbound traffic to a command server. It cannot inspect the content of traffic it permits, so a virus inside an allowed email or download is not stopped by it. Anti-virus software scans those files and attachments, matching known signatures and watching for suspicious behaviour, and quarantines anything it finds.
Revise this topicData security and data integrity
A student wrote · Ethics and ownershipA student wrote: 'Free software means software that you do not have to pay for, so open source software is free software and shareware is open source.'
Why it loses marksFree software is defined by freedoms, not by price. Software under the GPL may be sold, and shareware is a proprietary product distributed as a trial - its source code is not supplied, so it is not open source at all.
The answer that scoresFree software, as defined by the Free Software Foundation, means software that gives the user four freedoms: to run it for any purpose, to study and change it (which requires the source code), to redistribute copies, and to distribute modified versions. 'Free' refers to freedom, not price - free software can be sold, and much of it is. Shareware is different: it is a proprietary product distributed free of charge for a trial period or with some features disabled, and the user is expected to pay to continue using it. The source code is not supplied and copies must normally be passed on unaltered, so shareware is not open source and not free software.
Revise this topicEthics and ownership
A student wrote · Ethics and ownershipA student wrote: 'Open source software is not copyrighted because anyone is allowed to copy it, so a company can do whatever it likes with it.'
Why it loses marksOpen source software is fully copyrighted. The copyright owner has granted permissions through a licence, and the user is bound by the conditions of that licence - which for the GPL include publishing any modified version under the GPL.
The answer that scoresOpen source software remains the copyright of its authors; what changes is that the copyright is licensed on generous terms. Under a permissive licence such as MIT or Apache 2.0 a company may use the code even inside a closed-source product, provided it keeps the copyright notice. Under a copyleft licence such as the GPL, a company that distributes a modified version must release that version under the GPL with its source available, so it cannot take the code, improve it and lock the improvement away. Using the code outside the terms of the licence is copyright infringement, exactly as it would be with commercial software.
Revise this topicEthics and ownership
A student wrote · Ethics and ownershipA student wrote: 'Copyright protects the idea for a program, so nobody else can write a program that sorts data in the same way, and buying the software means you own the copyright.'
Why it loses marksCopyright protects the expression - the actual code, text or image - and not the idea, method or functionality. And buying a copy of software buys a licence to use it, not the copyright, which stays with the author or publisher.
The answer that scoresCopyright protects the fixed expression of a work: the actual source code, the text, the image, the recording. It does not protect the idea, the algorithm or the function, which is why two programmers may each write a program that sorts a list, provided they do not copy each other's code. Buying software transfers a licence to use it under stated conditions, not the copyright: the buyer may not copy it for others, publish it, or adapt it beyond what the licence allows, and doing so is infringement. The copyright, and the right to grant further licences, stays with the owner - which is why the licence terms, not the price, decide what the buyer may do.
Revise this topicEthics and ownership
A student wrote · Ethics and ownershipA student wrote: 'A professional body is a trade union that gets better pay for programmers, and its code of conduct is just advice that members can ignore.'
Why it loses marksA professional body sets and enforces a standard of competence and conduct and can suspend or expel a member; it is not a trade union negotiating pay, and its code is not optional for members.
The answer that scoresA professional body such as the BCS or the IEEE represents a profession rather than negotiating pay. It publishes a code of conduct or code of ethics that members must follow, provides training, publications and continuing professional development, awards recognised qualifications such as Chartered IT Professional status, and investigates complaints against members. A member who breaches the code can be suspended or expelled, which can cost them the title their career depends on. Membership is voluntary, and that is the point: joining is a public commitment to a published standard, it gives the public and employers someone to hold the professional to, and it gives the member guidance and support when an employer asks for something unethical.
Revise this topicEthics and ownership
A student wrote · Ethics and ownershipA student wrote: 'AI is any complicated program. Its main impact is that it will take all jobs, and it does not affect the environment because it is only software.'
Why it loses marksAI is defined by learning or reasoning from data rather than following rules written by a programmer, so complexity alone does not make a program AI. 'All jobs' is an unsupported generalisation, and AI has a substantial environmental cost through the electricity, water and hardware it requires.
The answer that scoresAI is software that performs tasks normally needing human intelligence by learning patterns from data rather than following rules written for every case; a large but rule-based program is not AI. Its impact has to be separated into three categories. Socially it improves access to services and diagnosis but can inherit bias from its training data, enable surveillance and produce convincing fake content. Economically it raises productivity and creates new roles, while displacing routine cognitive work and concentrating market power in the firms that own the models and the computing power. Environmentally it supports climate modelling, energy optimisation and precision farming, but training and running large models consumes large amounts of electricity and water for cooling, and the hardware creates electronic waste and demand for mined minerals.
Revise this topicEthics and ownership
A student wrote · Database concepts, DBMS and SQLA student wrote: 'A foreign key is a field that is unique to each record, and it goes in the table on the one side of a one-to-many relationship.'
Why it loses marksBoth halves are wrong. Uniqueness is the job of the primary key; a foreign key deliberately repeats, because the many side holds the same customer ID on every order that customer places. And the foreign key belongs on the many side, not the one side, because the one side would otherwise have to hold a list of orders in a single record.
The answer that scoresA foreign key is a field in one table that holds the value of the primary key of another table, so it is how the relationship is implemented. It may repeat and it may be null, so it is not unique. In a one-to-many relationship such as one customer placing many orders, the foreign key CustomerID sits in the Orders table, the many side, and repeats once for each order that customer places. In a many-to-many relationship there is no single place for it: a junction table is created holding both foreign keys, and those two fields together form its composite primary key.
Revise this topicDatabase concepts, DBMS and SQL
A student wrote · Database concepts, DBMS and SQLA student wrote: 'The table is not in 3NF because it contains repeated data and duplicate rows.'
Why it loses marksRepeated data is a description of redundancy, not of a dependency, and duplicate rows would breach the primary key rather than 3NF. The mark is for identifying which non-key field depends on which other non-key field. The words 'duplicate' and 'repeated' tell the examiner nothing about normal forms.
The answer that scoresThe table is in 2NF but not in 3NF because it contains a transitive dependency. CustomerName and CustomerTown both depend on CustomerID, and CustomerID is not the primary key, so they depend on the key only indirectly. To reach 3NF, the customer details move into their own table, Customer(CustomerID, CustomerName, CustomerTown) with CustomerID as the primary key, and Order becomes Order(OrderID, OrderDate, Total, CustomerID) with CustomerID as a foreign key referencing Customer. Each fact is then stored once, so changing a customer's town means changing one field.
Revise this topicDatabase concepts, DBMS and SQL
A student wrote · Database concepts, DBMS and SQLA student answered an UPDATE question with: 'UPDATE Customer SET Town = "Bradford";'
Why it loses marksThere is no WHERE clause, so the statement changes the town to Bradford for every customer in the table. The marks are for the WHERE clause that limits the change to the intended records, and the statement as written would destroy the data. Double quotes are also wrong for a text value in SQL.
The answer that scoresThe statement must name the records to be changed: UPDATE Customer SET Town = 'Bradford' WHERE CustomerID = 51; The WHERE clause identifies the single record by its primary key, so only that customer moves. Exactly the same rule applies to DELETE FROM Customer WHERE CustomerID = 51;, and to a query, where omitting WHERE returns every record instead of the ones asked for.
Revise this topicDatabase concepts, DBMS and SQL
A student wrote · Database concepts, DBMS and SQLA student wrote: 'DDL is used to insert and update the data, and DML is used to create the tables.'
Why it loses marksThe two are the wrong way round. DDL defines the structure and DML works on the data inside it, so swapping them loses the mark in every question that mentions either. A student who has this backwards cannot answer a question about which statements a DBMS records in its data dictionary.
The answer that scoresDDL, the Data Definition Language, is used for all creation and modification of the structure: CREATE DATABASE, CREATE TABLE, ALTER TABLE, and the declaration of data types, primary keys and foreign keys. The DBMS records these definitions in its data dictionary. DML, the Data Manipulation Language, is used for all queries and maintenance of the data: SELECT, INSERT INTO, UPDATE and DELETE FROM. Both are written in SQL, which is the industry standard for each.
Revise this topicDatabase concepts, DBMS and SQL
A student wrote · Database concepts, DBMS and SQLA student wrote: 'SELECT CustomerID, Surname, COUNT(OrderID) FROM Orders GROUP BY CustomerID;'
Why it loses marksSurname is in the SELECT list but not in the GROUP BY clause and is not inside an aggregate, so the DBMS has no single value it could show for a group of several orders. The statement is invalid, and even if it ran it would not answer the question, because Surname is not in the Orders table at all.
The answer that scoresEvery field in the SELECT list that is not inside an aggregate must appear in the GROUP BY clause: SELECT CustomerID, COUNT(OrderID) FROM Orders GROUP BY CustomerID; If the surname is genuinely needed, it has to be brought in from the Customer table with an INNER JOIN on CustomerID, and it still cannot be shown alongside a count of orders unless the grouping is by customer and the query returns one row per customer. The safe check is to compare the SELECT list with the GROUP BY list before writing anything else.
Revise this topicDatabase concepts, DBMS and SQL
A student wrote · Database concepts, DBMS and SQLA student wrote: 'A file-based approach is worse than a database because it is slower and takes up more space on the disk.'
Why it loses marksSpeed and disk space are not the examinable limitations, and neither is explained. The syllabus limitations are about redundancy and inconsistency, dependence of programs on file layout, the absence of ad hoc querying, weak security, uncontrolled concurrent access and the lack of central integrity rules. A vague comparison earns nothing.
The answer that scoresIn a file-based approach the same data is duplicated across separate files owned by separate applications, so an update made to one copy leaves the others holding a different version and the data becomes inconsistent. Each program is written round the exact layout of its file, so widening a field means rewriting every program that reads it. There is no way to ask a new question without writing a new program, access is granted to a whole file rather than to individual fields, and nothing centrally prevents two users overwriting each other's changes or a program bypassing the validation rules.
Revise this topicDatabase concepts, DBMS and SQL
A student wrote · Computational thinking and algorithmsA student wrote: 'An algorithm is a program written in a programming language that a computer can run, and abstraction is when you make a program shorter.'
Why it loses marksBoth definitions describe the wrong thing. An algorithm is not tied to a programming language at all - the program is one possible implementation of it. And abstraction is not shortening: it is choosing which details are essential to the purpose and removing the rest, which may leave the model no shorter in code but very different in what it represents.
The answer that scoresAn algorithm is a solution to a problem expressed as a sequence of defined steps - defined meaning that each step has only one meaning and the order is fixed, so that anyone following it gets the same result. It is language-independent: the same algorithm can be implemented in several programming languages, and the program is that implementation, written with the syntax of one language so that a computer can execute it. Abstraction is the process of removing or hiding the detail that is not needed for a particular purpose so that only the essential features of a problem or system are represented. Its purpose is to reduce complexity so the problem is small enough to understand, solve or model, and it produces an abstract model containing only essential details - such as a tube map that keeps stations and interchanges but discards true distances because the map exists for route planning.
Revise this topicComputational thinking and algorithms
A student wrote · Computational thinking and algorithmsA student wrote: 'Decomposition means writing the whole program first and then splitting it into procedures at the end, which makes it easier to test.'
Why it loses marksThat is refactoring after the event, not decomposition, and it gets the direction of the process wrong. Decomposition is a design activity carried out before any code is written: the problem is broken into sub-problems by function, and each sub-problem then becomes a module that is written and tested separately.
The answer that scoresDecomposition is breaking a large problem down into smaller sub-problems, each of which can be solved separately, until each is small enough to be written and tested on its own. The sub-problems are chosen by function - what each part has to do - so a school results system splits into reading the marks in, validating them, calculating grades, producing the report and saving the results. Each sub-problem becomes a program module, either a procedure or a function. Because the split happens before coding, each module can be given to a different programmer, can be tested in isolation with its own test data, can be reused elsewhere in the program, and can be changed later without affecting the other modules, which is what makes a decomposed program easier to maintain.
Revise this topicComputational thinking and algorithms
A student wrote · Computational thinking and algorithmsA student wrote this loop to read 10 marks: 'Count <- 0 / WHILE Count < 10 DO / INPUT Mark / Total <- Total + Mark / ENDWHILE'.
Why it loses marksNothing inside the loop ever changes Count, so the condition is still true after the tenth mark and the loop never ends. There is also no initialisation of Total, so the first addition is made to an undefined value. Both are algorithm design errors, and an algorithm that does not terminate is not an algorithm.
The answer that scoresInitialise the counter and the total before the loop, change the counter inside it, and close the loop properly: Count <- 0, Total <- 0, then WHILE Count < 10 DO, INPUT Mark, Total <- Total + Mark, Count <- Count + 1, ENDWHILE. Because the number of repetitions is known in advance, a count-controlled loop is the better choice and removes the risk entirely: FOR Count <- 1 TO 10, INPUT Mark, Total <- Total + Mark, NEXT. The average is then calculated after the loop, Average <- Total / 10, and output once, not inside the loop.
Revise this topicComputational thinking and algorithms
A student wrote · Computational thinking and algorithmsA student wrote: 'Abstraction means leaving out as much as possible so the model is simple, and a simple model is always a better model.'
Why it loses marksSimplicity is not the objective on its own. The objective is to represent the features that matter to the purpose of the model; a model that leaves out something essential is not simpler, it is wrong, and it produces confident but incorrect answers. What counts as essential is decided by what the model is for.
The answer that scoresAbstraction removes the detail that is not needed for the purpose, so that only the essential features are represented, and what is essential is decided by the purpose of the model. A model of a car for a driving simulator must keep mass, engine power and grip because they change how it drives, and can discard paintwork and seat material because they do not. Remove something that does matter - wind resistance from the flight model, the overdraft limit from the bank record - and the model gives wrong answers, which is worse than no model. So the skill is not removing as much as possible; it is deciding correctly what is essential, and the benefit that follows is a model that is cheaper to build, easier to understand and test, easier to change, and safe to experiment with.
Revise this topicComputational thinking and algorithms
A student wrote · Computational thinking and algorithmsA student was asked for an identifier table and produced: 'Mark, Total, Average, Count' with no data types, and used the name 'Total' for both the running total of marks and the total number of students.
Why it loses marksThe table has no data types, so it does not show the design decision the examiner is looking for, and one identifier is being used for two different quantities - which is exactly the confusion a good identifier table exists to prevent. 'Mark' is also too vague to show what it holds.
The answer that scoresA complete identifier table gives every identifier, a description and a data type, and every quantity has its own name: StudentMark (INTEGER - the mark for the current student, out of 100), MarkTotal (INTEGER - the running sum of all marks entered), StudentCount (INTEGER - how many students have been processed), AverageMark (REAL - MarkTotal divided by StudentCount), IsPass (BOOLEAN - TRUE when StudentMark is 40 or more). The names are meaningful and consistently styled, they are unique, and the data types are chosen to fit the values each one can take, with AverageMark as REAL because a mean need not be a whole number.
Revise this topicComputational thinking and algorithms
A student wrote · Data types, arrays, files and abstract data typesA student wrote: 'The telephone number should be stored as an INTEGER because it is made of digits, and the price of the ticket should be stored as an INTEGER because it is a number.'
Why it loses marksBoth choices lose information. An INTEGER cannot hold a leading zero, so 07700 900123 becomes 7700900123, and it cannot hold the spaces or the plus sign in an international number. A ticket price such as 12.50 needs a fractional part, which an INTEGER cannot store, so the 50 pence is lost or the value is rejected.
The answer that scoresThe telephone number should be a STRING, because it is not used in arithmetic, it may begin with 0, and it may contain spaces, brackets or a leading + for an international number; storing it as an INTEGER would drop the leading zero and could not hold the other characters. The price should be a REAL, because it can have a fractional part and is used in arithmetic such as adding up a total or working out change. If the program must avoid the rounding errors of binary floating point, the price can instead be stored as an INTEGER number of pence and divided by 100 only when it is displayed.
Revise this topicData types, arrays, files and abstract data types
A student wrote · Data types, arrays, files and abstract data typesA student's bubble sort contained: 'IF Names[Index] > Names[Index + 1] THEN Names[Index] <- Names[Index + 1] Names[Index + 1] <- Names[Index] ENDIF'.
Why it loses marksThere is no temporary variable, so the first assignment destroys the value that the second assignment needs. Both elements end up holding the smaller value, one name is lost, and the array can never be sorted. The second line also needs the ENDIF to be on its own line, but the lost value is the error that costs the marks.
The answer that scoresA swap needs three assignments through a temporary variable: Temp <- Names[Index], then Names[Index] <- Names[Index + 1], then Names[Index + 1] <- Temp. The first statement saves the value that is about to be overwritten, the second moves the smaller value down, and the third puts the saved value into the upper position. The whole swap sits inside IF Names[Index] > Names[Index + 1] THEN ... ENDIF, and a Boolean flag is set to TRUE inside the same IF so that the outer REPEAT ... UNTIL Swap = FALSE loop knows another pass is needed.
Revise this topicData types, arrays, files and abstract data types
A student wrote · Data types, arrays, files and abstract data typesA student's linear search read: 'Index <- 1 WHILE ProductCode[Index] <> SearchCode DO Index <- Index + 1 ENDWHILE OUTPUT Index'.
Why it loses marksThe loop has no bounds check, so a code that is not in the array runs the index past the upper bound and the program fails with an index error or reads rubbish. It also has no way of reporting that the value was not found, so it outputs a position that does not exist. There is no Found flag, so the program cannot tell a successful search from a failed one.
The answer that scoresThe search must initialise both an index and a flag, and its loop condition must contain both conditions: Found <- FALSE, Index <- 1, then WHILE NOT Found AND Index <= 500 DO, comparing ProductCode[Index] with SearchCode, setting Found <- TRUE when they match and otherwise incrementing Index. After the loop, test the flag: if Found is TRUE then output Index, otherwise output a message such as "Code not found". Because the index is incremented while the value is not found, it ends at 501 for an unsuccessful search, which is exactly why the flag rather than the index decides the output.
Revise this topicData types, arrays, files and abstract data types
A student wrote · Data types, arrays, files and abstract data typesA student wrote: 'The program opens the file FOR WRITE each time a pupil is added so that the new pupil is stored with the others, and it reads the file with READFILE until the program crashes, which shows it has reached the end.'
Why it loses marksOpening FOR WRITE empties the file, so every pupil already stored is destroyed and the file ends up holding only the last one added. Waiting for a crash is not a way of detecting the end of a file: the program should test EOF before each read, and a crash means data has already been read from beyond the end.
The answer that scoresTo add a pupil without losing the existing records the file is opened FOR APPEND, which positions the write at the end and leaves the existing lines untouched; FOR WRITE would be used only when the whole file is being created again. To read it, the program opens FOR READ, then loops WHILE NOT EOF("pupils.txt") DO, reading one line with READFILE inside the loop and processing it, and closes the file with CLOSEFILE when the loop ends. Testing EOF before the read means the loop stops cleanly after the last line instead of reading past the end.
Revise this topicData types, arrays, files and abstract data types
A student wrote · Data types, arrays, files and abstract data typesA student wrote: 'A queue is last in, first out, so the most recently added item is removed first, which is why a queue is used for the back button in a browser.'
Why it loses marksA queue is first in, first out: items are added at the rear and removed from the front, so the oldest item leaves first. LIFO is the behaviour of a stack, not a queue, and the back button needs the most recent page, so the structure named is wrong as well as the definition.
The answer that scoresA stack is last in, first out: each page visited is pushed onto the top of the stack, and the back button pops the most recent page off the top, which is exactly the page the user expects to see. A queue is first in, first out: items are enqueued at the rear and dequeued from the front, so the oldest item is removed first, which suits a print spooler where jobs must print in the order they were sent. The back button therefore needs a stack, because the most recent page must be the first one removed.
Revise this topicData types, arrays, files and abstract data types
A student wrote · Programming basics, constructs and structured programmingA student wrote: REPEAT ... INPUT Answer ... UNTIL Answer <> "Y" for a loop that should keep asking until the user types Y.
Why it loses marksUNTIL states the condition that stops the loop. Answer <> "Y" is TRUE for every answer except Y, so the loop stops the first time the user types anything else and carries on when they type Y - exactly backwards.
The answer that scoresREPEAT, then INPUT Answer, then UNTIL Answer = "Y". The condition after UNTIL is the exit condition: the body repeats while that condition is FALSE and stops as soon as it is TRUE, so the condition must describe the state that ends the loop. The pre-condition equivalent is WHILE Answer <> "Y" ... ENDWHILE, where the condition is the continuation condition - carry on while the answer is not Y. Same job, opposite-looking conditions, and the test sits at opposite ends of the body.
Revise this topicProgramming basics, constructs and structured programming
A student wrote · Programming basics, constructs and structured programmingA student wrote a function that displays its answer: FUNCTION Average(Total : INTEGER, Count : INTEGER) RETURNS REAL, with OUTPUT Total / Count in the body, called as CALL Average(Sum, N).
Why it loses marksThree separate errors in one module. OUTPUT sends a value to the console instead of returning it, so nothing is handed back to the caller and there is no RETURN statement to supply the value promised by RETURNS REAL. And a function call is not a complete statement, so it cannot be called with CALL.
The answer that scoresFUNCTION Average(Total : INTEGER, Count : INTEGER) RETURNS REAL, with RETURN Total / Count as the last statement, and ENDFUNCTION. The call belongs in an expression, for example OUTPUT "Mean mark: ", Average(Sum, N), where the returned REAL replaces the call and is then printed by the OUTPUT that surrounds it. The header promises a REAL, the RETURN supplies exactly that type, and no CALL is used because a function is not a procedure.
Revise this topicProgramming basics, constructs and structured programming
A student wrote · Programming basics, constructs and structured programmingA student wrote PROCEDURE AddMark(Mark : INTEGER, Total : INTEGER) with Total <- Total + Mark in the body, then called CALL AddMark(56, Sum) and expected Sum to have increased by 56.
Why it loses marksWithout a keyword, parameters are passed by value, so Total inside the procedure is a copy of Sum. The addition changes the copy, the copy disappears when the procedure ends, and Sum in the caller is exactly as it was. The procedure runs without an error and has no effect at all.
The answer that scoresPROCEDURE AddMark(Mark : INTEGER, BYREF Total : INTEGER), with Total <- Total + Mark in the body and ENDPROCEDURE, called as CALL AddMark(56, Sum). BYREF before the parameter means the parameter refers to the caller's own variable, so the assignment changes Sum itself. The rule is to ask what the module must give back: if nothing, pass by value, which protects the caller's data; if it must change a value in the caller, that parameter needs BYREF, and a procedure that must return two changed values needs BYREF on both.
Revise this topicProgramming basics, constructs and structured programming
A student wrote · Programming basics, constructs and structured programmingA student wrote a loop over an array of 30 elements as FOR Index <- 1 TO 29 ... NEXT Index, and a loop that should ask exactly five times as FOR Index <- 1 TO 5 STEP 1, with Index <- Index + 1 added at the end of the body.
Why it loses marksThe first loop stops one element early, because the upper bound is inclusive - 1 TO 29 visits 29 values, not 30. The second adds to the counter by hand inside a count-controlled loop, so each repetition moves the counter twice and the body runs three times instead of five.
The answer that scoresFOR Index <- 1 TO 30 ... NEXT Index for an array declared ARRAY[1:30], because both bounds are included and the count is upper bound minus lower bound plus one. For five repetitions, FOR Index <- 1 TO 5 ... NEXT Index with nothing inside the body that touches Index, because NEXT is what advances the counter. The bounds should come from the declaration, and the counter should be left to the loop: a FOR loop whose counter is assigned inside the body no longer has a known number of repetitions, which was the only reason for choosing it.
Revise this topicProgramming basics, constructs and structured programming
A student wrote · Programming basics, constructs and structured programmingA student replaced a nested IF with CASE OF Total and wrote clauses such as Total > 100 AND Member = TRUE : Discount <- 20, and left out OTHERWISE because all the values were 'covered'.
Why it loses marksA CASE tests a single identifier against fixed values or ranges. It cannot evaluate a compound condition on two variables, so Total > 100 AND Member = TRUE is not a valid case label - that logic belongs in an IF. Leaving out OTHERWISE also leaves every value that matched no clause with no branch to run at all.
The answer that scoresIf the branches depend on two variables or on compound conditions, use nested IF statements, one condition per IF, each closed with its own ENDIF. If the choice really is one identifier against a list, use CASE OF Identifier with labels that are single values or ranges such as 80 TO 100, and finish with OTHERWISE : followed by the default action, so an unexpected value is handled deliberately rather than falling through. Ranges in a CASE must not overlap either, because the clauses are tested in sequence and the first match wins.
Revise this topicProgramming basics, constructs and structured programming
A student wrote · Program development life cycle, design, testing and maintenanceA student wrote: 'A logic error is when the program will not run because the programmer has typed the code incorrectly.'
Why it loses marksThat describes a syntax error. A logic error does not stop the program at all - the translator accepts it and the program runs happily and produces the wrong answer, which is why it is the hardest type to find.
The answer that scoresA syntax error breaks the rules of the language, so the translator cannot produce code and reports the fault at compile time - a missing ENDIF, an unbalanced bracket, a mistyped keyword. A logic error is valid code that does the wrong thing: it uses < where it needed <=, so a loop runs one iteration too few, or it adds where it should multiply. The program runs to completion and gives an incorrect result, so the fault is found by comparing output with the expected result, by a dry run with a trace table, or by a walkthrough - never by the translator. A run-time error is the third type: the code is valid and the logic may be right, but when a particular instruction executes with particular data, such as a division by zero or an array index out of range, the program halts.
Revise this topicProgram development life cycle, design, testing and maintenance
A student wrote · Program development life cycle, design, testing and maintenanceA student wrote: 'Before testing the program on a computer, we did a dry run, which means running the program slowly and watching each line.'
Why it loses marksA dry run involves no computer at all. The whole point is that a person executes the algorithm by hand and records the values, which can be done on the design before any code exists.
The answer that scoresA dry run is a person working through the pseudocode or code by hand, keeping a trace table with a column for each variable and a row for each step, writing down the value of every variable each time it changes, and comparing the final output with the expected output. No computer is used, so it can be done on the design before the program exists and it exposes logic errors early. Running the program slowly, or stepping through it in a debugger, is a different technique: the computer is executing the code and you are watching the values it produces.
Revise this topicProgram development life cycle, design, testing and maintenance
A student wrote · Program development life cycle, design, testing and maintenanceA student wrote: 'A structure chart shows the order in which the program carries out its steps, starting at the top and working down.'
Why it loses marksA structure chart shows hierarchy, not sequence. Reading it top to bottom tells you which module calls which, not what happens first at run time, and it contains no decisions or loops at all.
The answer that scoresA structure chart shows the solution decomposed into a hierarchy of modules: the main program at the top, the sub-tasks it calls below it, and their sub-tasks below them, with each box labelled with what that module does. The lines show calls, and the labelled arrows show the parameters passed - data passed down to a module and values returned up to the module that called it. It does not show the order in which instructions execute, and it contains no selection or iteration. The order of execution and the decisions belong in pseudocode or a flowchart for each individual module, which is why the two diagrams are used together, not instead of one another.
Revise this topicProgram development life cycle, design, testing and maintenance
A student wrote · Program development life cycle, design, testing and maintenanceA student wrote: 'Beta testing is when the developers test the finished program in their own office before it is released, and alpha testing is when customers try it.'
Why it loses marksThe two have been swapped. Alpha is the in-house testing; beta is the release to real users outside the organisation. Only beta can find faults that depend on the user's own hardware, data and habits.
The answer that scoresAlpha testing is carried out in-house by the developers and their own testers before release, in controlled conditions where the people who wrote the code are available to investigate anything that goes wrong. Beta testing releases the near-final version to real users outside the organisation, who use it on their own hardware with their own data and report the faults they find; it is the only way to discover problems caused by the variety of machines, configurations and patterns of use in the real world. Acceptance testing comes after both: the client tests the system against the requirements specification to decide whether it can be accepted.
Revise this topicProgram development life cycle, design, testing and maintenance
A student wrote · Program development life cycle, design, testing and maintenanceA student wrote: 'Perfective maintenance is when the programmers fix the errors that users report after the system has gone live.'
Why it loses marksThat is corrective maintenance. Perfective maintenance is work on a system that is already correct - making it better, not making it right.
The answer that scoresCorrective maintenance fixes a fault that has been found in use: a calculation that gives the wrong total, a report that crashes on one customer's record, a validation rule that lets through an impossible date. Perfective maintenance improves a system that is working as specified: making a search faster, using less memory, redesigning a screen that users find confusing, adding a report they have asked for, or restructuring the code so that future changes are easier. Adaptive maintenance is the third type and is caused from outside the system - a new operating system, replacement hardware, a new file format, or a change in the law such as a new tax rate. The test is to ask why the change is being made: something was wrong, something outside changed, or something working is being made better.
Revise this topicProgram development life cycle, design, testing and maintenance
A Level content
A student wrote · User-defined data types, file organisation and floating-point numbersA student wrote: 'A set is a list of values in a fixed order, and it can hold the same value twice if the user enters it twice.'
Why it loses marksBoth halves are wrong. A set is unordered, so {Biology, Computing} and {Computing, Biology} are the same set, and a value either belongs to a set or does not, so duplicates are impossible. A fixed order with duplicates allowed describes an array or a list, not a set.
The answer that scoresA set is a composite data type holding an unordered collection of values of the same base type, in which each value can appear at most once. Because order carries no meaning, two sets with the same members are equal however they were built, and adding a value that is already present changes nothing. The operations are adding and removing a value, testing membership with IN, and combining sets by union, intersection and difference. A set is the right type when the question is membership, such as which optional subjects a pupil takes, and an array is the right type when order and repetition matter.
A student wrote · User-defined data types, file organisation and floating-point numbersA student wrote: 'A random file is one where the records are stored in a random order, so you have to search the whole file to find a record.'
Why it loses marksRandom does not mean shuffled, and it certainly does not mean slow. The records are placed at addresses calculated from their keys by a hashing algorithm, which is precisely what allows a record to be found without searching. Describing the file as shuffled and then saying it must be searched contradicts the whole purpose of the organisation.
The answer that scoresA random file, also called a direct file, stores each fixed-length record at an address calculated from its record key by a hashing algorithm. To find a record the program hashes the key and goes straight to that address, so one disk read is enough however large the file is; there is no searching. The order of the records is meaningless, which is why a sequential report from such a file needs a separate sorted index, and the cost of the method is wasted space and the need to handle collisions, where two keys hash to the same address.
A student wrote · User-defined data types, file organisation and floating-point numbersA student wrote: 'Giving more bits to the exponent makes the numbers more precise, because the exponent makes the number bigger.'
Why it loses marksThe exponent sets the range, not the precision. Precision is the number of significant binary digits, which is decided by the mantissa. Taking a bit from the mantissa to give to the exponent widens the range but coarsens the gaps between representable values.
The answer that scoresThe mantissa holds the significant digits, so m mantissa bits give m - 1 significant binary digits and set the precision: with an 8-bit mantissa the gap near 1 is 2^-7, and with a 12-bit mantissa it is 2^-11. The exponent sets the range: e exponent bits give a two's complement exponent from -2^(e-1) to 2^(e-1) - 1, so 4 bits give -8 to +7 and 8 bits give -128 to +127. Moving a bit from the mantissa to the exponent therefore widens the range of values that can be held but makes the values coarser, so the two cannot be increased together in a fixed word length.
A student wrote · User-defined data types, file organisation and floating-point numbersA student wrote: 'To normalise 00010110 0100 I shifted the mantissa left two places to 01011000, so the answer is 01011000 0100.'
Why it loses marksThe mantissa was shifted but the exponent was left alone, which multiplies the value by four. Shifting the mantissa left moves the binary point right, so the exponent must decrease by one for every place shifted to keep the value the same.
The answer that scoresThe mantissa 00010110 is 0.0010110, or 0.171875, and the exponent 0100 is 4, so the value is 0.171875 x 16 = 2.75. The mantissa begins 00, so shift it left twice to 01011000 and decrease the exponent by two, from 4 to 2. The normalised pattern is 01011000 0010, and the check is 0.1011 x 2^2 = 0.6875 x 4 = 2.75, which is the original value. The rule is that a normalised positive mantissa begins 01 and a normalised negative mantissa begins 10.
A student wrote · User-defined data types, file organisation and floating-point numbersA student wrote: '0.1 is stored exactly in binary floating point, so 0.1 + 0.2 gives exactly 0.3.'
Why it loses marksOnly fractions that are sums of powers of two can be stored exactly. 0.1 in binary is the recurring fraction 0.0001100110011..., so any fixed number of mantissa bits stores an approximation, and the error survives the addition.
The answer that scoresThe denary fraction 0.1 is 0.0001100110011... in binary, which recurs, so it cannot be represented exactly in a finite number of bits. With an 8-bit mantissa it is normalised to 0.1100110 x 2^-3 and stored as 01100110 1101, which is 0.099609375 - an error of about 0.00039. That is a rounding error, and it accumulates when such values are added repeatedly or multiplied, so a program that tests two calculated values for equality may get the wrong answer. The consequences are handled by comparing with a tolerance, by holding money in integer pence, and by allowing enough mantissa bits for the accuracy the problem needs.
A student wrote · Protocols, circuit switching and packet switchingA student wrote: "TCP/IP is the protocol used to send an email across the internet."
Why it loses marksTCP/IP is a suite of protocols arranged in four layers, not a single protocol. Email is sent by SMTP at the application layer, and TCP/IP is the whole stack of protocols that carries it. The answer names the suite where a named protocol was needed and explains no layer.
The answer that scoresTCP/IP is the protocol suite used by the internet, organised as four layers: Application, Transport, Internet and Link. Email is handled at the application layer by SMTP, which sends the message from the client to its mail server and between mail servers. The transport layer, using TCP, splits the message into numbered packets, adds port numbers and a checksum, acknowledges delivery and retransmits anything missing. The internet layer, using IP, adds the source and destination IP addresses and lets routers forward each packet, and the link layer puts each packet into a frame with MAC addresses for transmission over the physical medium.
Revise this topicProtocols, circuit switching and packet switching
A student wrote · Protocols, circuit switching and packet switchingA student wrote: "SMTP is used to collect email from the server and POP3 is used to send it to the server."
Why it loses marksThe two directions are reversed. SMTP is a push protocol used for sending; POP3 and IMAP are pull protocols used for collecting. The answer also ignores IMAP, which is the protocol that keeps several devices synchronised.
The answer that scoresSMTP is the push protocol: it sends email from the client to the outgoing mail server, and then from one mail server to another until the message reaches the server holding the recipient's mailbox. POP3 and IMAP are the pull protocols used by the recipient's client to collect the message. POP3 normally downloads the messages to one device and deletes them from the server, so nothing is synchronised. IMAP leaves the messages on the server and synchronises folders and read/unread state, so the same mailbox can be read on a phone and a laptop.
Revise this topicProtocols, circuit switching and packet switching
A student wrote · Protocols, circuit switching and packet switchingA student wrote: "Circuit switching is best for the internet because every message gets its own dedicated line, so nothing can go wrong."
Why it loses marksThe internet is packet-switched, and a dedicated circuit for every message would be impossible to afford or to scale. The answer also misses the two real drawbacks: capacity is reserved and wasted when nothing is sent, and a single failed link breaks the whole connection. It does not say where circuit switching genuinely is applicable.
The answer that scoresCircuit switching reserves a dedicated path for the whole duration of a connection, so bandwidth and delay are guaranteed and data arrives in order, which suits continuous real-time traffic such as a telephone call or live video. It is unsuitable for the internet's bursty data traffic because the reserved capacity is wasted during silences, the connection takes time to set up, the number of simultaneous connections is limited, and the loss of any link on the path ends the connection. Packet switching is used instead: links are shared only while packets are actually being sent, and packets can be rerouted around a failure.
Revise this topicProtocols, circuit switching and packet switching
A student wrote · Protocols, circuit switching and packet switchingA student wrote: "A router forwards each packet to the destination computer using its MAC address."
Why it loses marksA router forwards a packet to the next router on the route, not directly to the destination, and the decision is made from the destination IP address in the packet header, not from a MAC address. MAC addresses belong to the link layer and identify devices at the two ends of one link.
The answer that scoresA router receives a packet, reads the destination IP address from its header, and looks that address up in its routing table to find the best next hop. It then forwards the packet to the next router on that route, and the next router repeats the process, so the packet crosses the internet one hop at a time. The destination IP address identifies the network and host that the packet is ultimately for, while the MAC addresses in the frame identify only the two devices at the ends of the current link, and they are replaced at every hop. If a link is congested or has failed, the router can choose a different next hop.
Revise this topicProtocols, circuit switching and packet switching
A student wrote · Protocols, circuit switching and packet switchingA student wrote: "In packet switching all the packets follow the same route, so they arrive in the correct order and none can be lost."
Why it loses marksPackets in the same message are routed independently and may take different paths, so they can arrive out of order and some can be delayed or dropped. The sequence numbers and the retransmission in TCP exist precisely because packets are not guaranteed to arrive in order or at all.
The answer that scoresIn packet switching each packet is sent independently and routers decide the next hop for each one, so packets from the same message may travel by different routes and arrive out of order, with different delays. Each packet carries a sequence number, and the transport layer at the destination uses it to reassemble the message in the correct order. Packets that fail the error check are discarded, and TCP arranges for missing or corrupt packets to be retransmitted. Delay that varies from packet to packet is called jitter, and it is why real-time audio and video need priority handling.
Revise this topicProtocols, circuit switching and packet switching
A student wrote · Processors, parallel processing, virtual machines and Boolean algebraA student wrote: 'RISC processors are worse than CISC processors because a program needs more instructions, so the program takes longer to run.'
Why it loses marksProgram length is being confused with execution time. A RISC program does contain more instructions, but each one is simple and mostly completes in a single clock cycle, and the processor can pipeline them, so the same job often finishes in less time. The extra instructions are a real cost in code size and compiler effort, not in speed.
The answer that scoresA RISC processor uses a small set of simple, fixed-length instructions, so a program needs more of them, which makes the code larger and puts more work on the compiler. Against that, each instruction is short and predictable: most take one clock cycle, all take the same time to decode, and the processor can overlap them in a pipeline so that one instruction completes every cycle. Fixed length and simple addressing also keep the pipeline free of stalls. A CISC processor needs fewer, longer instructions, which keeps the code small, but each may take several cycles and the varying lengths make pipelining harder. Neither is simply better: RISC wins on power and predictable speed, which is why it dominates phones and embedded systems, while CISC wins on code size and compatibility with existing software.
A student wrote · Processors, parallel processing, virtual machines and Boolean algebraA student wrote: 'When an interrupt occurs the processor stops the program it is running and immediately jumps to the interrupt routine.'
Why it loses marksTwo steps are missing and the timing is wrong. The processor only tests for interrupts at the end of an instruction, so the current instruction must be completed first, and nothing is said about saving the processor state - which is the step that makes it possible to return.
The answer that scoresThe processor checks for interrupts at the end of each fetch-decode-execute cycle. If one is pending it finishes the instruction it is executing, then saves the processor state - the program counter and the contents of the registers - usually by pushing them onto a stack. It loads the address of the interrupt service routine from the interrupt vector table into the program counter and executes that routine to service the device. When the routine ends, the saved state is restored and the original program resumes at exactly the instruction it had reached, so from the program's point of view nothing has changed except the time taken.
A student wrote · Processors, parallel processing, virtual machines and Boolean algebraAsked for the truth table of a circuit that adds two bits and a carry in, a student produced a four-row table with inputs A and B and outputs Sum and Carry.
Why it loses marksThat is a half adder. The question specified three inputs, so the table must have 2 cubed = 8 rows and a third input column for the carry in. The four-row table is not a smaller version of the answer, it is the answer to a different question.
The answer that scoresA full adder has inputs A, B and Cin and outputs Sum and Cout, and needs eight rows in binary counting order. Sum = A XOR B XOR Cin, so it is 1 when an odd number of inputs are 1; Cout = A.B + Cin.(A XOR B), so it is 1 when at least two of the three inputs are 1. For example, with A = 1, B = 1, Cin = 1 the outputs are Sum = 1 and Cout = 1, because 1 + 1 + 1 = 11 in binary. The half adder has only A and B and no carry in, which is why it cannot be used beyond the least significant column of a multi-bit addition.
A student wrote · Processors, parallel processing, virtual machines and Boolean algebraA student simplified (A.B)' as A'.B' and used that as the first line of a proof.
Why it loses marksThat is De Morgan's law applied with the sign left unchanged. The NOT of an AND is the OR of the NOTs, so the connector must change from AND to OR as well as each term being inverted. The error is easy to check with a truth table: at A = 1, B = 0, (A.B)' = 1 while A'.B' = 0.
The answer that scores(A.B)' = A' + B', and (A + B)' = A'.B'. The rule is: break the bar, change the sign underneath, and invert each term. Applying it to a longer expression works one bar at a time from the outside in, so (A.B + C)' = (A.B)'.C' = (A' + B').C'. Checking a single row of the truth table, such as A = 1, B = 0, C = 0, confirms it: the left side is (0 + 0)' = 1 and the right side is (0 + 1).1 = 1.
A student wrote · Processors, parallel processing, virtual machines and Boolean algebraIn a Karnaugh map a student ringed three adjacent 1s, ringed two 1s diagonally, and wrote the expression from those groups.
Why it loses marksGroups must contain a power of two number of cells - 1, 2, 4, 8 - and must be rectangles, so three cells and a diagonal pair are not legal groups. A diagonal pair also does not represent a single term, because the two cells differ in two variables, not one.
The answer that scoresOnly blocks of 1, 2, 4, 8 or 16 cells in a rectangle may be grouped, and each block must be as large as possible; blocks may overlap and may wrap round the edges of the map. In a three-variable map, a block of two removes one variable, a block of four removes two, and a block of eight removes all three, leaving a constant. A diagonal pair cannot be grouped, so the 1s it contains must be covered by legal blocks - enlarging a group, overlapping an existing group, or wrapping to the other side of the map - before the expression is written.
A student wrote · Processors, parallel processing, virtual machines and Boolean algebraA student wrote: 'A virtual machine gives the user more memory and a faster processor than the physical computer has.'
Why it loses marksNothing is created. The hypervisor divides the resources that exist, so each VM gets a share of the real processor, memory and disk, and running several VMs on one host means they compete for them. The VM is convenient and isolated, not more powerful.
The answer that scoresA virtual machine is a software implementation of a computer that runs on shared physical hardware under a hypervisor. Its processor time, memory and storage are allocated from the host, so a VM can never exceed the host's real resources and is usually slightly slower than running the same software directly, because some instructions have to be trapped and translated and because it competes with the other guests. What the VM does give is flexibility: several operating systems on one machine, isolation from the host, snapshots and cloning, and machines that can be created, moved or destroyed in minutes - with the trade-off that the host is a single point of failure and that a hypervisor flaw exposes every guest.
A student wrote · Purposes of an operating system and translation softwareA student wrote: 'Virtual memory is extra RAM that the operating system adds when the computer is running slowly, so it makes the computer faster.'
Why it loses marksVirtual memory is not extra RAM and it does not make a machine faster. It is an area of backing store used as an extension of main memory, and every access to a page that is not in memory costs a disk read, which is far slower than a memory access.
The answer that scoresVirtual memory is a memory management technique in which the pages of a process that are not currently needed are held on disk in a page or swap file, while the active pages stay in main memory. A page table maps each virtual page to a frame, and when the processor refers to a page that is not present a page fault occurs: the OS finds a frame, loads the page from disk, updates the page table and restarts the instruction, blocking the process meanwhile. This allows a program larger than physical memory to run and allows more processes to be resident, but it does not add RAM and it slows execution, because a page fault is a disk access. If faults happen constantly the system thrashes.
Revise this topicPurposes of an operating system and translation software
A student wrote · Purposes of an operating system and translation softwareA student wrote: 'Paging and segmentation are the same thing, except that paging is used by the operating system and segmentation is used by the programmer. Both divide memory into blocks of the same size.'
Why it loses marksThe blocks are not the same size: pages are fixed and segments are variable. The consequences follow from that - paging can suffer internal fragmentation but never external, segmentation can suffer external fragmentation and may need compaction, and only segmentation allows protection and sharing of a logical unit.
The answer that scoresPaging divides the address space into fixed-size pages and physical memory into frames of the same size, invisible to the programmer, mapped by a page table from page number to frame number. Because all pages are the same size there is no external fragmentation, though the last page of a program wastes part of its frame. Segmentation divides the program into variable-length segments that match its logical structure, such as code, data and stack, with a segment table holding a base address and a limit for each. Segments are visible to the programmer, can be shared between processes and can be given their own protection, but their variable size leaves gaps in memory, so external fragmentation can occur and compaction may be needed.
Revise this topicPurposes of an operating system and translation software
A student wrote · Purposes of an operating system and translation softwareA student wrote: 'An interpreter is better than a compiler because interpreted programs run faster, since the computer does not have to wait for the whole program to be compiled.'
Why it loses marksThat confuses start-up time with running time. An interpreter avoids the compile step, so the program starts sooner, but it translates every statement every time it runs, so the program itself executes far more slowly than a compiled executable.
The answer that scoresAn interpreter translates and executes the source one statement at a time and produces no translated version, so there is no compile step and the program starts straight away. It also stops at the first error it reaches, pointing at the exact statement, which makes it much easier to debug - the reasons it is used for teaching and development. But translation is repeated on every run, so an interpreted program is slower than a compiled one, and the source code must be present, so it cannot be hidden. A compiler translates the whole program once into object code, producing an executable that runs at machine-code speed without the compiler or source and can be distributed commercially, at the cost of a compile step, a list of errors rather than one, and the need to recompile for a different platform.
Revise this topicPurposes of an operating system and translation software
A student wrote · Purposes of an operating system and translation softwareA student wrote: 'When a process is blocked it goes straight to the running state as soon as the printer finishes, because it is next in line.'
Why it loses marksA blocked process becomes ready, not running. The scheduler chooses which ready process runs next, and another process may be ahead of it. Skipping the ready state breaks the model the examiner is testing.
The answer that scoresA blocked process is waiting for an event outside the processor, such as an I/O operation completing. When the device finishes it raises an interrupt, the kernel's handler notes that the event has occurred, and the process is moved from blocked to ready - it is now able to run but does not have the processor. It runs only when the scheduler selects it from the ready queue and performs a context switch, restoring its program counter and register values from its process control block. So the sequence is blocked -> ready -> running, and the time spent in ready depends on the scheduling routine and on the priorities of the other processes.
Revise this topicPurposes of an operating system and translation software
A student wrote · Purposes of an operating system and translation softwareA student wrote: 'Lexical analysis checks that the program is grammatically correct, and syntax analysis produces the machine code.'
Why it loses marksThe two stages are the wrong way round and the second is simply false. Lexical analysis only groups characters into tokens; grammar is the business of syntax analysis; and machine code comes from code generation.
The answer that scoresLexical analysis reads the source as characters and groups them into tokens - keywords, identifiers, constants and operators - discarding whitespace and comments and building the symbol table. Syntax analysis takes that token stream and checks it against the grammar of the language, expressed in BNF or syntax diagrams, building a parse tree and reporting syntax errors such as a missing bracket. Code generation then converts the parse tree into object code, and optimisation improves that code before it is finally assembled and linked into an executable.
Revise this topicPurposes of an operating system and translation software
A student wrote · Purposes of an operating system and translation softwareA student wrote: 'To evaluate 8 3 - 4 * in RPN, subtract 8 from 3 and then multiply by 4, giving -20.'
Why it loses marksThe operands were taken in the wrong order. In RPN the first value popped from the stack is the right-hand operand, so `8 3 -` means 8 minus 3, not 3 minus 8. Subtraction and division are the operations where this error shows.
The answer that scoresRead the expression left to right, pushing operands and applying operators to the top two stack values. Push 8, push 3; the `-` pops 3 first and 8 second, so the calculation is 8 - 3 = 5, and 5 is pushed. Push 4; the `*` pops 4 and 5 and multiplies them, so the result is 20. Writing the stack after each step makes the order explicit and prevents the error.
Revise this topicPurposes of an operating system and translation software
A student wrote · Encryption, encryption protocols and digital certificatesA student wrote: 'To send a confidential message to a company, encrypt it with the company's private key so that only the company can read it.'
Why it loses marksThe private key is the one thing that must never be given out, so the sender could not have it. If the message really were encrypted with the company's private key, anyone holding the published public key could decrypt it, so the result is the opposite of confidential - and the company would have had to disclose its private key to make it possible.
The answer that scoresThe sender obtains the company's public key, which is published and may be given to anyone, and encrypts the message with it to produce ciphertext. Only the matching private key, which the company keeps secret, can decrypt that ciphertext, so the message is confidential even though the ciphertext crosses a network the sender does not control. This scales to the public because the public key can be published to the whole world without weakening the encryption: it can lock data but cannot unlock it. The weakness is that the sender has no proof the public key really belongs to the company, which is the problem a digital certificate solves.
Revise this topicEncryption, encryption protocols and digital certificates
A student wrote · Encryption, encryption protocols and digital certificatesA student wrote: 'A digital certificate encrypts the data sent to a website, so the connection is secure.'
Why it loses marksA certificate is a signed statement of identity, not a cipher. It contains the subject's name, its public key, the issuer, the validity dates and the CA's signature. It encrypts nothing; the encryption is done by TLS using a session key, and the certificate's role is to make the owner of that public key trustworthy.
The answer that scoresA digital certificate binds a public key to an identity and is signed by a certificate authority that the client already trusts. It contains the subject's name or domain, the subject's public key, the issuer, the validity dates, a serial number and the CA's digital signature. During the TLS handshake the server presents the certificate; the client checks the CA's signature up the chain of trust to a root certificate in its own trust store and checks the domain name matches, so it knows the public key belongs to the real server and not to an impostor. The encryption is a separate step: the client uses that now-trusted public key to send a session key, or agrees one with Diffie-Hellman, and the data is then encrypted symmetrically. The certificate prevents a man-in-the-middle attack; it does not itself encrypt.
Revise this topicEncryption, encryption protocols and digital certificates
A student wrote · Encryption, encryption protocols and digital certificatesA student wrote: 'SSL/TLS encrypts the data on the web server, so if the server is stolen the customer details are still safe.'
Why it loses marksTLS protects data in transit, between the client and the server. Once the data is decrypted at the server it is stored in whatever form the application chooses, and nothing in TLS protects it there. Data at rest needs separate encryption, usually full-disk or database-level.
The answer that scoresSSL/TLS protects a connection between a client and a server: it gives confidentiality by encrypting the data with a symmetric session key, integrity by authenticating each record so alterations are detected, and authentication by the server presenting a digital certificate that the client verifies up the chain of trust. When the data reaches the server it is decrypted so the application can use it, and from then on it is only as safe as the server's own storage controls - access rights, database encryption and backups. TLS also does not protect against a server that is itself malicious or already compromised, and it does not hide the fact that a connection took place. A complete answer to 'how are customer details protected' names both transit encryption and encryption at rest.
Revise this topicEncryption, encryption protocols and digital certificates
A student wrote · Encryption, encryption protocols and digital certificatesA student wrote: 'Asymmetric encryption is more secure than symmetric, so it should be used for all the data in a secure connection.'
Why it loses marksAsymmetric cryptography is not more secure in any absolute sense; 256-bit AES is not weaker than 2 048-bit RSA. Its advantage is solving key distribution. Its disadvantage is that it is hundreds to thousands of times slower, because it performs arithmetic on very large numbers - which makes it unusable for bulk data such as video or a whole web page.
The answer that scoresThe two types are used together, each for what it does best. Asymmetric cryptography solves the key distribution problem: the server publishes a public key inside its certificate, and the client uses it to send a randomly generated session key, or agrees one using Diffie-Hellman, without any shared secret existing beforehand. Symmetric cryptography then encrypts the actual data with that session key, using AES, because it is fast enough for bulk traffic. The asymmetric operation happens once per connection and the symmetric cipher handles everything else, so the connection has the security of the first and the speed of the second. Ephemeral session keys also give forward secrecy, because a new key is generated for each connection and discarded afterwards.
Revise this topicEncryption, encryption protocols and digital certificates
A student wrote · Encryption, encryption protocols and digital certificatesA student wrote: 'Quantum cryptography uses a quantum computer to break existing encryption, and its main drawback is that quantum computers are expensive.'
Why it loses marksThat describes the threat that motivates quantum cryptography, not the technique. Quantum cryptography - specifically quantum key distribution - uses quantum states to distribute a key, and its main drawbacks are practical: specialised hardware, limited range because photons cannot be amplified, and low key rates.
The answer that scoresQuantum key distribution distributes a symmetric key by encoding each bit in the polarisation or phase of a single photon. An eavesdropper cannot copy an unknown quantum state and cannot measure it without disturbing it, so interception introduces errors that the two parties detect when they compare a sample of the key over a public channel; if the error rate is too high the key is discarded and the process restarts. Its benefits are that security rests on physics rather than on computational difficulty, so it is not threatened by a future quantum computer, and that eavesdropping is detected rather than hidden. Its drawbacks are that it needs specialised and expensive single-photon hardware, that range is limited because photons are lost in fibre and cannot be amplified, that key rates are low, that it is point-to-point, and that it still requires an authenticated classical channel - so it does not remove the need for certificates.
Revise this topicEncryption, encryption protocols and digital certificates
A student wrote · Artificial intelligenceA student wrote: 'A* always finds the shortest path because it uses a heuristic to guide the search towards the goal.'
Why it loses marksA heuristic only guarantees a shortest path if it never overestimates the remaining cost. A heuristic that overestimates makes some nodes look more expensive than they are, so A* can settle on a route that is not the cheapest, and a badly chosen one can send the search off in the wrong direction altogether.
The answer that scoresA expands the node with the lowest f = g + h, where g is the cost of the best route found so far and h is the estimated cost from that node to the goal. It returns a shortest path only if the heuristic is admissible, meaning h never overestimates the true remaining cost, because then the estimate can delay a node but can never make a cheap route look more expensive than it is. Straight-line distance is admissible for road travel, since no road is shorter than the straight line between its ends, and with such a heuristic A is both complete and optimal. With an inadmissible heuristic A* may still return a route quickly, but the route may not be the cheapest, so the guarantee is lost.
Revise this topicArtificial intelligence
A student wrote · Artificial intelligenceA student wrote: 'Dijkstra's algorithm works on any weighted graph, including one with negative weights, as long as the graph is not too large.'
Why it loses marksThe size of the graph has nothing to do with it. Dijkstra finalises a node as soon as it has the smallest tentative distance, on the assumption that no route discovered later can be cheaper. A negative edge can make a later route cheaper, so a node can be finalised at the wrong distance and the error spreads to everything reached through it.
The answer that scoresDijkstra's algorithm is only valid when every edge weight is zero or positive. The reason is the finalising step: when the node with the smallest tentative distance is selected, the algorithm assumes that every other route to that node must pass through a node that is already further away and then add a weight, and with non-negative weights that can never produce a smaller total. A negative weight breaks that assumption, because a route that looks longer can become shorter when the negative edge is used, so a finalised distance may later turn out to be too large. Algorithms that can handle negative weights are different ones, and Dijkstra's algorithm cannot cope with a negative cycle at all.
Revise this topicArtificial intelligence
A student wrote · Artificial intelligenceA student wrote: 'In unsupervised learning the computer is given the correct answers so that it can check whether it is right, and in supervised learning the computer works everything out for itself.'
Why it loses marksThe two definitions have been swapped. Supervised means the training data is labelled with the correct answers and the system learns from them; unsupervised means there are no labels and the system looks for structure such as clusters in the data.
The answer that scoresSupervised learning uses labelled training data: each example is supplied with the correct output, the model learns the mapping from input to output, and its performance can be measured by comparing its predictions with the labels. It covers classification, where the output is a category such as spam or not spam, and regression, where the output is a number such as a price. Unsupervised learning uses unlabelled data: the model is given the inputs only and looks for structure in them, typically by clustering similar records together or finding items that occur together. There is no correct answer to compare against, so the result has to be interpreted by a person, but no expensive labelling is needed.
Revise this topicArtificial intelligence
A student wrote · Artificial intelligenceA student wrote: 'Back propagation is how the neural network produces its output, by passing the data back through the layers to the input.'
Why it loses marksThat describes a backward pass, but producing the output is a forward pass from the input layer to the output layer. Back propagation happens during training, uses the error, and changes the weights; it does not produce the network's prediction.
The answer that scoresA trained network produces its output by a forward pass: the data enters at the input layer, each unit multiplies its inputs by the weights on its connections, adds a bias and applies an activation function, and the result passes forward layer by layer until the output layer gives the prediction. Back propagation happens during training. After the forward pass, the output is compared with the known correct output to give an error; that error is then propagated backwards through the layers, using the derivatives of the activation functions, to work out how much each weight contributed to it. Each weight is adjusted slightly in the direction that reduces the error, by an amount set by the learning rate, and the whole process is repeated for many examples over many epochs.
Revise this topicArtificial intelligence
A student wrote · Artificial intelligenceA student wrote: 'Deep learning is a completely different approach from machine learning, and it is used when you have a very large data set.'
Why it loses marksDeep learning is a subset of machine learning, not an alternative to it. It is defined by the use of an artificial neural network with many hidden layers, and although it does need large data sets, having a large data set is not what makes a system deep learning.
The answer that scoresMachine learning is the broad approach in which a model is learned from data instead of rules being written by hand, and it includes many methods, of which regression, decision trees and neural networks are examples. Deep learning is machine learning carried out with an artificial neural network that has many hidden layers. The depth is what matters: the layers learn a hierarchy of features, from simple edges or sounds in the early layers to whole shapes or words in the later ones, so the network can work from raw data without a person deciding which features to measure. Deep learning usually does need large labelled data sets and substantial computing power, which is why it became practical only once both were widely available, but the defining feature is the many-layered network.
Revise this topicArtificial intelligence
A student wrote · Artificial intelligenceA student wrote: 'Regression is used to sort data into categories, so a regression model could decide whether an email is spam or not spam.'
Why it loses marksRegression predicts a continuous numeric value; sorting items into categories is classification. The confusion usually comes from logistic regression, which has regression in its name but outputs a probability that is then used for classification.
The answer that scoresRegression is a supervised learning method whose output is a number on a continuous scale: a price, a temperature, a demand, a lifespan. Linear regression fits a straight line y = mx + c to the training data, choosing the gradient and intercept by least squares so that the total squared distance between the data points and the line is as small as possible; multiple regression extends this to several inputs, with one coefficient each. Classification is the other supervised task, and its output is a category, such as spam or not spam, so a spam filter is a classifier rather than a regression model. Logistic regression is the exception that explains the confusion: it produces a probability between 0 and 1, which is then turned into a class by a threshold, so despite its name it is used for classification.
Revise this topicArtificial intelligence
A student wrote · Advanced algorithms and recursionA student wrote: 'A binary search can be used on any list of data, because even if the list is not sorted it will still find the item if it is there.'
Why it loses marksA binary search decides which half to throw away by comparing the middle item with the search value. If the data is not sorted, that comparison says nothing about where the value can be, so the half being discarded may well contain it. The search then reports that the item is not in the list while it is sitting in the discarded half, so the algorithm is not slow, it is incorrect.
The answer that scoresA binary search requires the data to be sorted into the order used by the comparisons, because it discards half of the remaining items at every comparison on the assumption that everything before the middle is smaller and everything after it is larger. It also requires the middle item to be reachable directly, which is true of an array but not of a linked list that must be walked from one end, and the items must be comparable. When those conditions hold, a search of 1 000 000 items takes at most 20 comparisons; when they do not, the only safe option is a linear search, or sorting the data first, which costs far more than the search saves on a single pass.
Revise this topicAdvanced algorithms and recursion
A student wrote · Advanced algorithms and recursionA student wrote: 'A bubble sort always makes n - 1 passes, so its best case is O(n^2) and it is always slower than an insertion sort.'
Why it loses marksWith a swap flag the bubble sort stops after the first pass that makes no swaps, so an already sorted array costs one pass of n - 1 comparisons, which is O(n), not O(n^2). Both sorts are O(n^2) in the worst case, and which is faster in practice depends on the initial order of the data and on the number of items, so neither is always faster.
The answer that scoresA bubble sort without a swap flag always makes n - 1 passes and is O(n^2) whatever the data, which is one reason the flag is added. With the flag the sort ends as soon as a pass makes no swaps, so sorted data costs one pass of n - 1 comparisons, O(n), and data in reverse order still costs about n(n - 1)/2 comparisons and swaps, O(n^2). An insertion sort is also O(n) on sorted data and O(n^2) in reverse order, but it moves each item only as far as it needs to go, so on data that is nearly in order it does much less work than a bubble sort, which moves an item only one place per pass. On small arrays with a small constant cost per comparison, an insertion sort is usually the faster of the two, but the honest answer is that it depends on the initial order and on n.
Revise this topicAdvanced algorithms and recursion
A student wrote · Advanced algorithms and recursionA student wrote: 'To delete an item from a queue you remove the item at the rear, and to delete an item from a stack you remove the item at the bottom.'
Why it loses marksThis reverses both definitions. A queue is first in, first out, so items are removed from the front, which is the end they have been waiting at longest; a stack is last in, first out, so items are removed from the top, which is the end they were most recently added to. The error is not just a definition slip - it produces algorithms that remove the wrong item, and it usually comes with a missing underflow check as well.
The answer that scoresA queue is a first in, first out structure: enqueue adds an item at the rear and dequeue removes and returns the item at the front, moving the Front pointer on one place (with MOD in a circular queue). A stack is a last in, first out structure: push adds an item at the top and pop removes and returns the item at the top, decrementing the Top pointer. Both operations begin with a check: dequeue and pop must test for an empty structure and report underflow, and enqueue and push must test for a full one and report overflow.
Revise this topicAdvanced algorithms and recursion
A student wrote · Advanced algorithms and recursionA student wrote: 'My recursive function keeps calling itself until it finds the answer, so it does not need a base case.'
Why it loses marksWithout a base case there is nothing to stop the calls, every call adds another stack frame, and the program ends in a stack overflow instead of producing an answer. A base case is one of the two essential features of recursion, and a routine whose argument does not move towards the base case behaves in exactly the same way.
The answer that scoresEvery recursive routine needs a base case - a condition that returns a result without making another call - and a general case that calls the routine with an argument that has moved closer to that base case. For example, Factorial(N) returns 1 when N = 1, and otherwise returns N * Factorial(N - 1), so the argument falls by one at every call until the base case is reached. Each call is given a stack frame holding its parameter and return address, and the frames are popped as the returns unwind back up to the original call; with no base case the frames are never popped and the stack is exhausted.
Revise this topicAdvanced algorithms and recursion
A student wrote · Advanced algorithms and recursionA student wrote: 'An algorithm that is O(n) is always faster than an algorithm that is O(n^2), whatever the data.'
Why it loses marksBig O describes how the work grows as n grows and deliberately ignores constants and lower-order terms. For small values of n an O(n^2) algorithm with a small constant can finish before an O(n) algorithm with a large one, so Big O guarantees the ordering only as n becomes large. It also says nothing about a particular implementation, compiler or machine.
The answer that scoresBig O specifies the growth of the time taken or the memory used as the number of data items n increases, with constants and lower-order terms dropped. An O(n) algorithm's work grows in step with n, while an O(n^2) algorithm's work grows with the square of n, so as n becomes large the O(n) algorithm wins clearly - a linear search of 1 000 000 items may need 1 000 000 comparisons where a binary search needs about 20. For a small n, however, the constant cost of each step matters more than the growth: a bubble sort on twenty items can be quicker than a more elaborate algorithm with a large constant per item, which is why general-purpose libraries switch to a simple sort for small sections.
Revise this topicAdvanced algorithms and recursion
A student wrote · Programming paradigms, file processing and exception handlingA student wrote: 'A programming paradigm is a type of programming language, so Java is an object-oriented paradigm and Python is an imperative paradigm.'
Why it loses marksThis confuses a style of programming with a language. A paradigm is a way of approaching and structuring a solution, and most modern languages support several of them, so the same language can be used in more than one paradigm.
The answer that scoresA programming paradigm is a style or approach to writing programs, defined by the features a language provides and by the way the problem is broken down. Low-level, imperative (procedural), object-oriented and declarative programming are the four in this syllabus. A language is not a paradigm: Python can be written as a procedural program or as an object-oriented one, and Java can be written in a largely procedural style even though it is designed for objects. Low-level, imperative and object-oriented programming are all imperative, because the programmer writes the steps; declarative programming is not, because the programmer writes facts and rules and the system decides the order.
Revise this topicProgramming paradigms, file processing and exception handling
A student wrote · Programming paradigms, file processing and exception handlingA student wrote: 'Immediate addressing means the operand is the address of the data, so LDM #25 loads the contents of memory location 25 into the accumulator.'
Why it loses marksThe two modes have been swapped. Immediate addressing puts the value itself in the operand, which is what the # signals; loading the contents of an address is direct addressing. The answer also ignores the #, which exists precisely to mark the operand as a value.
The answer that scoresImmediate addressing puts the value itself in the operand, so LDM #25 places the number 25 in the accumulator and no memory access is needed to fetch it; the value is fixed when the program is written. Direct addressing puts the address of the value in the operand, so LDD 25 would load the contents of memory location 25. Indirect addressing puts the address of an address in the operand, so LDI 25 would look in location 25, find an address stored there and load the contents of that second address. Indexed addressing adds the index register to the operand address, and relative addressing treats the operand as a displacement from the current instruction.
Revise this topicProgramming paradigms, file processing and exception handling
A student wrote · Programming paradigms, file processing and exception handlingA student wrote: 'A sequential file is a file that has to be read in order, and a serial file is one that has been sorted into order by its key field.'
Why it loses marksThe two definitions have been swapped. It is the sequential file that is ordered by a key field; a serial file is in the order the records happened to be added, with no key order at all. Both are read sequentially, which is why the definitions are easy to mix up.
The answer that scoresA serial file holds records in the order they were written and has no ordering by any key, so it is read from the beginning when every record is being processed; a log of transactions or a backup is serial. A sequential file holds records in order of a key field such as an account number, is read in that order, and is updated in a batch by merging the master file with a transaction file to produce a new master file. A random file holds fixed-length records at positions that can be calculated from the key, so SEEK moves the pointer straight to a record and it can be read or replaced without reading the records before it, which is what makes it suitable for looking up and updating one record at a time.
Revise this topicProgramming paradigms, file processing and exception handling
A student wrote · Programming paradigms, file processing and exception handlingA student wrote: 'Exception handling means checking that the data the user enters is valid, so every input statement should be put inside a TRY block.'
Why it loses marksThis confuses exception handling with validation. Validation tests input that is predictably capable of being wrong, using IF statements, and it belongs in the logic of the program. Exception handling deals with run-time errors that the program cannot rule out in advance, and catching everything hides genuine bugs instead of fixing them.
The answer that scoresValidation checks input against the rules of the problem - a mark between 0 and 100, an age that is a positive whole number - and it is written with IF statements as part of the normal logic. Exception handling deals with an error or unexpected event raised while the program runs, such as a file that does not exist, a value that cannot be converted to a number, or a division by zero. It is appropriate where the failure is outside the program's control, and the TRY block should contain only the operations that can fail, with the EXCEPT block doing something useful: reporting the problem, using a default, asking for another file name or closing files cleanly.
Revise this topicProgramming paradigms, file processing and exception handling
A student wrote · Programming paradigms, file processing and exception handlingA student wrote: 'Inheritance means that one class contains another class as an attribute, so a Car inherits an Engine.'
Why it loses marksThat is containment, also called aggregation, which models a has-a relationship. Inheritance models an is-a relationship, in which a subclass takes on the attributes and methods of a superclass and can add to or override them. The relationship named and the relationship described do not match.
The answer that scoresInheritance is an is-a relationship: a SavingsAccount is a BankAccount, so the subclass inherits the attributes and methods of the superclass, adds an interest rate, and overrides CalculateInterest with its own version. Containment or aggregation is a has-a relationship: a Car has an Engine, so the Engine is an attribute of the Car and the Car's methods call the Engine's methods. A Car cannot inherit from an Engine, because a car is not an engine; inheriting there would give the Car the Engine's attributes directly and break as soon as the Engine class changed.
Revise this topicProgramming paradigms, file processing and exception handling