A2 Level Past Paper Questions
WJEC A2 Level Computer Science
Explain, giving a suitable example for each, the difference between a two-dimensional and a three-dimensional array.
A two-dimensional string array july[n,n] represents a calendar for July with rows 0-5 (row 0 = day names Mon-Sun, rows 1-5 = dates 01-31, with empty cells where no date exists).
Describe how you would update the empty element in the array to "X".
This is a representation of a two-dimensional integer array containing the values 1 to 9:
2D = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
Describe how you would change the value 8 to 10 in the 2D array.
Computer languages such as HTML and CSS are standardised.
Describe the need for the standardisation of computer languages.
Explain, giving a suitable example, the potential difficulties involved in agreeing and implementing standards.
Clearly showing each step, simplify the following Boolean expression using Boolean algebra, identities and De Morgan's Law where appropriate:
(1·X + Y̅·Y̅)·X̅ + X·Z
Clearly showing each step, simplify the following Boolean expression using Boolean algebra, identities and De Morgan's Law where appropriate:
(A̅·A + A·A)·1 + B·C·0
Write an algorithm to search an unsorted one-dimensional array of strings and replace any duplicate values with the string "X" and then output the array.
A password validation algorithm checks: length >= 8 (sets x=TRUE), contains a digit (sets y=TRUE), contains a special character from {!,@,£,*,?} (sets z=TRUE). If all three conditions are met, valid=TRUE and outputs 'message 2', otherwise outputs 'message 1' and loops.
Using a table, select three appropriate pieces of test data to dry-run the algorithm and trace the variables x, y, z, valid and the expected output.
The password validation algorithm outputs 'message 1' when the password is invalid and 'message 2' when valid.
Suggest suitable text for message 1 and message 2.
When evaluating computer-based solutions, describe the following criterion and give a suitable example:
Usability
When evaluating computer-based solutions, describe the following criterion and give a suitable example:
Performance
When evaluating computer-based solutions, describe the following criterion and give a suitable example:
Scalability
When evaluating computer-based solutions, describe the following criterion and give a suitable example:
Security
A website URL is made up of a protocol, a domain name, and an optional file path.
- The protocol can only be "http" or "https".
- The domain name can only consist of alphanumeric characters, hyphens and full stops.
- The protocol and domain name must be separated by a colon and two forward slashes.
- The optional file path must start with a forward slash and can only contain alphanumeric characters and forward slashes.
Example: https://www.wjec.co.uk/home/
Produce a Backus-Naur form (BNF) definition for a valid website URL.
Explain program version management.
Explain, using suitable examples, recursive and non-recursive sorting algorithms.
This is a signed 8-bit integer: 00001111₂
Include this integer in a worked example to demonstrate how masking can be used to determine the sign of the integer.
An algorithm merges two one-dimensional arrays of length n by iterating through myArray1 and myArray2, appending each element to myArray3.
Evaluate the efficiency of the algorithm and, using Big O notation, determine the growth rate for time performance.
Determine the growth rate of memory space during a single run of the array merging algorithm.
Identify the type of time complexity and draw a graph of the algorithm to illustrate the order of time performance. Graph paper is not required.
Explain, giving a suitable example, the shortest path algorithm.
Discuss the potential use of natural language interfaces in human-computer communication to address the problem of communicating with computers.
You should draw on your knowledge, skills and understanding from a number of areas across your computer science course when answering this question.
Describe the role of three of the main components of a contemporary Central Processing Unit (CPU).
AJ Jewellers uses a direct access file with a separate overflow area to store stock records. Each record has a key field made up from a four-digit code followed by the year number, for example: 137524, 701924.
It is proposed to use the hashing algorithm: key field MOD 1000
Calculate the location of the stock records for each of the two example key fields.
AJ Jewellers uses a direct access file with a hashing algorithm: key field MOD 1000. Each record has a key field made up from a four-digit code followed by the year number, for example: 137524, 701924.
Explain why this hashing algorithm is unsuitable.
AJ Jewellers uses a direct access file with a hashing algorithm: key field MOD 1000. Each record has a key field made up from a four-digit code followed by the year number.
Give an example of a more suitable hashing algorithm for the file.
AJ Jewellers has invested in a 3D printing system to produce objects in precious metals. The system includes CAD software and a double buffering printer interface.
Explain why the 3D printing system uses double buffering.
The maximum increase in speed due to parallel processing can be calculated using Amdahl's Law:
Speedup = 1 / (S + P/N)
where P = parallel fraction, N = number of processors and S = serial fraction (S = 1 - P).
Calculate the maximum increase in speed due to parallel processing using 2 processors and 20 processors, where the parallel fraction P is equal to:
- 0.5 for 2 and 20 processors
- 0.9 for 2 and 20 processors
Using Amdahl's Law calculations (P=0.5 gives speedups of 1.33 and 1.90 for 2 and 20 processors; P=0.9 gives speedups of 1.82 and 6.90 for 2 and 20 processors):
Explain the limiting factor of parallel processing indicated by your calculations.
Explain two other limiting factors to parallelisation in parallel processing.
An interrupt is a signal that is sent to the processor to request immediate attention. The operating system will have interrupt service routines designed to process each interrupt.
Identify two events which could generate an interrupt.
Priorities are used when more than one device raises an interrupt. Describe how priorities are used when handling interrupts.
Describe the process carried out when an interrupt affects the execution of the fetch-decode-execute cycle of a running program.
A series of nodes (A-F) are connected in a network. A node-to-node transmission speed of 1 Mbps would produce a routing cost = 1. The routing cost = 1000 / speed in Kbps.
The table shows: A-B (250 Kbps, cost 4), A-D (? Kbps, cost 20), B-C (100 Kbps, cost 10), B-F (80 Kbps, cost ?), C-D (250 Kbps, cost 4), C-F (500 Kbps, cost ?), D-E (100 Kbps, cost 10), E-F (250 Kbps, cost 4).
State the values that should be in cells (i), (ii) and (iii) of the table:
(i) A-D transmission speed
(ii) B-F routing cost
(iii) C-F routing cost
Packets are transmitted using the route that has the lowest total cost. Using the routing costs: A-B=4, A-D=20, B-C=10, B-F=12.5, C-D=4, C-F=2, D-E=10, E-F=4.
State the route that packets would take from node A to node F.
A secure display cabinet has an electronic lock opened by entering a four-digit code using a keypad. The correct code is stored at memory location 01A0. The cabinet opens when the computer sends -1 to the electronic lock.
The algorithm is:
Repeat
input a code number from the keypad
subtract the value stored in 01A0 from the input
Until the remainder is zero
output -1
Instruction set:
IN — Input a numeric code from the keypad to the accumulator
OUT R — Output a numeric value R to the electronic lock
ADD N — Add value in location N to accumulator
SUB N — Subtract value in location N from accumulator
JMP LABEL — Jump to LABEL
JZE LABEL — Jump to LABEL if accumulator equals zero
Using the given algorithm and instruction set, write a program to control the electronic lock.
Explain, using a suitable example, the difference between truncating and rounding a real number when stored as an integer in a 4-bit register.
Convert the hexadecimal numbers 1A₁₆ and -14₁₆ into two 8-bit binary numbers, using two's complementation. Using binary addition, calculate the binary number that would result from adding the two numbers.
In a certain computer system, real numbers are stored in floating point form using 16-bits: a 12-bit mantissa in two's complement form (binary point immediately after the left bit) and a 4-bit exponent in two's complement form.
Clearly showing your working, convert 52.875₁₀ into this format.
In a different computer system, real numbers are stored in floating point form with an 8-bit signed mantissa and a 4-bit signed exponent.
Calculate the denary value of 00100101 0101.
Describe the contents of a data dictionary.
Explain the purpose of a DBMS.
AJ Jewellers offers a jewellery valuation service. A flat file database is used to organise details of the valuations, storing information about clients, their jewellery, the valuations and the experts used.
Identify two potential problems arising from the use of a flat file.
AJ Jewellers' valuation database is to be restructured into third normal form using four tables (Client, Valuation Request, Valuation, Expert Valuer).
Draw an entity-relationship diagram for the revised database structure.
AJ Jewellers' valuation database is to be restructured into third normal form using four tables.
Design a database for this situation.
Explain the purpose of query languages, both in general and with specific reference to SQL.
A local car club maintains records of cars, members and monthly car hires in a relational database.
Cars table: CarID, Make, Model, Type
Members table: MemberID, Name, Address1, Address2
CarHireMarch table: Date, Hours, CarID, MemberID
Write an SQL command to output the Make and Model only of the electric cars.
A local car club maintains records of cars, members and monthly car hires in a relational database.
Members table: MemberID, Name, Address1, Address2
CarHireMarch table: Date, Hours, CarID, MemberID
Write an SQL command to output the Name of all members who hired a car on 3 Mar 24.
Another table is required to record car hire payments. Write an SQL command to create a new table called HirePayments to contain the following fields:
PaymentID (example: 290)
Date (example: 3 Mar 24)
MemberID (example: 25)
PaymentDue (example: 60.00)
Paid (example: TRUE)
You do not need to add the data into the table.
Explain the main advantages and the associated security and integrity problems that may arise when using the cloud for storage, backup and online retrieval of files.
Explain the operation of a hash table.
A hash table contains:
Key 1001=Apple, 1002=Berry, 1003=Kiwi, 1004=Lime, 1005=Mango, 1006=Pear, 1007=Pineapple
Redraw the hash table after '1008, Orange' has been added and '1003, Kiwi' has been deleted.
Starting from the modified hash table (1001=Apple, 1002=Berry, 1004=Lime, 1005=Mango, 1006=Pear, 1007=Pineapple, 1008=Orange), redraw the hash table after '1006, Peach' has been added.
Note: Key 1006 already contains 'Pear'.
Explain the differences between procedural and object orientated programming paradigms, giving suitable examples for each.
Using the following Truth Table express p as a Boolean expression:
A=0,B=0,C=0 → p=0
A=0,B=0,C=1 → p=1
A=0,B=1,C=0 → p=1
A=0,B=1,C=1 → p=1
A=1,B=0,C=0 → p=0
A=1,B=0,C=1 → p=1
A=1,B=1,C=0 → p=0
A=1,B=1,C=1 → p=0
Clearly showing each step, simplify the following Boolean expression using Boolean algebra, identities and De Morgan's Law where appropriate:
A.(1 + C) + NOT(B).(A + B)
Clearly showing each step, simplify the following Boolean expression using Boolean algebra, identities and De Morgan's Law where appropriate:
X.NOT(Y + Z) + NOT(Z).X
Write a quicksort algorithm, to sort an array of integers into ascending order.
State the purpose of validation and verification, giving a suitable method for each.
An online grocery store uses binary trees. Describe the in-order traversal method and give an example of why it would be used in the grocery store.
An online grocery store uses binary trees. Describe the post-order traversal method and give an example of why it would be used in the grocery store.
An online grocery store uses binary trees. Describe the pre-order traversal method and give an example of why it would be used in the grocery store.
Draw an example of a balanced binary tree for grocery items.
Giving suitable examples, describe the types of software tool that have been designed to assist in analysis and planning.
Giving suitable examples, describe the types of software tool that have been designed to assist in software development.
Giving suitable examples, describe the types of software tool that have been designed to assist in version management.
A QR code generator uses a string to produce a WiFi access QR code. The string comprises the QR code type, encryption type, network name (SSID) and password, separated using colons.
Rules:
- QR code type is WIFI
- Encryption can be either WEP or WPA
- Network name can contain only lowercase letters, uppercase letters and digits
- Password can contain lowercase letters, uppercase letters, special characters and digits
Example: WIFI:WEP:WJECWiFiPublic:Pa$$w0rd1
Produce a Backus-Naur Form (BNF) definition for the string.
Giving suitable examples, describe the differences between translation and execution errors.
Describe the difference between compilers and interpreters. Give one example of a language which is compiled and one example of a language which is interpreted.
An algorithm searches for consecutive data items in three separate one-dimensional arrays of size n. It uses a loop (i from 0 to n-1) checking if myArray1[i] = myArray1[i+1], myArray2[i] = myArray2[i+1], and myArray3[i] = myArray3[i+1], concatenating found items.
Evaluate the efficiency of the algorithm and using Big O notation, determine the growth rate for time performance.
Draw a graph of the algorithm to illustrate and identify its order of time performance. Graph paper is not required.
Discuss contemporary approaches to human-computer interaction.
You should draw on your knowledge, skills and understanding from a number of areas across your computer science course when answering this question.
Giving an example, describe why creating a text document by voice recognition might be preferred over keyboard entry.
Giving an example, describe why controlling an electronic device by voice input might be preferred over keyboard entry.
Giving an example, describe why managing a security system by voice print recognition might be preferred over keyboard entry.
A series of calculations must be carried out to complete a process:
Task 1: a = bx + cy
Task 2: d = ex + f²
Task 3: g = hy - d
Explain why these tasks are not suitable for parallel processing.
A computer model is used to predict economic forecasts. It takes 16 hours on a single processor. 80% of the algorithm can be carried out in parallel, the remaining parts must be carried out serially.
Determine the time taken to run the parallel processing elements of the economic forecast model on a parallel processing system using 8 processors.
In a food factory, packages are weighed on a conveyor belt. Underweight packages are rejected. The minimum acceptable weight is stored in memory location R.
Algorithm:
LOOP continuously
input package weight
subtract value stored in R from input weight
IF remainder is zero or greater THEN output value 1
ELSE output value 2
END LOOP
Instruction set:
IN — Input weight to accumulator
OUT X — Output numeric value X
ADD Y — Add value in location Y to accumulator
SUB Y — Subtract value in location Y from accumulator
JNG LABEL — Jump to LABEL if accumulator < 0
JMP LABEL — Jump unconditionally to LABEL
Using the algorithm and instruction set, write a program in assembly language to control the weighing system.
Giving an example for each, explain what is meant by batch processing and real time transaction processing.
Giving an example for each, describe the format of sign and magnitude and two's complement when representing negative binary integers.
A computer uses floating point representation with a 10-bit mantissa in two's complement form (binary point immediately after the leftmost bit) and a 6-bit exponent in two's complement form.
Find the base-10 (denary) number represented by: 0110010101 000110
Describe the process and effects of carrying out arithmetic shifts on a two's complement negative binary number.
A shop has 95 stock items with three-digit identification codes (000-999). A programmer considers two storage methods:
1. Direct access file with 100 locations using hash function: identificationCode MOD 100
2. Sequential access file with 1000 locations where the record is stored at the location corresponding to its identification code
Explain the advantages and disadvantages of these two methods.
Describe the three basic states of a process in a multi-tasking computer.
Improved worker safety is a benefit of automation. Describe two other benefits and two drawbacks of automating a manufacturing process.
Explain, giving an example of each type of system, the main purpose of:
- a safety related control system
- a safety critical control system
A kitchen equipment shop has a Product table (ProductID, Description, Model, Price) and an Order table (OrderID, Customer, ProductID, OrderDate, Delivered).
Write an SQL command to list only the description and price for each Product record where the price is less than 300.
A kitchen equipment shop has a Product table (ProductID, Description, Model, Price) and an Order table (OrderID, Customer, ProductID, OrderDate, Delivered).
Write an SQL command to list the customer and order date for all orders with a product description 'Cooker'.
Write an SQL command to add the following record to the Product table:
A refrigerator with the model name 'Coolstore 2000'. This has been allocated Product ID 288 and has a price of 150.60.
A large company uses a single flat file to store all details of projects. They have discovered that the data structure has several shortcomings.
Describe two disadvantages for the company of using a flat file to store its data.
A company develops a relational database to store details of projects. Each project has a title and budget. Project teams are made up of employees from various departments. Each employee is allocated to a department matching their skills. An employee may be a member of more than one project team.
Design a database system in third normal form for this situation.
Explain what is meant by a distributed system and describe what will be distributed in the system.
A car manufacturer has dealerships across the UK. Car owners take their cars for servicing each year to a convenient dealership. Records are kept of servicing, faults found, and replacement parts fitted.
Explain the advantages to the company of implementing a distributed database system across its dealerships compared with using a single centralised database.
Explain the advantages and disadvantages of single key (symmetric) encryption compared with double key (asymmetric) encryption, giving an example, for each method, of a situation where that method would be the most suitable.
Text is stored in 8-bit binary ASCII format: A=65₁₀ (01000001₂), B=66₁₀ (01000010₂), C=67₁₀ (01000011₂).
The text is encrypted using a sequential XOR method:
- The first character is encrypted by XOR with the key value 01101010₂
- The second character is encrypted by XOR with the encrypted value of the first character
- The third character is encrypted by XOR with the encrypted value of the second character
Using this algorithm, encrypt the word CAB.
Identify two hardware devices required to make a wireless connection to a network.
State two protocols used for wireless digital communication.
Describe one disadvantage of using a public wireless network.
Information and advice on medical and health issues are readily available to the public through the internet, including online expert systems. Discuss the possible effects of using the internet for this purpose on health professionals and the wider community.
Explain, giving a suitable example, the operation of a stack data structure.
A graphical representation of a two-dimensional array 'alphabet[]' is given, containing letters 'a' to 'z', a blank space and '.' arranged in rows 0-3 and columns 0-6.
Describe how you would update the value '.' to '!' in the alphabet array.
Demonstrate how a two-dimensional array could be used to store pupil data in school.
Define the term algorithm.
Describe one method of defining algorithms.
Explain the benefits and drawbacks of recursive and non-recursive algorithms.
Clearly showing each step, simplify the following Boolean expression using Boolean algebra, identities and De Morgan's Law where appropriate.
(A + C).(A.C + A.C') + A.C
Clearly showing each step, simplify the following Boolean expression using Boolean algebra, identities and De Morgan's Law where appropriate.
X.Y'.(X + Y) + Z'
Write a Binary Search algorithm to search for a value in an array of characters and output its position. You may assume that the search value exists in the array.
The following is an algorithm:
1 declare subprocedure DivMod
2
3 x, y, a, b, c, ds is integer
4
5 output "Enter a three-digit integer (100 - 999): "
6 input x
7 if x > 99 AND x < 1000 then
8 a = x DIV 100
9 b = x MOD 100
10 c = x MOD 10
11 b = (b - c) DIV 10
12 output a
13 output b
14 output c
15 ds = (a + b + c)
16 output ds
17 y = ((a * 100) + (b * 10) + c)
18 output y
19 else
20 output "error"
21 end if
22
23 end procedure
Select appropriate test data to dry run the algorithm and give all outputs.
Explain the purpose of the algorithm.
Describe the approach to analysis and design in the following software development methodology:
Waterfall
Describe the approach to analysis and design in the following software development methodology:
Agile
Describe one piece of documentation that should be produced during the analysis stage of software development.
Describe one piece of documentation that should be used during the maintenance stage of software development.
Every book contains a unique 13-digit International Standard Book Number (ISBN). An ISBN comprises five parts: a GS1 assigned prefix, registration group, publisher, title and a check digit. Each individual part is separated with a space or hyphen.
- The GS1 assigned prefix must be 978 or 979.
- The registration group must be a number between 01 and 99.
- The publisher must be a number between 00001 and 99999.
- The title must be a number between 01 and 99.
- The check digit must be a single digit.
- A separator of each part which can be either a space (' ') or hyphen ('-').
Example: 978-11-08412-72-8
Produce a Backus-Naur Form (BNF) definition for a 13-digit ISBN.
Functional programming and logic programming are both declarative programming paradigms.
Explain these two paradigms, giving an example language in each case:
Functional programming
Functional programming and logic programming are both declarative programming paradigms.
Explain these two paradigms, giving an example language in each case:
Logic programming
All computer languages should follow the same standards.
Explain the need for standardisation of computer languages.
Describe two potential difficulties involved in agreeing these standards.
Draw a truth table to prove the following:
B AND NOT (A NOR B) = B
This algorithm duplicates a three-dimensional array of length n using three nested for loops (i, j, k each from 0 to n-1), copying myArray[i,j,k] to myArrayCopy[i,j,k].
Evaluate the efficiency of the algorithm and using Big O notation, determine the growth rate for time performance.
Determine the growth rate of memory space during a single run of the algorithm.
Identify the type of time complexity and draw a graph of the algorithm to illustrate the order of time performance. Graph paper is not required.
Describe how data may be recovered if lost.
Discuss the importance of codes of conduct in promoting professional behaviour throughout the software development stages.
You should draw on your knowledge, skills and understanding from a number of areas across your computer science course when answering this question.
Describe how files may be organised and managed using a file manager program.
Files may be organised using a hashing algorithm. Explain the purpose of a hashing algorithm.
Identify a situation in which a high-priority interrupt may be generated.
Describe the procedure for dealing with an interrupt with a higher priority than the interrupt that is currently being processed.
An assembly language program is required to check a four digit numeric code against a code stored in location Y. If the code is entered correctly then the program should output 1. If the code entered is incorrect the program should output 2 and should allow the user to re-enter a code.
The assembly language used by the processor has an instruction set which includes the following commands:
INP - Input numeric value to the accumulator
OUT X - Output a numeric value X
STA X - Copy contents of accumulator to memory location X
LDA X - Load accumulator with contents of memory location X
HLT - End
SUB Y - Subtract the numeric value in location Y from the accumulator, leaving the result in the accumulator
JZE LABEL - Jump to LABEL if the contents of the accumulator are equal to zero
JMP LABEL - Jump unconditionally to LABEL
Using the instruction set, write a program to check the code entered.
The Internet enables the use of many communication applications. Describe the distinguishing characteristics of these communication applications:
• Podcast
• Blog
• Instant messaging
• Webcast
A certain computer uses a 16 bit floating point representation:
Mantissa: 8 bits in two's complement form. The binary point in the mantissa is immediately after the leftmost bit.
Exponent: 8 bits in two's complement form.
Convert the number 7.1875 (base 10) into this floating point representation.
Determine the most accurate representation possible for 19.3 (base 10) using this floating point representation.
Calculate the absolute and relative errors in denary for this floating point representation of 19.3 (base 10).
Describe the relationship between the size of the mantissa and exponent in the representation of a floating point number.
In a certain computer network the protocol used to determine lowest cost routes is based on transfer rates and delays. Transfer rates are based on bandwidth of network links. Delays represent the overhead arising from the time taken for a router to process, queue and transmit a data packet. The total route cost is calculated as the cost of each link multiplied by the total of the delay factors of each intermediate router visited. The delay at each intermediate router = 1.2.
Calculate the lowest cost route from router A to router F.
A new link of bandwidth cost = 14 is to be added from B to F. Re-calculate the lowest cost route from router A to router F.
The link from router C to router D is then upgraded to a network cost of 5. Describe the effect the upgrade will have on overall network costs.
Phishing is the most common cyber-attack vector. Explain what is meant by the term 'cyber-attack vector'.
Describe two other cyber-attack vectors.
State what is meant by the term penetration testing.
Describe three penetration testing strategies.
A community craft group that sells jewellery to the general public is creating a database to manage its sales. This is a design for a database table it intends to use:
Customer (customerID, surname, orderDate, itemNo, orderQuantity)
Write an SQL command that will create this table using appropriate data types and sizes.
Write an SQL command to add this record to the Item table:
CT00111, 13, Earrings, 97
Write an SQL command to change the price of itemNo CT00016 to 93.
Describe what is meant by the term relational database.
Describe the advantages of database normalisation.
A health care company is creating a relational database to manage its dental surgeries located in different towns across Wales. Each dental surgery employs dentists who will only work in that surgery. Patients will be registered with one of the dentists and will only be treated by that dentist. Patients will book appointments to see their dentist.
Produce an entity relationship diagram for the system described.
Design a database structure in third normal form for the system.
The increase in speed due to parallel processing can be calculated as: 1 / (S + P/N) where P = parallel fraction, N = number of processors and S = serial fraction (S = 1 - P).
Calculate the increase in speed due to parallel processing using 10 processors and the increase in speed of doing the same task using 1000 processors, where the parallel fraction P is equal to:
• 0.5 for 10 and 1000 processors
• 0.9 for 10 and 1000 processors
Discuss the effect that increasing the parallel fraction of the task will have on the speed due to parallel processing.
Describe the advantages of using a distributed database.
Cryptography may be based on symmetric or asymmetric algorithms. Describe the advantages of using asymmetric encryption.
A local hospital needs to ensure that access to its medical laboratories is restricted to authorised personnel. It is considering using biometric technologies to identify and restrict access to authorised personnel only.
Describe the biometric options available to the hospital and explain the main benefits and drawbacks of biometric security technologies.
Explain the differences between stack and queue data structures.
This is a diagram of a linked list in alphabetical order: A → C → G → L → Ø
Redraw the linked list after the data item 'E' has been added.
Redraw the amended linked list (after 'E' was added) after the data item 'C' has been deleted.
Clearly showing each step, simplify the following Boolean expression using Boolean algebra, identities and De Morgan's Law where appropriate.
A.A + A.B + A.B̄ + B.B
Clearly showing each step, simplify the following Boolean expression using Boolean algebra, identities and De Morgan's Law where appropriate.
(A.B)̄ + A.C + B
This is an eight-bit number: 01101001₂
Include this number in a worked example to demonstrate how masking can be used to determine the state of the most significant bit.
Describe the term natural language interface.
Using an example, describe a potential use for natural language interfaces.
Describe the potential problems that can be associated with natural language interfaces.
Below is a quicksort algorithm. Describe the purpose of this algorithm.
Describe the characteristics of this type of algorithm.
Describe the advantages arising from the elegance of this algorithm.
Explain the purpose of a shortest path algorithm.
The traversal cost for each node is 2. Show how this network and its traversal costs can be represented using a two dimensional array.
State the shortest path from node A to E and calculate its cost.
Explain what is meant by the term programming paradigm.
Describe the difference between procedural and event-driven programming paradigms.
Using examples, describe which programming paradigms would be most suitable when developing different types of software applications.
Draw a truth table to prove the following:
A NOR B = NOT A AND NOT B
Evaluate the efficiency of the Search_B algorithm (binary search) and using Big O notation, determine the growth rate for time performance.
Draw a graph of the algorithms (Search_A with O(n) and Search_B) to illustrate their order of time performance. Graph paper is not required.
State which algorithm is more efficient when searching for a data item.
Describe the term data compression and explain how data compression algorithms are used.
Describe what is meant by a class and an object, and describe the relationship between them.
Describe what is meant by the term method, and describe the relationship between object and method.
The algorithm in the flowchart is intended to sort an array in descending order. However, the algorithm contains several errors. Write a corrected version of the algorithm in pseudo-code.
Describe the purpose, and give examples of, the use of compilers, interpreters and assemblers and distinguish between them.
Define the term buffering in a computer system.
Explain why buffering may be required.
Discuss the benefits of double buffering over single buffering.
Explain what is meant by the term interrupt in a computer system.
Describe two instances where an interrupt would be generated, and the resulting action which would be taken by the computer.
A plumber when undertaking a job will record the job number and description. She also records the items used for the job. Each item used can be found in a stock list (that includes stock codes and unit prices). A job may take more than one day, and the date and number of hours worked on each of the days are recorded in a work session table.
Produce an entity-relationship diagram for the record system described above.
Design a database in third normal form to store the information required for the record system.
Write an SQL command to output the CourseTitle and Degree only, for all of the courses.
Write an SQL command to output the ModuleTitle for all modules available on the degree course with CourseID 427.
Write an SQL command to change the year in which the module Freshwater Biology is studied. This module is now to be studied in year 3.
Write an SQL command to output the ModuleTitle and YearStudied for all modules available on the Modern Languages course for the BA Degree.
Write an SQL command to list the ModuleTitle and StudentsEnrolled for all modules which have less than 20 students or more than 40 students enrolled.
In a certain computer real numbers are stored in floating point form using 16 bits: Mantissa (10 bits in two's complement form, binary point immediately after the most significant bit) and Exponent (6 bits in two's complement form).
Convert the number 5.75 (base 10) into this floating point form. Your final answer should be normalised.
Two different numbers 5.75 and 25.5 are to be multiplied. Three different methods are considered.
Method 1: Round both numbers to integers, then multiply.
Method 2: Multiply the decimal numbers, then round the final result to an integer.
Method 3: Multiply the decimal numbers, then truncate the final result to an integer.
Calculate the absolute errors which would occur with each of these methods in comparison to the full accuracy of the decimal calculation.
Discuss the relative accuracies of each of the three methods above.
Integers are stored in a different computer system in 16 bits using two's complementation. Demonstrate, showing your working, how the computer would store the value -152 (base 10).
In a certain computer the following assembly language commands are available, where R, S, T and U are the processor registers:
LOD R, X - Load register R with the numerical value X
ADD R, S - Add the contents of register R to register S, leaving the result in register R
INC R - Add 1 to the contents of register R
DEC R - Subtract 1 from the contents of register R
JMP LABEL - Jump unconditionally to LABEL
JNG R, LABEL - Jump to LABEL if the contents of register R are less than zero
IN R - Input a numerical value and store in register R
OUT R - Output the contents of register R
Write a program to input a number of daily rainfall readings (in mm) for a weather station, ending with a rogue value of -1. The program should then output the total rainfall and the number of readings.
A three-level indexed sequential file system stores customer records with key field values in the range 0000 to 9999. Only a few of the possible key field values have currently been allocated to customers.
Explain how new customer records 3892 and 3893 are to be added to the system, mentioning the creation and linking of any necessary index or data blocks.
Explain how the computer would access record 3893 at a later date.
A sequential list of English language words can be stored either in fixed length or variable length records. Six thousand (6000) words are to be stored. The maximum length of any word is 22 letters, with an average word length of 7 letters.
Estimate the size of the file required to store the words in fixed length format.
Estimate the size of the file required to store the words in variable length format. Variable length records have a format where each word is terminated with an @ character (which requires one byte of storage).
Define the term data mining and describe how three different organisations might use data mining.
Describe four data validation techniques.
Describe the types of malicious software which might be transferred to computers and the delivery mechanisms, and the steps that can be taken to protect against these.
Computer data may be at its highest security risk during transfer from one location to another. Outline the risks that exist at this time, and how they can be minimised.
A city is developing a new light railway system to use driverless trains, with several computer centres controlling different areas of the network.
Give examples of input and output which might be required by control systems on board the trains.
The system will be safety critical. Explain what is meant by a safety critical system, describing measures that are involved in ensuring safety.
Describe the operation of a mainframe computer using a multi-programming, multi-user operating system.
Explain what is meant by distributed processing, and describe how this will operate using an example that you have studied.
A binary tree structure is designed to contain strings and uses the following rules:
• The left pointer indicates the condition 'earlier or at the same position in the alphabet'
• The right pointer indicates the condition 'later in the alphabet'
Construct a binary tree using these rules and the data entered in the following order: Goat, Duck, Fox, Bear, Ant, Cat, Leopard, Owl, Mayfly, Insect, Jaguar, Emu.
Carry out a pre-order traversal of the tree and give one use of pre-order traversals.
Carry out an in-order traversal of the tree and give one use of in-order traversals.
Carry out a post-order traversal of the tree and give one use of post-order traversals.
The evaluation of a computer based solution should consider system functionality and system performance.
Identify a criterion for the evaluation of the functionality of a system and a criterion for the evaluation of the performance of a system.
Developments in human-computer interaction include natural, immersive and experiential interfaces.
Describe, giving examples, the main characteristics of natural and immersive human computer interfaces.
Use a truth table to prove De Morgan's Law: A + B = Ā . B̄
Simplify the following using De Morgan's Laws and Boolean identities. Identify which law or identity you are using:
A.B̄ + A
Simplify the following expression using Boolean identities and rules:
A.B.(B̄ + C) + B.C + B
A code editor is an essential software engineering tool of an integrated development environment (IDE). It provides features designed to assist with the writing and editing of code.
Describe two features of a code editor designed to assist with the writing and editing of code.
State the purpose of code translation.
Describe, giving examples, an error that will prevent program translation and an error that will not be discovered during translation.
An algorithm converts decimal numbers to binary. Dry run the algorithm using the trace table for decNumber = 137.
State the purpose of the algorithm.
Explain the selection of data types for 'bin' and 'answer' in the algorithm.
An Institute for ICT technicians in schools and colleges operates a code of conduct.
Describe the purpose of the code of conduct.
Identify two standards that should be included in the code for professional competence.
Identify two standards that should be included in the code for professional integrity.
An online retailer uses a hash table to store details of stock items. Each stock item has a key value.
Explain the operation of a hash table and why the time taken to perform search and insertion operations is not affected by the number of stock items stored.
The retailer needs to store customers' delivery details, including their postal address. In this system a postal address is made up of the street, town and postcode.
• Street can be a house number or name followed by the name of the street.
• All towns begin with an uppercase letter followed by lowercase letters.
• All letters in a postcode will be uppercase.
• Postcodes can include two or three digits.
Produce an appropriate Backus-Naur Form (BNF) definition for this postal address.
Describe iteration.
Describe recursion.
Describe two advantages of using an iterative function compared with a recursive function to solve a given problem.
Describe the purpose of data validation.
Write an algorithm to validate a date in dd/mm/yyyy format.
Describe what is meant by Object-Oriented Programming (OOP).
Explain the relationship between classes and instances.
Explain what is meant by a method.
Explain the need for standardisation of computer languages and discuss the advantages arising from the use of algorithms and programming languages that have been standardised.
You should draw on your knowledge, skills and understanding from a number of areas across your Computer Science course when answering this question.
Describe the function of two of the buses involved in the fetch-execute cycle.
Explain the sequence of operations that will occur during the execute phase of the fetch-execute cycle, making clear the role of the Program Counter, the Memory Address Register and the Memory Data Register.
An assembly language application processes the results of a laboratory experiment. A series of positive numbers is entered. A negative rogue value is used to terminate the series. The program then outputs a total and count for the data values entered.
The processor has registers R, S and T. Commands available:
LOD R, X - Load register R with value X
MOV R, S - Copy contents of R to S
ADD R, S - Add contents of R to S, result in R
INC R - Add 1 to contents of R
DEC R - Subtract 1 from contents of R
JGE R, LABEL - Jump to LABEL if R >= 0
JLZ R, LABEL - Jump to LABEL if R < 0
JMP LABEL - Jump unconditionally to LABEL
IN R - Input a value and store in R
OUT R - Output contents of R
Write a program to calculate the total and count of a series of input data values, terminated by a negative rogue value.
A programmer chooses to use a random access file system with separate overflow area to store records.
Explain what is meant by an overflow area.
Another programmer recommends using a progressive overflow strategy where if the memory location calculated for storing a record is already occupied, the record is stored in the next available empty location. If the end of the main file is reached, the search continues from the beginning.
Give one advantage and one disadvantage of using this progressive overflow strategy compared with a separate overflow area.
The largest number generated by the hashing method is given by NOV3099. Calculate the memory location for this date.
Explain why this would be an unsuitable hashing method.
Suggest an improved hashing method for storing records with key fields in the same format e.g. OCT0322.
The transmission speeds between the nodes of a network are shown. A cost for routing data packets between nodes is calculated by dividing 1Mbps by the transmission speed of the link.
Calculate the costs for each of the remaining 5 links in the network.
Copy and complete the table to show the routes that would be taken by packets from node A to each of the other nodes B to E.
A table stores hotel bookings with columns: Name, Address, Date, Room. This table is not in normal form. Explain why there may be problems when searching or sorting this table.
Re-design the table so that it is in first normal form.
A local community group organises volunteer drivers to collect elderly residents and take them on trips. The group has minibuses available which can be allocated for trips on particular dates. Each trip has one driver allocated.
Produce an entity-relationship diagram to show the relational links between drivers, residents, vehicles and trips.
Assume residents individually book seats on trips. Design a database in third normal form for this situation.
Write an SQL command to output the IncidentID and ProblemDescription only for all of the problems.
Write an SQL command to output the Location for all problems allocated to the engineer with EngineerID 228.
Write an SQL command to reallocate the problem with IncidentID 1866. This problem has now been assigned to the engineer with EngineerID 304.
Write an SQL command to output the Date and Location for all problems allocated to the engineer with Surname Wong and Initial K.
Write an SQL command to create a new table DEVICE to contain the IPAddress and DeviceDescription for each electronic device connected to the factory network.
Explain, giving an example, how an integer can be subtracted from another integer using two's complementation.
Identify three types of error that could occur when performing logical left shifts on a number in two's complement form.
In a certain computer system, real numbers are stored in floating point form using two's complementation, a 10 bit mantissa and a 6 bit exponent.
Calculate the denary number represented by the floating point number:
Mantissa: 0110 1101 00 Exponent: 0001 11
State the effect on the result in question 7(a) if 1 is subtracted from the value of the exponent to give:
Mantissa: 0110 1101 00 Exponent: 0001 10
Calculate the denary number represented by the new floating point number.
State a security problem that may arise if a single key (symmetric) encryption method is used.
An asymmetric encryption method makes use of a private and public key pair. Explain how these could be used in the safe transfer of data over the internet.
A method of encrypting text is the Caesar cypher. Each letter is moved forward in the alphabet by a fixed number of places using modulo 26 arithmetic.
State why messages using the Caesar cypher can be decrypted easily by an unauthorised person.
Two members of staff use a stream cypher method where shift[1] = 4, shift[2] = 3, and shift[N+2] = shift[N] + 2 × shift[N+1].
Calculate the letter shifts for the characters in the fourth and fifth positions.
Encrypt the word ZEN using this cypher.
A large and complex computing task needs to be carried out. Programmers consider using parallel processing on a large computer or using distributed processing on smaller computers.
Explain what is meant by parallel processing and distributed processing.
Discuss the factors that the programmers might consider when making a choice between parallel processing and distributed processing.
Explain what is meant by the term biometric data.
Describe two examples of biometric data.
Explain using an example how biometric data can permit access to a secure area or system.
Explain why there may be objections to the use of biometric data.
Large organisations use database management systems.
Explain what is meant by a database management system and discuss the tasks carried out by the Information Technology staff who operate the database management system.
Two human computer interfaces (HCI) are voice input and touch screen.
Give two benefits of using a touch screen interface on a mobile device.
Describe the difficulties in creating a natural language interface for voice input.
Explain the terms object, class and method in object-oriented programming.
Draw a truth table to show the value of P for all possible values of A, B and C for the following Boolean expression:
P = Ā.B + C
Using the data in the 8 bit register below, design a mask and use it to demonstrate how a logical operation can be used to extract the least significant 4 bits.
Register contents: 1 1 1 0 0 0 1 1
Describe the processes carried out during the lexical, syntax and semantic analyses stages of compilation.
Describe one advantage of using a programming language that requires compiling compared with a programming language that requires interpreting.
Describe two advantages of using a programming language that requires interpreting compared with a programming language that requires compiling.
State the purpose of an assembler. Describe the difference between the source code of an assembler and the source code of a compiler.
Using the laws of Boolean algebra and De Morgan's theorem simplify the following Boolean expression:
A . NOT(A . B)
Simplify the following Boolean expression:
A.B + A.(B + C) + B.(B + C)
Write a bubble sort algorithm, using pseudo-code, to sort an array of integers into ascending order.
The name of a constant in a certain computer language must either be a single uppercase letter, or a single uppercase letter followed by one or more uppercase letters or digits.
Produce an appropriate syntax diagram to define a constant in this language.
Produce an appropriate Backus-Naur Form (BNF) definition for a constant in this language.
Below is part of an algorithm that initialises a two dimensional array named GRID of size N x N with zeros.
for i = 0 to N - 1
for j = 0 to N - 1
GRID(i,j) = 0
next j
next i
Evaluate the efficiency of the algorithm and, using Big O notation, determine the growth rate for the time performance.
Define the term algorithm. Other than pseudo-code, state one method of expressing an algorithm.
Describe the main characteristics of a recursive algorithm.
Describe two disadvantages of using a recursive algorithm.
A software company carries out a design review as part of its quality control procedures.
Identify three tasks that would be carried out during a design review.
A linked list can be ordered or unordered.
Explain the difference between searching for an item in an ordered list compared with searching an unordered list.
The table below includes an unordered list of names: Smith, Jones, Ahmed, Lewis, Thomas, Brown.
Copy the table and complete the Next Pointer (1) column to link the list in ascending alphabetical order.
Add Murphy and Collins to the linked list and complete the Next Pointer (2) column.
Complete the Next Pointer (3) column to delete Smith.
Draw a representation of a binary tree using the data items from question 11(b) as key values.
A debugging tool of an Integrated Development Environment (IDE) enables stepping, break points and variable watches.
Describe the use of stepping, break points and variable watches in the debugging of programs.
Compare the Waterfall and Agile approaches to systems analysis and discuss suitable programming paradigms for each approach.
Two tables have been created in a database using SQL commands.
CUSTOMER table: CustNum, CustName, DateOfFlight, FlightNum
FLIGHT table: FlightNum, Terminal, Destination
Write an SQL command to output the names and flight numbers of all the customers.
Write an SQL command to output all details of customers who are on flight number 370.
Write an SQL command to output the names of all the customers flying from Terminal 1.
Write an SQL command to create a new table FREQUENTFLYER to contain the Customer Number and Frequent Flyer points of each customer.
Write an SQL command to enter the following data into the new FREQUENTFLYER table:
- Customer 21328 should have 210 points
- Customer 14777 should have 300 points
Describe the advantages of using a distributed database.
A certain computer has an 8 bit accumulator with the following data stored in memory:
- Memory location 1A holds the number 0
- Memory location 1B holds the number 1
- Memory location 1C holds the number 9
The instruction set contains: LDA X (load accumulator), JGT LABEL (jump if > 0), ADD X, STA X (store), CLR (clear), OUT (output), DEC X (decrement by contents of X).
Write a simple program using only the assembly language commands above to output the integers 0 to 9.
Two extra commands are defined:
ASR R — Performs an arithmetic shift right one place on register R
LDR P, Q — Load register P with the contents of memory location Q
Demonstrate what the following fragment of code does, by showing the contents of registers and memory locations at each step.
Memory location 1D holds 01111000₂
Memory location 1E holds 01000110₂
LDR R, 1D
LDR S, 1E
ASR R
LDA R
ADD S
STA R
Explain the meaning of the term parallel processing; your answer should make reference to how parallel processing carries out a single task.
Give four limiting factors of parallel processing.
Explain the difference between truncation and rounding giving a binary example of truncation and a denary example of rounding.
State which method generally produces a more accurate result — truncation or rounding.
Describe how absolute and relative errors are calculated when truncating and rounding.
Convert the hexadecimal numbers -7₁₆ and A₁₆ into two 8 bit binary numbers, using two's complementation. Using binary addition, calculate the binary number that would result from adding them.
You must show all of your working.
In a certain computer system, real numbers are stored in floating point form using 16 bits: 12 bit mantissa in two's complement form (binary point immediately after the left bit) and 4 bit exponent in two's complement form.
Clearly showing your working, convert 42.875₁₀ into this format.
In a different computer system, real numbers are stored in floating point form with an 8 bit signed mantissa and a 4 bit signed exponent.
Clearly showing your working, calculate the decimal value of 0.1111011 0101₂
When scheduling, name and describe the three basic states of a process.
Interrupts cause the operating system to respond to system events. Give two examples of common interrupts.
Describe a single buffer and a double buffer. Explain the role of a single buffer and a double buffer. Explain why double buffering is usually preferred.
Cryptography uses asymmetric or symmetric encryption methods. Symmetric encryption methods use a single key which encrypts and decrypts data. Asymmetric encryption methods use a public key for encryption and a private key for data decryption.
Describe the advantages of asymmetric encryption and the advantages of symmetric encryption.
The Boolean operation XOR is often used in cryptography.
In the 8 bit ASCII character set, the characters OK! are represented by:
O = 01001111₂
K = 01001011₂
! = 00100001₂
Use XOR to encrypt the string OK! with the 8 bit binary key 11110011₂
Describe two deficiencies of the key used in question 8(b).
A company with a large office building operates a 'Bring Your Own Device to Work' (BYOD) scheme allowing employees to use personal devices on the company's network.
Describe the hardware necessary to connect a device to the company's network wirelessly and provide an Internet connection.
Identify and describe two network applications that could be used by an employee with a connected device.
Expert systems are widely used by organisations for a variety of purposes. Describe the benefits to an organisation of using an expert system.
Explain the use of multi-level indexes and draw a diagram to demonstrate the operation of a three-level index.
Khan's Pharmaceuticals currently uses an ID card system to control employee access to its premises. This has proved problematical with employees swapping cards and the company now wishes to use a voice print recognition system in its place.
Describe how this system would operate and explain the benefits and drawbacks associated with a biometric system used for this purpose.