Question 1 — Data Representation (6 marks)
1 (a) [1 mark]
State the difference between a tebibyte and a terabyte.
The prefixes differ in their base. A terabyte (TB) is a decimal unit: 1 TB = 1012 bytes = 1 000 000 000 000 bytes (powers of 10). A tebibyte (TiB) is a binary unit: 1 TiB = 240 bytes = 1 099 511 627 776 bytes (powers of 2).
In other words, one tebibyte is 1024 gibibytes, whereas one terabyte is 1000 gigabytes.
- One tebibyte = 1024 gibibytes; one terabyte = 1000 gigabytes (or equivalent statement about binary vs decimal bases). [1]
1 (b) [1 mark]
Convert the signed denary value −100 into an 8-bit two's complement binary integer.
Step 1: Convert +100 to 8-bit binary: 100 = 64 + 32 + 4 = 0110 0100.
Step 2: Invert all bits (one's complement): 0110 0100 → 1001 1011.
Step 3: Add 1 to the result: 1001 1011 + 1 = 1001 1100.
Answer: 1001 1100
Verification: −128 + 28 = −128 + 16 + 8 + 4 = −128 + 28 = −100. ✓
- 1001 1100 [1]
1 (c) [2 marks]
Convert the denary number 251 into hexadecimal. Show your working.
Method 1 — repeated division by 16:
251 ÷ 16 = 15 remainder 11 → F remainder B
15 ÷ 16 = 0 remainder 15 → F
Reading remainders bottom to top: FB
Method 2 — via binary: 251 = 11111011₂ → split into nibbles: 1111 = F, 1011 = B → FB
Answer: FB
- Working shown (e.g. division by 16, or binary conversion). [1]
- Answer: FB [1]
1 (d) [1 mark]
Add the following unsigned binary integers:
01010000 + 00111110
Perform column-by-column binary addition:
01010000 + 00111110 ----------
Right to left: 0+0=0; 0+1=1; 0+1=1; 0+1=1; 1+1=10 (write 0 carry 1); 0+1+1=10 (write 0 carry 1); 1+0+1=10 (write 0 carry 1); 0+0+1=1.
Answer: 1000 1110
- 1000 1110 [1]
Question 2 — Computer Hardware (17 marks)
2 (a)(i) [5 marks]
Complete the description of computer memory (fill-in blanks about RAM, ROM, SRAM, DRAM).
RAM and ROM are both examples of primary memory.
One item stored in RAM: currently running software / data / part of the OS. (RAM is volatile and holds items the CPU is actively using.)
One item stored in ROM: start-up/boot-up instructions (BIOS/firmware). (ROM is non-volatile and permanently stores the bootstrap program.)
SRAM uses transistors arranged as flip-flops (latches). Each bit is held by a set of transistors forming a bistable circuit — no refresh needed, very fast.
DRAM uses transistors and capacitors. Each bit is a charge on a capacitor. Capacitors leak, so DRAM must be constantly refreshed — slower and denser than SRAM.
- Primary memory. [1]
- Currently running software / data / OS. [1]
- Start-up / boot-up instructions / BIOS. [1]
- Flip-flops / latches. [1]
- Capacitors. [1]
2 (a)(ii) [3 marks]
Explain the difference between PROM, EPROM, and EEPROM.
PROM (Programmable ROM) can be programmed exactly once by blowing fuses. Once set, its contents cannot be changed.
EPROM (Erasable Programmable ROM) can be erased and reprogrammed multiple times, but it must be physically removed from the circuit to be erased by exposure to ultraviolet (UV) light. The entire chip must be erased before rewriting.
EEPROM (Electrically Erasable Programmable ROM) can also be reprogrammed multiple times, but it is erased using an electrical voltage, meaning it can be erased and rewritten while still in the device (in situ). Unlike EPROM, individual bytes can be erased selectively rather than the entire chip at once. EEPROM is the basis of flash storage.
- PROM can be set once; EPROM and EEPROM can be overwritten multiple times. [1]
- EPROM must be removed from device to erase (UV light); EEPROM can be erased in situ. [1]
- EPROM uses UV light; EEPROM uses electrical voltage / EEPROM is flash storage; EPROM must be entirely erased while EEPROM does not. [1]
2 (b) [5 marks]
Describe the principal operations of a magnetic hard disk.
A magnetic hard disk stores data using magnetic patterns on rotating platters. Here is how it works:
Structure: The disk contains one or more circular platters (disks) coated with a ferromagnetic material (ferrous oxide) that can be magnetised. The platters are mounted on a central spindle inside a sealed aluminium enclosure to keep out dust.
Rotation: The spindle motor spins the platters at high speed (typically 5,400–15,000 rpm). This brings any part of the disk surface under the read/write heads quickly.
Read/Write heads: Each surface of each platter has a read/write head mounted on an arm that floats just above the surface. Electronic circuits (the actuator) move the arm to position the head over the required track.
Organisation: Each platter surface is divided into concentric circular tracks, and each track is divided into sectors. The basic unit of storage is a block (one track segment in one sector).
Writing: Varying the current through the head coil produces a varying magnetic field that magnetises domains on the disk surface in different orientations, encoding binary data.
Reading: As the disk rotates, variations in the magnetic field on the surface induce a varying current in the read head coil, which is decoded back to binary data.
- Has one or more platters / disks. [1]
- Platters are coated with ferromagnetic material / can be magnetised. [1]
- Platters mounted on a spindle and spin at high speed. [1]
- Read/write heads on arms positioned just above surface; arms move to position heads over required track. [1]
- Surface divided into tracks and sectors; writing varies current in head; reading detects magnetic variations inducing current. [1 for any one further valid point]
2 (c)(i) [4 marks]
Complete the table: write one set of values (Input 1 and Input 2) for each gate that gives output 1.
Recall the truth tables:
AND gate: Output = 1 only when ALL inputs are 1. So Input 1 = 1, Input 2 = 1.
NAND gate: Output = 1 when NOT all inputs are 1. Any input combination except (1,1) works. E.g. Input 1 = 0, Input 2 = 0 (or 0,1 or 1,0).
XOR gate: Output = 1 when inputs are different. So Input 1 = 0, Input 2 = 1 (or 1,0).
NOR gate: Output = 1 only when ALL inputs are 0. So Input 1 = 0, Input 2 = 0.
| Gate | Input 1 | Input 2 | Output |
|---|---|---|---|
| AND | 1 | 1 | 1 |
| NAND | 0 | 0 | 1 |
| XOR | 0 | 1 | 1 |
| NOR | 0 | 0 | 1 |
- AND: (1,1). [1]
- NAND: any pair except (1,1), e.g. (0,0) or (0,1) or (1,0). [1]
- XOR: (0,1) or (1,0). [1]
- NOR: (0,0). [1]
2 (c)(ii) [3 marks]
Write the logic expression for the given logic circuit:

Trace the circuit from inputs to output:
Gate 1 (top left — NAND): Inputs are A and B. Output = A NAND B.
Gate 2 (bottom left — XOR): Inputs are B and C. Output = B XOR C.
Gate 3 (right — OR): Inputs are the outputs of Gate 1 and Gate 2. Output = (A NAND B) OR (B XOR C).
Full expression: X = (A NAND B) OR (B XOR C)
- A NAND B [1]
- B XOR C [1]
- (A NAND B) OR (B XOR C) [1]
Question 3 — Security and Privacy (7 marks)
3 (a) [1 mark]
State the difference between the security of data and the privacy of data.
Security of data refers to protecting data from being lost, damaged, or accessed without authorisation — i.e., preventing unauthorised access or accidental loss.
Privacy of data refers to ensuring that personal data is only accessible to those who are authorised to see it — it is about controlling who can view the data.
In short: security prevents against loss/damage, while privacy prevents against unauthorised viewing/disclosure.
- Security prevents loss/damage; privacy prevents unauthorised access. [1]
3 (b) [6 marks]
Identify and describe two threats to examination paper data on a laptop connected to the internet. Identify one different security measure for each threat.
Threat 1: Malware (e.g. a virus or ransomware)
Description: Malicious software that installs itself (often via email attachments or downloads) and may replicate, delete, corrupt, or encrypt the examination papers, making them inaccessible or stolen.
Security measure: Install and regularly update anti-malware / anti-virus software, which scans for and removes malicious programs.
Threat 2: Hacking / Unauthorised access
Description: A hacker gains illegal access to the teacher's computer (e.g. by exploiting a vulnerability or cracking a weak password) with the intent to steal, alter, or leak the examination papers.
Security measure: Use a firewall to monitor and filter incoming/outgoing network traffic, blocking suspicious connections; also use strong/complex passwords or multi-factor authentication.
- Threat 1 identified (e.g. malware / virus / spyware). [1]
- Description of Threat 1 (e.g. replicates and can delete/damage papers). [1]
- Security measure for Threat 1 (e.g. anti-malware / anti-virus software). [1]
- Threat 2 identified (e.g. hacker / unauthorised access). [1]
- Description of Threat 2 (e.g. illegal access to delete/damage papers). [1]
- Security measure for Threat 2 (e.g. firewall / strong passwords). [1]
Question 4 — Relational Database MARKS (16 marks)
Tables: STUDENT(StudentID, FirstName, LastName) · TEST(TestID, Description, TotalMarks) · STUDENT_TEST(StudentID, TestID, Mark)
4 (a) [4 marks]
Describe the advantages of using a relational database compared to a file-based approach.
1. Reduced data redundancy: In a relational database each piece of data is stored in one place (e.g. a student's name appears once in STUDENT, not repeated in every test record). In a file-based system, the same data might be duplicated across multiple files.
2. Data consistency / integrity: Because data is stored once, any update automatically applies everywhere it is referenced through foreign keys. File-based systems risk inconsistencies when the same fact is stored in multiple files.
3. Program–data independence: The database structure (schema) is separate from the programs that use it. Changing the structure does not require rewriting every application program, unlike flat-file systems where data format is embedded in the code.
4. Complex queries are easier to run: SQL lets users join multiple tables and filter data with a single statement. In a file-based approach, programmers must write custom code to cross-reference files.
5. Controlled access / multiple views: A DBMS can provide different views of the data to different users, so each user sees only what they need.
- Reduced data redundancy / less repeated data — each item stored once. [1]
- Data consistency / integrity maintained — changes in one table auto-update linked data. [1]
- Program–data independence — structure changes don't require rewriting programs. [1]
- Complex queries easier to run / can provide different views to different users. [1]
4 (b) [3 marks]
Give the highest level of Normal Form (NF) the database MARKS is in and justify your choice.
Answer: Third Normal Form (3NF)
Justification:
1NF: All attributes are atomic (single values), and there are no repeating groups. ✓
2NF: STUDENT_TEST has a composite primary key (StudentID, TestID). The attribute Mark depends on both StudentID and TestID together (it's the mark for a specific student on a specific test) — no partial dependencies exist. The other tables have simple primary keys. ✓
3NF: There are no transitive dependencies. In STUDENT, FirstName and LastName depend only on StudentID (no non-key attribute depends on another non-key attribute). Likewise in TEST and STUDENT_TEST. ✓
Because it satisfies all three levels without repeating attributes, no partial dependencies, and no transitive dependencies, the database is in 3NF.
- 3NF [1]
- No repeating attributes / already in 2NF / fully dependent on corresponding primary key. [1]
- No transitive dependencies / no non-key dependencies. [1]
4 (c)(i) [5 marks]
Write an SQL script to create the table STUDENT_TEST. Sample data:
| StudentID | TestID | Mark |
|---|---|---|
| 12 | A1 | 50 |
| 12 | P10 | 100 |
| 13 | A1 | 75 |
| 14 | P10 | 60 |
Looking at the data: StudentID is a whole number (INTEGER), TestID is a text code (VARCHAR), Mark is a whole number (INTEGER). The primary key is the combination (StudentID, TestID) — a composite key. StudentID is a foreign key referencing STUDENT, and TestID is a foreign key referencing TEST.
CREATE TABLE STUDENT_TEST (
StudentID INTEGER,
TestID VARCHAR(10),
Mark INTEGER,
PRIMARY KEY (StudentID, TestID),
FOREIGN KEY (StudentID) REFERENCES STUDENT(StudentID),
FOREIGN KEY (TestID) REFERENCES TEST(TestID)
);
- CREATE TABLE with table name and brackets. [1]
- StudentID and Mark declared as INTEGER. [1]
- TestID declared as VARCHAR / text type. [1]
- PRIMARY KEY (StudentID, TestID) correctly set up. [1]
- Both FOREIGN KEY references correctly set up. [1]
4 (c)(ii) [3 marks]
Write an SQL script to find the average mark of students in test A7.
We need to compute an average, which uses the AVG() aggregate function. We query the STUDENT_TEST table and filter rows where TestID equals 'A7'.
SELECT AVG(Mark) FROM STUDENT_TEST WHERE TestID = 'A7';
- AVG(Mark) [1]
- SELECT ... FROM STUDENT_TEST [1]
- WHERE TestID = 'A7' [1]
4 (d) [4 marks]
Explain how data validation and data verification can be used when entering a mark (a whole number between 0 and the test's maximum mark, inclusive).
Data validation is automatic checking by the computer that data is reasonable and within expected bounds:
• Range check: The system checks that the entered mark is between 0 and TotalMarks (from the TEST table) inclusive. Any value outside this range is rejected.
• Type check: The system verifies that the entered value is an integer (whole number), not a decimal or text.
• Presence check: The system ensures a mark has actually been entered before saving the record.
Data verification checks that data has been entered accurately (matches the source):
• Double entry: The user enters the mark twice; the system compares both entries and only accepts them if they match.
• Visual (proof-read) check: The person entering the mark manually compares what is shown on screen with the mark on the original paper/document before submitting.
- Range check — ensures mark is between 0 and maximum. [1]
- Type check — ensures an integer is entered. [1] (or presence check)
- Double entry verification — enter mark twice; system compares. [1]
- Visual check — manually compare entered mark with source document. [1]
Question 5 — IDE, Licences, Libraries (9 marks)
5 (a) [4 marks]
Draw one line from each IDE feature to its correct description.
| IDE Feature | Description |
|---|---|
| Context-sensitive prompt | Executes one line of the program and then stops |
| Dynamic syntax check | Underlines or highlights statements that do not meet the rules of the language |
| Breakpoint | Outputs the contents of variables and data structures |
| Single stepping | Stops the code executing at a set line |
| Report window | Displays predictions of the code being entered |
The correct matching is:
• Context-sensitive prompt → Displays predictions of the code being entered. (It suggests completions as you type, like autocomplete.)
• Dynamic syntax check → Underlines or highlights statements that do not meet the rules of the language. (Real-time syntax highlighting shows errors while coding.)
• Breakpoint → Stops the code executing at a set line. (You mark a line; execution pauses there.)
• Single stepping → Executes one line of the program and then stops. (Allows line-by-line trace-through.)
• Report window → Outputs the contents of variables and data structures. (Shows variable values during debugging.)
- Context-sensitive prompt ↔ Displays predictions of the code being entered. [1]
- Dynamic syntax check ↔ Underlines/highlights statements not meeting language rules. [1]
- Breakpoint ↔ Stops code at a set line. [1]
- Single stepping ↔ Executes one line then stops. [1]
- (All 5 correct = 4 marks; scoring 1,2,3,4 for 1,2,3–4,5 correct lines respectively)
5 (b) [2 marks]
The programmer wants to allow users to edit, improve and redistribute the program. Identify two different types of software licence that could be used.
For software that users can edit, improve, and redistribute, the programmer should use an open-source licence. Two recognised bodies that certify such licences are:
1. Open Source Initiative (OSI) — certifies licences such as the MIT, Apache, and GPL licences that allow use, modification, and redistribution of source code.
2. Free Software Foundation (FSF) — certifies licences such as the GNU GPL and GNU LGPL that guarantee the freedoms to run, study, share, and modify software.
- Open Source Initiative [1]
- Free Software Foundation [1]
5 (c) [3 marks]
Explain the benefits to the programmer of using program libraries.
1. Saves time: Library routines have already been written and do not need to be coded from scratch. The programmer can simply call the routine rather than re-implementing complex functionality (e.g. a sorting algorithm, a mathematical function, or a GUI component).
2. Reliability — code is already tested: Library routines have been extensively tested by their developers. Using them reduces the risk of bugs compared to writing the same code fresh, making the final program more robust.
3. Automatic updates: If the library is improved or a bug is fixed, the program benefits automatically when the updated library is linked, without the programmer needing to change or recompile the main program.
- Saves programming/testing time — no need to write/re-write code from scratch. [1]
- Code already tested, so more reliable / robust / less likely to have bugs. [1]
- Improvements to the library automatically update the program. [1]
Question 6 — Von Neumann Architecture & Instruction Set (18 marks)
6 (a)(i) [5 marks]
Describe the role of the registers in the Fetch-Execute (F-E) cycle.
The Fetch-Execute cycle uses four key registers:
Program Counter (PC): Holds the memory address of the next instruction to be fetched. At the start of each cycle, its value is copied to the MAR, and then the PC is incremented to point to the following instruction.
Memory Address Register (MAR): Holds the address in memory from which the CPU wishes to read (or write). During fetch, MAR receives the address from the PC so the memory can be accessed at that location.
Memory Data Register (MDR): Holds the data that has just been fetched from the address in the MAR. After a memory read, the instruction word arrives in the MDR.
Current Instruction Register (CIR): Receives the instruction from the MDR. The control unit decodes the instruction held in the CIR and directs the appropriate execution actions.
- PC holds address of next instruction; its contents are incremented each cycle. [1]
- MAR holds the address to fetch data from (receives value from PC). [1]
- MDR holds the data at the address in MAR. [1]
- Instruction transferred to CIR for decoding and execution. [1]
- Any additional correct detail (e.g. PC copied to MAR as first step). [1]
6 (a)(ii) [5 marks]
Describe when interrupts are detected in the F-E cycle and how they are handled.
Detection: Interrupts are checked for at the end of each F-E cycle (after the execute stage, before starting the next fetch). The processor checks a flag in the status register or an interrupt line.
Handling:
1. The processor checks the priority of the pending interrupt against the current process priority.
2. If the interrupt is of lower priority than the current process, it is ignored and the next F-E cycle begins normally.
3. If the interrupt is of higher priority, the CPU saves the current state (contents of all registers, including PC) onto the stack so the process can be resumed later.
4. The processor identifies the type/location of the interrupt and looks up the corresponding Interrupt Service Routine (ISR) address.
5. The ISR is executed to handle the interrupt.
6. When the ISR finishes, the processor checks for further high-priority interrupts; if none, it pops the saved state from the stack and resumes the interrupted process.
- Detected at end/start of F-E cycle. [1]
- Priority of interrupt checked. [1]
- If lower priority — continue with F-E cycle. [1]
- If higher priority — state of current process / registers saved on stack. [1]
- Appropriate ISR called; when finished, load data from stack and continue. [1]
6 (b) [2 marks]
Identify one factor that can affect the performance of the computer system and state how it impacts performance.
Factor: Clock speed
Impact: A higher clock speed means more F-E cycles can be completed per second, so more instructions are executed per second, increasing overall performance.
(Alternative valid answers: Number of cores — more cores allow more instructions to be executed simultaneously in parallel; Bus width — a wider bus allows more data to be transferred in each operation; Cache size — a larger cache allows more frequently used data/instructions to be stored for fast access, reducing time the CPU spends waiting for RAM.)
- Factor identified (e.g. clock speed / number of cores / bus width / cache). [1]
- Correct corresponding impact stated. [1]
6 (c)(i) [1 mark]

Complete the register to show the result after AND #2 is executed.
#2 in binary is 0000 0010. The AND operation is applied bit by bit:
ACC: 0 1 1 0 1 1 0 1
AND #2: 0 0 0 0 0 0 1 0
---------------
Result: 0 0 0 0 0 0 0 0
Only bit 1 (value 2) can survive an AND, and in the ACC, bit 1 is 0, so the result is all zeros.
Register after: 0000 0000
- 0000 0000 [1]
6 (c)(ii) [1 mark]

Complete the register to show the result after OR #8 is executed.
#8 in binary is 0000 1000. The OR operation sets a bit to 1 if either input is 1:
ACC: 0 1 1 0 1 1 0 1
OR #8: 0 0 0 0 1 0 0 0
---------------
Result: 0 1 1 0 1 1 0 1
Bit 3 (value 8) is already 1 in ACC, so OR #8 does not change anything. All other bits retain their ACC values.
Register after: 0110 1101
- 0110 1101 [1]
6 (c)(iii) [1 mark]

Complete the register to show the result after LSL #4 is executed.
LSL (Logical Shift Left) by 4 places shifts all bits four positions to the left. Zeros are introduced on the right end; bits shifted off the left end are discarded.
Before: 0 1 1 0 1 1 0 1 LSL #4: shift left by 4 After: 1 1 0 1 0 0 0 0
The left four bits (0110) are lost; the right four bits (1101) become bits 7–4; zeros fill bits 3–0.
Register after: 1101 0000
- 1101 0000 [1]