IB DP · PastPaper.sampleTitle

MetadataPastPaper.sampleTitle

Thinka May 2023 SL (TZ1) IB Diploma Programme-Style Mock — Computer Science

70 PastPaper.marks90 PastPaper.minutes2023
An original Thinka practice paper modelled on the structure and difficulty of the May 2023 SL (TZ1) IB Diploma Programme Computer Science paper. Not affiliated with or reproduced from IB.

Section A

Answer all questions.
11 PastPaper.question · 23.400000000000002 PastPaper.marks
PastPaper.question 1 · Short Answer
1.8 PastPaper.marks
Identify one advantage of using prototyping during the early stages of system design.
PastPaper.showAnswers

PastPaper.workedSolution

Prototyping provides a tangible representation of the proposed system. One advantage is that it allows users or clients to provide feedback early in the design phase, reducing the risk of developing a final product that does not meet user requirements, thus saving time and cost.

PastPaper.markingScheme

Award 0.9 marks for identifying an advantage (such as active user involvement or early error detection). Award 0.9 marks for explaining how this advantage benefits the system development process (such as reducing overall development costs and avoiding redesigns).
PastPaper.question 2 · Short Answer
1.8 PastPaper.marks
Outline the primary function of the Program Counter (PC) in the Central Processing Unit (CPU).
PastPaper.showAnswers

PastPaper.workedSolution

The Program Counter (PC) is a dedicated register within the CPU. Its primary purpose is to store the address of the next instruction to be processed. Once that instruction is fetched, the PC is incremented to point to the next instruction.

PastPaper.markingScheme

Award 0.9 marks for stating that it holds or stores the memory address of the next instruction. Award 0.9 marks for explaining its role in the fetch-execute cycle (e.g., how it is updated/incremented).
PastPaper.question 3 · Short Answer
1.8 PastPaper.marks
Explain how data security is maintained across a public network when using a Virtual Private Network (VPN).
PastPaper.showAnswers

PastPaper.workedSolution

A VPN secures data by encrypting the payload before transmission over the public network. Even if packets are intercepted, they cannot be read without the proper decryption key. This private tunnel also masks the user's IP address.

PastPaper.markingScheme

Award 0.9 marks for identifying the use of encryption or tunneling protocols. Award 0.9 marks for explaining how this prevents unauthorized users from reading or accessing the transmitted data.
PastPaper.question 4 · Short Answer
1.8 PastPaper.marks
State the purpose of the modulus (mod) operator in computational algorithms, providing a brief example.
PastPaper.showAnswers

PastPaper.workedSolution

The modulus operator calculates the remainder after dividing one integer by another. It is useful in algorithms for tasks such as identifying even/odd numbers (e.g., number mod 2 equals 0) or cyclic operations.

PastPaper.markingScheme

Award 0.9 marks for defining the modulus operator as returning the remainder of division. Award 0.9 marks for providing a correct mathematical or programmatic example.
PastPaper.question 5 · Short Answer
1.8 PastPaper.marks
Outline one threat to data integrity or security during the data migration process.
PastPaper.showAnswers

PastPaper.workedSolution

When moving data from an old system to a new system, threats include data loss or corruption arising from schema or format differences, as well as unauthorized data access or interception during transit.

PastPaper.markingScheme

Award 0.9 marks for identifying a valid threat (such as transmission interception, data loss, or file format incompatibility). Award 0.9 marks for explaining how this threat impacts the migration process.
PastPaper.question 6 · Short Answer
1.8 PastPaper.marks
State the primary difference between a network switch and a network router.
PastPaper.showAnswers

PastPaper.workedSolution

A network switch operates at the Data Link layer and forwards data packets to specific destination devices within the same local network. In contrast, a router operates at the Network layer and forwards data between different networks.

PastPaper.markingScheme

Award 0.9 marks for describing the function of a switch (connecting devices within a single network). Award 0.9 marks for describing the function of a router (connecting different networks).
PastPaper.question 7 · Short Answer
1.8 PastPaper.marks
Describe the function of the data bus within a computer's system bus architecture.
PastPaper.showAnswers

PastPaper.workedSolution

The data bus provides a physical channel for the transmission of data and instructions between the core components of the computer. It is bidirectional, meaning data can flow to and from the CPU.

PastPaper.markingScheme

Award 0.9 marks for stating that it acts as a physical or communication pathway. Award 0.9 marks for explaining that it carries data/instructions between the CPU and memory or peripheral devices.
PastPaper.question 8 · Short Answer
1.8 PastPaper.marks
Define the term abstraction as it applies to computational thinking.
PastPaper.showAnswers

PastPaper.workedSolution

In computational thinking, abstraction allows programmers to manage complexity by hiding irrelevant implementation details and focusing only on the high-level logic needed to model or solve a problem.

PastPaper.markingScheme

Award 0.9 marks for stating that abstraction involves removing or hiding unnecessary details. Award 0.9 marks for explaining that it helps focus on essential characteristics to simplify problem-solving.
PastPaper.question 9 · Short Answer
2 PastPaper.marks
Outline the role of the Program Counter (PC) during the fetch stage of the machine instruction cycle.
PastPaper.showAnswers

PastPaper.workedSolution

The Program Counter (PC) is a CPU register that contains the address of the next instruction scheduled for execution. At the start of the fetch stage, this address is transferred to the Memory Address Register (MAR) via the address bus so the control unit can locate the instruction in RAM. Simultaneously or immediately after, the PC is incremented by one so that it points to the next sequential instruction, ensuring the CPU is prepared for the next cycle.

PastPaper.markingScheme

Award [1] for stating that the PC stores/holds the memory address of the next instruction to be executed. Award [1] for explaining that this address is sent to the MAR or that the PC is incremented to point to the next instruction.
PastPaper.question 10 · structured
3 PastPaper.marks
Explain two advantages and one disadvantage of creating a prototype during the design phase of a new software system.
PastPaper.showAnswers

PastPaper.workedSolution

Advantages: (1) Active user involvement: Prototyping allows end-users to interact with a working model early in development, which helps developers gather accurate requirements and constructive feedback, aligning the final system with user expectations. (2) Early error detection: Technical issues, usability flaws, or logical conflicts can be identified and resolved early in the design phase, which is significantly cheaper than fixing them after full-scale implementation. Disadvantages: (1) Scope creep: Continuous user feedback and iterative changes can easily expand the scope of the project, leading to delays and increased budgets. (2) Unrealistic expectations: Users might mistake a functional-looking prototype for a nearly finished product, neglecting the extensive backend, security, and integration work that still needs to be done.

PastPaper.markingScheme

Award up to [3 marks] as follows: Award [1 mark] for each valid explained advantage up to [2 marks]. E.g., Improves user feedback and requirement accuracy; Allows early detection of technical/usability issues. Award [1 mark] for a valid explained disadvantage. E.g., Can cause scope creep and project delays; Can build false expectations of system readiness.
PastPaper.question 11 · structured
4 PastPaper.marks
Distinguish between the roles of a Media Access Control (MAC) address and an Internet Protocol (IP) address in the transmission of data packets.
PastPaper.showAnswers

PastPaper.workedSolution

A Media Access Control (MAC) address is a unique, physical identifier hardcoded onto a device's Network Interface Card (NIC) during manufacturing. It operates at the Data Link layer of the OSI model and is used to uniquely identify and route data packets between nodes within the same local area network (LAN). In contrast, an Internet Protocol (IP) address is a logical address assigned dynamically or statically by a network configuration. It operates at the Network layer and is used to route packets across different subnets and networks, enabling global communication over the Internet.

PastPaper.markingScheme

Award up to [4 marks] as follows: Award [1 mark] for identifying the MAC address as a physical/hardware address hardcoded on the device. Award [1 mark] for explaining that the MAC address is used for node-to-node delivery within a local network (LAN). Award [1 mark] for identifying the IP address as a logical/software address assigned dynamically or statically. Award [1 mark] for explaining that the IP address is used to route packets across different networks/internets.

Section B

Answer all questions. Each question contains a scenario-based system.
3 PastPaper.question · 45 PastPaper.marks
PastPaper.question 1 · Scenario Extended Response
15 PastPaper.marks
GreenTrack Logistics is upgrading its warehouse inventory management system from an old, localized legacy software application to a modern, cloud-based real-time tracking system.

(a) Outline two organizational issues that may arise from implementing this new system. [4]

(b) Discuss the suitability of using a direct changeover implementation method compared to a parallel running method for this logistics company. [5]

(c) Explain the role of a data migration plan in this transition, identifying three distinct stages of this process. [6]
PastPaper.showAnswers

PastPaper.workedSolution

(a) Two organizational issues that may arise are:
1. User resistance to change: Staff who are accustomed to the old legacy software may find the new cloud system complex and resist using it, leading to decreased morale and operational delays.
2. Retraining costs and downtime: Employees will require training to use the new interfaces and features. Organizing these training sessions can cause a temporary loss of productivity.

(b) Direct Changeover vs. Parallel Running:
- Direct changeover involves turning off the old legacy system and immediately starting the new cloud system. It is cost-effective and immediate, but carries a high risk: if the new system fails, the warehouse operations could shut down completely, causing massive delivery delays.
- Parallel running involves running both systems simultaneously. This is highly secure because the legacy system serves as a backup, but it requires double data entry, which is highly inefficient for a fast-paced logistics environment and doubles the workload of the staff.
- Conclusion: For GreenTrack Logistics, parallel running is preferred despite the cost, as a complete system failure during direct changeover would be financially catastrophic.

(c) Role and Stages of a Data Migration Plan:
The role of the data migration plan is to guarantee that existing inventory data is transferred to the new database accurately, securely, without loss of information, and in a format compatible with the cloud system.

Three stages of data migration:
1. Extraction: Exporting the raw legacy data from the localized database.
2. Transformation: Cleaning, deduplicating, and reformatting the data to match the schema of the new cloud database.
3. Loading and Validation: Importing the transformed data into the new system and running verification tests (such as checksums or sample testing) to ensure data integrity.

PastPaper.markingScheme

(a) [4 marks]
- Award 1 mark for identifying an organizational issue and 1 mark for its explanation, up to 2 issues.
- Issues include: retraining requirements, staff resistance, temporary drop in efficiency, physical workspace reorganization.

(b) [5 marks]
- Award 1 mark for explaining direct changeover (immediate, high risk, low running cost).
- Award 1 mark for explaining parallel running (dual operation, low risk, high cost/effort).
- Award up to 2 marks for applying these methods specifically to the logistics context (e.g., impact of system failure on shipments, double-entry overhead for real-time inventory).
- Award 1 mark for a justified conclusion matching the context.

(c) [6 marks]
- Award up to 2 marks for explaining the overall role of the migration plan (e.g., maintaining data integrity, preventing data loss, structure mapping).
- Award 1 mark for each correctly identified and described stage (Extraction, Transformation, Loading/Validation) up to 3 marks.
- Award 1 mark for explicit technical detail of a stage (e.g., validation via check digit/checksum, data type casting).
PastPaper.question 2 · Scenario Extended Response
15 PastPaper.marks
MediSecure is a private hospital where medical records are accessed by doctors working remotely using a Virtual Private Network (VPN).

(a) Describe how a Virtual Private Network (VPN) ensures the secure transmission of patient data over the public internet. [4]

(b) Identify the distinct roles of the IP (Internet Protocol) and TCP (Transmission Control Protocol) when a medical image file is transmitted from a hospital server to a remote doctor's workstation. [4]

(c) Evaluate the suitability of packet switching compared to circuit switching for transmitting large, non-real-time medical image datasets over the hospital network. [7]
PastPaper.showAnswers

PastPaper.workedSolution

(a) A VPN secures data transmission through the following mechanisms:
1. Encryption: Encrypts the data payload so that if packets are intercepted by unauthorized third parties, they remain unreadable.
2. Tunneling Protocols: Encapsulates the original packets inside outer IP packets (using protocols like IPsec) to hide the layout of the private network.
3. Authentication: Verifies the identity of the remote user and the server before establishing the connection.
4. Data Integrity: Employs hashing functions to detect if any packets have been altered during transit.

(b) Roles of IP and TCP:
- IP (Internet Protocol): Responsible for addressing and routing individual packets across different network hops. It appends the source and destination IP addresses to each packet so routers know where to send them.
- TCP (Transmission Control Protocol): Responsible for establishing a reliable connection, splitting the file into ordered segments at the source, reassembling them in the correct sequence at the destination, and requesting retransmissions for any lost or corrupted packets.

(c) Evaluation of Packet Switching vs. Circuit Switching:
- Circuit switching establishes a dedicated physical path between the sender and receiver with constant bandwidth. It guarantees no latency variance (jitter), but is inefficient as the line remains blocked even when no data is being sent.
- Packet switching divides data into packets that traverse different paths dynamically. It is highly efficient because it shares bandwidth across multiple active transmissions.
- Suitability for large, non-real-time medical images: Packet switching is highly suitable. Because the images are non-real-time, slight variations in delivery time (latency) are not critical. The network can utilize maximum bandwidth capacity to transmit large files without reserving dedicated, expensive physical lines. Thus, packet switching is far more cost-effective and flexible.

PastPaper.markingScheme

(a) [4 marks]
- Award 1 mark for describing encryption (making data unreadable).
- Award 1 mark for describing tunneling (encapsulation of packets).
- Award 1 mark for describing authentication (verifying credentials at both ends).
- Award 1 mark for describing data integrity checks (preventing tampering via hashes).

(b) [4 marks]
- Award up to 2 marks for the role of IP (1 mark for addressing/source-destination, 1 mark for packet routing across network nodes).
- Award up to 2 marks for the role of TCP (1 mark for sequencing/segmentation, 1 mark for error checking/acknowledgments/retransmission).

(c) [7 marks]
- Award up to 2 marks for defining circuit switching and packet switching characteristics.
- Award up to 2 marks for applying these characteristics to the medical image context (large datasets, non-real-time).
- Award up to 2 marks for analytical comparison (e.g., packet switching allows dynamic routing of large files but might introduce jitter, which is acceptable since it's non-real-time; circuit switching wastes bandwidth).
- Award 1 mark for a balanced conclusion on suitability.
PastPaper.question 3 · Scenario Extended Response
15 PastPaper.marks
An environmental monitoring system tracks hourly temperature readings in a data center to prevent servers from overheating. The following algorithm is designed to analyze an array of \( N \) sequential temperature readings, `TEMP`:

```text
LIMIT = 5.0
SPIKES = 0
loop I from 1 to N - 1
DIFF = abs(TEMP[I] - TEMP[I - 1])
if DIFF > LIMIT then
SPIKES = SPIKES + 1
end if
end loop
```
Note: The array index starts at 0, and `abs()` returns the absolute difference.

(a) Construct a trace table for this algorithm given the input array `TEMP = [12.0, 11.5, 17.5, 18.0, 24.0, 22.0]` (where \( N=6 \)). Clearly show the values of `I`, `DIFF`, and `SPIKES` at each iteration of the loop. [5]

(b) Outline the purpose of using a standard algorithm (such as bubble sort or selection sort) prior to searching for specific values in a large, unsorted database of temperature records. [4]

(c) Deduce how the computational time complexity (expressed in Big O notation) changes if the algorithm is modified to find the absolute difference between *every possible pair* of temperature readings in the array to determine the absolute maximum variance. Explain your reasoning. [6]
PastPaper.showAnswers

PastPaper.workedSolution

(a) Trace Table:

| I | TEMP[I] | TEMP[I-1] | DIFF | DIFF > LIMIT (5.0) | SPIKES |
|---|---|---|---|---|---|
| Initial | | | | | 0 |
| 1 | 11.5 | 12.0 | 0.5 | False | 0 |
| 2 | 17.5 | 11.5 | 6.0 | True | 1 |
| 3 | 18.0 | 17.5 | 0.5 | False | 1 |
| 4 | 24.0 | 18.0 | 6.0 | True | 2 |
| 5 | 22.0 | 24.0 | 2.0 | False | 2 |

Final value of `SPIKES` is 2.

(b) Purpose of sorting before searching:
1. Sorting organizes the unsorted database of temperatures in ascending or descending order.
2. Once the data is sorted, highly efficient search algorithms, such as binary search, can be used.
3. Binary search has a time complexity of \( O(\log N) \), which is significantly faster than a linear search (\( O(N) \)) on unsorted data.
4. This reduction in search time is critical for large datasets containing millions of records, saving processor cycles and reducing search latency.

(c) Complexity Deduction:
- The original algorithm iterates through the array once from \( 1 \) to \( N-1 \). It executes exactly \( N-1 \) operations, which results in a linear time complexity of \( O(N) \).
- If the algorithm is modified to compare every single reading with *every other* reading, a nested loop structure must be introduced. For each element \( i \), an inner loop must run through elements \( j \).
- The total number of comparisons would scale according to \( \frac{N(N-1)}{2} \) operations.
- Expressed in Big O notation, this quadratic growth simplifies to \( O(N^2) \).
- Therefore, the complexity degrades from \( O(N) \) (linear) to \( O(N^2) \) (quadratic), making it much less scalable for large datasets.

PastPaper.markingScheme

(a) [5 marks]
- Award 1 mark for correct values of `I` (loops 1 to 5 only).
- Award 2 marks for correct values of `DIFF` (0.5, 6.0, 0.5, 6.0, 2.0). Deduct 1 mark for each incorrect calculation.
- Award 2 marks for correct progression of the `SPIKES` counter (incrementing only at I=2 and I=4 to finish at 2).

(b) [4 marks]
- Award 1 mark for stating that sorting arranges the elements in sequential order.
- Award 1 mark for identifying that sorting allows the execution of a binary search.
- Award 1 mark for contrasting the time complexity of binary search (\(O(\log N)\)) with linear search (\(O(N)\)).
- Award 1 mark for linking this optimization directly to efficiency/scalability in large databases.

(c) [6 marks]
- Award up to 2 marks for identifying the complexity of the original algorithm (\( O(N) \)) and explaining why (single loop, linear pass).
- Award 1 mark for stating the new complexity (\( O(N^2) \)).
- Award up to 3 marks for explaining the quadratic reasoning: comparing every element to every other element requires nested iterations (1 mark); the number of operations is proportional to \( N^2 \) (1 mark); this creates a quadratic scaling relationship (1 mark).

PastPaper.sampleCTATitle

PastPaper.sampleCTADescription

PastPaper.sampleStickyMessage

PastPaper.stickyCtaText